View Source

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.

{toc}

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. It starts a web application for accessing and administering the workbench. You can find it at [http://localhost:8080|http://localhost:8080].

h2. Index page

After logging in, the summary page is displayed that shows: version number, license details, currently selected repository (if any) and user name. If no location is currently selected then 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.

!index.png|align=center,border=1,width=772!

h2. Managing Repositories

The repository management page is accessed 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.

h3. Create a new GraphDB repository
Go to *Admin \-> Repositories*

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

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:

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

By default, adding a location automatically creates a SYSTEM repository that keeps the repository information. Therefore, create another repository in which to import your data. Click the add repository button and type the repository ID in the input box (for example, *test-repository*).

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. To view your currently used repository in the workbench, just look at the top right corner of the screen.

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

h3. Importing data

Now, go to the import view by clicking *Data \-> Import*. The default tab should be *Local files* and this is the import method that you are going to use for the simple file. Get the [^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. This will upload the file and import it in your repository. At the end of this process, you will see something like the following:

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

Now, you can go to the sparql view by clicking the SPARQL menu item. Click *Run* to execute the default query and it will select everything from the repository. You will see the results underneath the form. The default is a tabular representation of the results but there are different visualization tabs that you can use to explore your data.

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

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