top of page
JMichael_Original_wdoc.jpg
LogoTransGrey_lg.png


Intro to Graph
Databases
Video Transcript

 

This video includes an overview of visual graphs, SPARQL editor and raw data using a desktop installation of Ontotext's GraphDB.

Intro to Graph Databases Video Transcript:

Hi, and welcome to this video.  In this video I am going to give a high-level overview of graph databases using Ontotext’s GraphDB.  GraphDB is a graph database compliant with the resource description framework RDF and SPARQL which is a query language for retrieving and manipulating data stored in RDF's.

In this video we will specifically look at visual graphs and the SPARQL query editor. I have opened up the GraphDB tool.  This is a desktop installation of GraphDB. I was able to easily follow their instructions to install this product and import the Star Wars repository which we're going to use in this video.

Let's look at the Star Wars data set that's already been uploaded. It includes the following characters, species, films, and planets. It has all the information about Star Wars movies. Let's go into the visual graph tool.

Let's search for the word character.  I'm going to pick the drop-down option and then you can see the visual graph shows nodes connected to each other using a predicate. Let's look at Luke Skywalker. The Luke Skywalker predicate is type and linked to the character node. If I further open Luke Skywalker by double clicking on the node, it opens up and shows all the other nodes that are linked to Luke Skywalker.

You can see the movies that he's associated with. You can see Skywalker. There's an outward predicate towards the movie. It shows the subject, predicate, and object. You can see there's also an inward arrow. So, where the subject is the movie and Luke Skywalker is a character. You can see how the data for all these nodes. They're all pre-populated and included as part of this data set.

I think we can have a lot of fun looking at the way the visual graph works. It is nice to see how the data is all connected. You can see how the nodes move around. That is the visual graph. Now, let’s get to the SPARQL query editor.

I want to give a brief overview of SPARQL. It has several types of queries that you can run. Select is the most used query. It returns tabular results. Then, you have the construct where you can use this to create new RDF graphs. You have an insert where you can insert triples into a graph. You can use delete and delete to triples. You can use describe. The describe clause can be used to return RDF data about a resource. This is useful when you don't know the underlying structure of the graph database. It's handy and we can look at that example as well.

Here is a select query. You can see these two prefix statements at the top. Prefix is a SPARQL instruction for a declaration of name space. It's just a syntax convenience mechanism to make your select queries shorter and easier to read.  I've defined two statements here for prefix. I have named the name space. I've called it VOC and RDFS.

Those are two declarations that I've done in this select statement. You can see here the syntax of the select statement. It's very similar to a SQL statement so you see the word select and you have the where clause and you also have the order by clause immediately after the word select. You see the columns that we want to see in the query and as you can see at the bottom a movie, movie name, and movie release date. Those are the three columns that I have selected.

 In the where clause, I'm actually defining a variable called movie.  I'm associating the data from this particular property name. The syntax for the where clause is resource, property name, and property value.

 

By running this first statement, it returns about five rows. The second and the third where clause is where I'm defining the movie name and I'm associating it to this particular property name called label. The third clause is where I'm associating the release date to this variable. When I run the query, t shows the movies along with the release dates.

Let's go look at the underlying data. Let's move to the describe tab. Here you can see the data and how it's been loaded. You have the subject, the predicate, and the object.  You can see the predicate. The name of the movie is associated to the label predicate. If you scroll down, you'll also see the release date linked to the film as well. The graph database is using this data to show the results here.

 

Thank you.

Transcript PDF
bottom of page