Quick Start

compared with
Current by Gergana Petkova
on May 31, 2015 12:20.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (36)

View Page History
h1. Introduction
In this guide, you will learn how to create a GraphDB repository, import a small simple dataset, and query the database to find the imported statements.

In this guide, we will show you how to create a Graphdb repository, import a tiny simple dataset and then query the database to find the imported statements
{toc}

h3. Getting started
h2. Starting GraphDB Workbench

To run the GraphDB Workbench as a standalone server, unzip the distribution zip file and execute the *startup.sh/.bat* script.
To run the GraphDB Workbench as a standalone server, unzip the distribution {{.zip file}} and execute the *{{startup.sh/.bat}}* script. It starts a web application for accessing and administering the workbench. You can find it at [http://localhost:8080|http://localhost:8080].

This will start the workbench web application which you can find at [http://localhost:8080|http://localhost:8080]. You should be greeted by the index page which will tell version information about the workbench along with some information about your license:
h2. Index page

!index.png|align=center,border=1!
After logging in, a summary page is displayed showing version number, license details, currently selected repository (if any) and user name. If no location is currently selected, the message 'No location selected/Please select/create one' is displayed. Click this to get to the management page where you can add a location and create a repository.

the next step is step would be to create a new graphdb repository. For this go to *Admin \-> Repositories*
!index.png|align=center,border=1,width=772!

!empty-repository.png|align=center,border=1!
h2. Managing Repositories

and create/connect to a location. Click on the Add Location button and fill the input with a directory of your choice. You should see something like this(depending on the directory that you chose)
The repository management page is accessed by using the menu bar *Admin->Repositories*. This will display a list of available repositories and their locations as well as the permissions that the logged on user has for each repository.

!selected-location.png|align=center,border=1!
h3. Create a new GraphDB repository

By default for each location you get a SYSTEM repository which keeps repository information, so we have to create another repository in which we are going to import our data, click on the create repository and just type the repository id in the input box(something like *test-repository* should be fine). The default setting should be enough for our simple usecase so juts click on the *Create* button. When you create your first repository it will be selected by default, to view your currently used repository in the workbench just look in the top right corner of the screen. If everything went smooth you should see something like the following:
Go to *Admin->Repositories*

!repository-after-creating.png|align=center,border=1!
!empty-repository.png|align=center,border=1,width=772!

Now go to the import view by going to *Data \-> Import*. The default tab should be *Local files* and is the import method we are going to use for our simple file. Get the [^wine.ttl] file, click on the upload icon in the import view and select the file from your local computer. Then click on the *Import* button on the right of the file, this will popup some advanced settings for the import which you can ignore for now and just proceed. This will upload the file and import it in our repository. In the end of this process you should see something like the following:
and create/connect to a location. Click *Add Location* and fill in the input with a directory of your choice. Depending on the directory that you chose, you will see something like this:

!wine-imported.png|align=center,border=1!
!selected-location.png|align=center,border=1,width=772!

now you can go to the sparql view(just click on the SPARQL menu item). Click on the *Run* button to execute the default query(it will select everything from the repository), you should see the results shortly underneath the form. By default we show a tabular representation of the results but there are different visualization tabs that you can use to explore your data.
By default, adding a location automatically creates a SYSTEM repository that keeps the repository information. Therefore, you need to create another repository in which to import your data. Click *Add repository* and type the repository ID in the input box (for example, *test-repository*).

!sparql-results.png|align=center,border=1!
For our simple usecase, the default settings should be enough, so just click *Create*. When you create your first repository, it will be selected by default. You can see your currently used repository at the top right corner of the screen.

!repository-after-creating.png|align=center,border=1,width=772!

h3. Import data

You can go to the import view by clicking *Data->Import*. The default tab should be *Local files* and this is the import method for a simple file. Get the [Quick Start^wine.ttl] file, click the upload icon in the import view and select the file from your local computer. Then click *Import* on the right side of the file. This will open some advanced settings for the import, which you can ignore for now and just proceed. The file is uploaded and imported in your repository.

!wine-imported.png|align=center,border=1,width=772!

h3. Query data
Go to the SPARQL view by clicking the SPARQL menu item. Click *Run* to execute the default query. It selects everything from the repository. By default, the results are presented in a tabular form but there are also other visualization tabs for exploring the data.

!sparql-results.png|align=center,border=1,width=772!

Like what you see? You can go to the [User guide] for more extended detailed information about the workbench ;-)