Johann Wolfgang Goethe Universitaet

Back to DBIS RDF Homepage



Introduction to RDF

by Karsten Tolle (2000)

The Web provides a simple and universal infrastructure to exchange various kinds of information. In order to share, interpret, and manipulate information worldwide, the role of metadata is widely recognized. Indeed, metadata allow us to easily locate information available in the Web, by providing descriptions about the structure and the content of the various Web resources (e.g. data, documents, images, etc.) and for different purposes. The emergence of the Resource Description Framework (RDF) is expected to enable metadata interoperability across different communities or applications by supporting common conventions about metadata syntax, structure, and semantics.

More precisely, it provides a) a Standard Representation Language for Web metadata; and b) a Schema Definition Language (RDFS) to interpret (meta)data using specific class and property hierarchies (i.e. vocabularies). Moreover, RDF/RDFS offer a syntax for representing metadata and schemas in XML, enabling the creation and exchange of RDF descriptions in a both human readable and machine understandable form. Many information providers like ABC News, CNN and Time Inc., Web portals like Open Directory as well as Web browsers like Netscape, and search engines like Altavista, Yahoo and Webcrawler already support the RDF proposal.

RDF is based on a directed graph model that alludes to the semantics of resource description. The basic idea is that a Resource (identified by a URI) can be described through a collection of Statements forming a so-called RDF Description. A specific resource together with a named property and its value is an RDF statement. RDFS schemas are then used to declare vocabularies, i.e. collections of classes and properties, that can be used in resource descriptions for a specific purpose or domain.

How to represent RDF

RDF describes the interrelationships among resources in terms of named properties and values. These named properties may be thought of as attributes of resources and in this sense correspond to traditional attribute-value pairs. One main difference is that properties defined in RDF only identified by their name (URI) and not like in other object models, where attributes are identified by their name plus the domain class they can describe. So, properties have a URI and therefore are also resources. The value of a property can be another resource or a literal. A literal is simple string or other primitive data type as defined by [XML].

RDF provides three representations of the RDF data model namely:

·      RDF Graph – a syntax-neutral graphical description of the data

·      RDF 3-tuples – the set of statements described in triples

·      RDF Syntax – provides some standard ways for describing data using XML

The RDF constructs and further nomenclature will be explained within the section 0. For the other two models I just explain the way of thinking and their underlying notion.

 

RDF Graph

The RDF Graph is a syntax-neutral way of representing RDF expressions using directed labeled graphs. These graphs also called nodes and arcs diagrams.  The arcs represent the named properties. Each property connects two nodes, coming from a node representing a resource (drawn as oval) and pointing to another resource or a literal (drawn as rectangle). So, we have the following two options, as shown in Figure 0.1:

Figure 0.1  Statements in the RDF Graph representation.

a)      The named property p connects the two resources A and B.

b)      The named property p connects the resource A with the literal L.

Such a combination of a resource, a named property and its value is called a statement and define the resource as the subject, the property as the predicate and the value as the object of the statement. 

Figure 0.2  The elements of a statement: Subject, Predicate and Object.

This statement would represent the following sentence:

            Karsten Tolle is the creator of the resource  http://www.ics.forth.gr/proj/isst/RDF.

In some cases we generate new resources to express a sentence. These new resources do not have a predefined URI and we call them anonymous. Anonymous resources are represented in the RDF Graph as an empty oval. Intern a URI will be created for this resource, otherwise it would not be one. The internal URI is just not shown in this model and the choice how to generate it has to be made by the application database designer. So, we can distinguish between different anonymous resources. Consider as an example the following sentence, Figure 0.3 represents this in graph form:

 http://www.ics.forth.gr/proj/isst/RDF was created by an individual whose name is Karsten Tolle, email tolle@dbis.informatik.uni-frankfurt.de and the individual whose name is Mister X published it.

Figure 0.3  Use of anonymous resources in RDF Graph.

I use the ‘dc’ prefix for the Dublin Core namespace as shown in Appendix B of [RDF Schema] and the ‘s’ prefix for an imaginary namespace.

There are many cases where it is necessary to make statements about a collection of things, e.g., the members of a group or resources at a Web site. RDF provides three different containers to make references to a collection of resources or literal. A Bag representing a multi set of  values, a Sequence representing an ordered list of values and an Alternative representing alternatives for a single value of a property. A container itself is a resource and must be instance of one of the predefined classes (see RDF Schema for classes) rdf:Bag, rdf:Seq or rdf:Alt by using the rdf:type property. The properties to instanciate values to the container are named simply „rdf:_1“, „rdf:_2“, „rdf:_3“, etc. For example, to represent the sentence

            The students of the course s:Digital Design are „Peter“, „Paul“ and „Mary“.

The corresponding RDF Graph would be:

Figure 0.4  A bag as an example of how to use containers in RDF.

In order to enable RDF to make statements about other RDF statements it provides the ability to create a model of a statement. This process to make statements about statements is formally called reification in the Knowledge Representation community. So, a model of a statement is called a reified statement. A reified statement is a  resource having the rdf:type = rdf:Statement and must define the following three properties to guarantee a unique reference:

-        rdf:predicate           The link to the predicate of the statement we refer to.

-        rdf:subject              The link to the  subject of the statement we refer to.

-        rdf:object                The link to the object of the statement we refer to.

In Figure 0.5 you can see the abstract way of modeling a statement and in Figure 0.6 we have a more precise example. In both cases the resource for the reified statement is an anonymous resource. RDF provides a shorthand to create statements about statements by using the attribute ‘rdf:bagID’ (refer to [RDF M&S Chapter 4] for more examples).

Figure 0.5  The formal remodel of a statement to a reified statement.

Using a reified statement we can model the sentence:

Vassilis says: ”Karsten  is the creator of the resource  http://www.ics.forth.gr/proj/isst/RDF.”

Figure 0.6  An example of a reified statement in the RDF Graph representation.

RDF in 3-tuples

Another way to represent a set of RDF statements is to use 3-tuples, also called triples. Each triple {p, s, o} correspond to an arc from the subject s to the object o, labeled by the predicate p. The example shown in Figure 0.2 would be written as:

            {[http://purl.org/dc/...#Creator], [http://www.ics.forth.gr/.../RDF], „Karsten Tolle“}

The notation [I] denotes the resource identified by the URI I and quotation marks denote a literal. Actual this notation is only necessary for the object o of the statement, because the predicate p and the subject s must be resources.

This representation is an easy way to represent a very huge set of statements and process them and therefore provides the scalability that had been forced as one goal for RDF. 

References

[RDF M&S] Ora Lassila and Ralph Swick: „Respirce Description Framework (RDF) Model and Syntax Specification”
Online: http://www.w3.org/TR/REC-rdf-syntax

[RDF Schema] Brickley, D. ; Guha, R. V. : „Resource Description Framework (RDF) Schema Specification“.
Online: http://www.w3.org/TR/rdf-schema

[XML] T. Bray, J.Paoli and C.M. Sperberg-McQeen: „Extensible Markup Language (XML) 1.0“.
Online: http://www.w3.org/TR/REC-xml