RDF
Overview
The Resource Description Framework (RDF) is the foundational representation language of the Semantic Web. The basic building block of RDF is the triple containing a subject, predicate, and object. Global identifiers of resources are represented as URIs (or, more generally, IRIs). These URIs can be expressed more compactly as CURIEs.
A graph is a set of triples. A named graph is a particular set of triples with an associated name. When using named graphs, the term quads is often used in favor of triples. This refers to the original triple along with the name of the graph the triple is associated with.
The RDF data model was designed from the beginning with data federation in mind. Because every RDF store represents RDF data in the same way (i.e. as a set of triples), federation is as simple as combining the commonly encoded data into a single store before querying.
Principles
There exist a few guiding principles in RDF that influence how all higher-level constructs work:
- Anyone can say Anything About Any Topic (AAA)
- This principle states anyone can publish to RDF. This includes dissenting/contradictory information.
- Open World Assumption (OWA)
- This principle states that there may exist additional information on any topic that isn't immediately available.
- This contrasts the Closed World Assumption (CWA) most people expect.
- Nonunique Naming Assumption
- This principle states two resources with different names can still refer to the same thing.
- This contrasts the Unique Naming Assumption most people expect.
Blank Nodes
A blank node (bnode) is a node in an RDF graph representing a resource for which a IRI is not specified. That is, the represented resource is anonymous. Such a node can only be used as a subject or object in an RDF triple.
The namespace prefix _ has special meaning. It is reserved for bnodes. RDF processors are free to generate anonymous URIs with this prefix as they see fit.
Lists
Lists are defined recursively using rdf:first and rdf:rest. Lists are denoted in Turtle using parentheses (i.e. (...)).
Serializations
The original syntax and standard for writing RDF was RDF/XML. Turtle is an alternative, more human-readable, syntax. Besides these two exist many others.
Dereferencing
There are two standard naming schemes for creating dereferenceable HTTP URIs. These separate the last part of a URI using either a hash (#) or a slash (/).
When using hash URIs, a URI with no fragment is used to reference a page. A URI with a fragment is used to reference a thing. The #this fragment is often appended to a URI to describe the thing a page is about.
When using slash URIs, a URI that responds with status code 200 returns a representation of the page itself. A response with status code 303 gives a URI that describes the thing the page is about.