Blank Nodes in SPARQL Queries

Created on Feb. 23, 2013, 9:34 a.m. by Hevok & updated by Hevok on May 2, 2013, 5:18 p.m.

In RDF(S) there are not only URI, Literals and type Literals there are also Blank Nodes. Blank Nodes could not necessary be referred from outside, they especially stand for things that do not really have an existing outside of the Database that stands for some quotation or Assertion existence. Therefore, one has the possibility to use these Blank Nodes withing a SPARQL Query. For example below one has two Prefixes for URI and a SELECT statement where one here simply selects the Variable Name. Then one has in the WHERE Clause, first a reference to a Blank Node in the Subject so in the same way as in RDF. So the Blank Nodes starts with an underscore and one is looking for Blank Nodes that are of Type Lecture. Then again there after the Semicolon the Triple continues and it is said also this Blank Node should have the Property is managed by, so it is a Lecture. Then again there is there is a Blank Node at the Object level. Then all things that are connected to the Blank Node in a separate Triple, they have the Brackets around to show that there is again a Blank Node is referring to an Object. And there is a Blank Node that is connected to the Property rdfs:label and the Name that is here in the Variable. So what is selected here are the Names of the Managers that are identified by a Blank Node.

Again a Blank Node is referring to an Object.


Tags: query, coding, rdf, database, data
Categories: Tutorial
Parent: SPARQL

Update entry (Admin) | See changes

Comment on This Data Unit