Notes on this page are based on the “Resource Description Framework (RDF)” slides of the “Logics for Data and Knowledge Representation” series from Fausto Giunchiglia and Feroz Farazi at the University of Trento.
- A language for representing web resources and information about them in the form of metadata.
- A domain independent data model for representing data on the web.
- A language with an underlying model designed to publish data on the Semantic Web.
- Resource: A thing, a class, or an entity (e.g. web page, article, author).
- Property: Metadata of the resource to be described (e.g. creator, date of creation, genre).
- Statement: A piece of information about a resource representing using a property and a value. For example, Tim Berners-Lee authored Weaving the Web. In other words, Weaving the Web has an author whose value is Tim-Berners Lee.
- A subject (Weaving the Web) – predicate (has an author name) – object (Tim-Berners Lee) triple.
In RDF, statements become machine readable as:
- Triple elements are represented in a form of machine processable identifiers.
- Indentifiers are represented as URLs/URIs.
- A specific XML language (RDF/XML) is used.
RDF Data Model
RDF is a data model used to describe a graph of data with directed edges. URIs are used to represent vertices (subjects & objects) as well as edges (predicates); however, objects can also be literal strings.
In the Semantic Web, we need machines to be able to identify and process data. To that end, an RDF documents can store triples in RDF/XML format.
An RDF document:
- Contains an element enclosed in an XML tag (rdf:RDF)
- Has a set of descriptions within the rdf:Description element
- Each description makes a set of statements about a resource where:
- the resource can be newly defined with the rdf:ID element
- can refer to an existing resource wih rdf:about
- Can group resources in Containers:
- rdf:Bag, rdf:Seq, rdf:Alt
- Container contents are called members, which are listed using rdf:li
- Can group resources in Collections:
- rdf:List, rdf:first, rdf:rest, rdf:nil
RDF Schema (RDFS)
RDFS is a language for describing the vocabulary of an RDF; this provides semantic meaning to RDF resources. From a type system perspective, it has similarity to the object-oriented programming paradigm (OOP).
In RDFS, semantics can be expressed through inferences.
It allows type (rdf:type) propagation through rdf:subClassOf…
It allows relationship propagation through rdfs:subPropertyOf…
It also allows type identification through rdfs:domain…
Modeling set intersection in RDf can also be achieved, albeit in a roundabout way. If we want to represent “If an entity e is in X, it is also in Y and Z“, then we have no specific construct to achieve this, but it can be modeled as: