The Resource Description Framework ( RDF) is a framework for representing information in the Web. RDF “graph” is a set of RDF triples.
# RDF triple
An RDF triple consists of three components:
subject, which is an IRI or a blank node
predicate, which is an IRI
object, which is an IRI, a literal or a blank node
# RDF nodes
Nodes can be of 3 types:
- IRIs - An IRI (Internationalised Resource Identifier) within an RDF graph is a Unicode string that conforms to the syntax defined in RFC 3987
- literals - Literals are used for values such as strings, numbers, and dates. A literal in an
RDF graph consists of two or three elements:
- a lexical form, being a Unicode string, which SHOULD be in Normal Form C,
- a datatype IRI, being an IRI identifying a datatype that determines how the lexical form maps to a literal value, and
- if and only if the
datatype IRI is
http://www.w3.org/1999/02/22-rdf-syntax-ns#langString, a non-empty language tag as defined by BCP47. The language tag MUST be well-formed according to section 2.2.9 of BCP47.
- blank nodes - Blank nodes are disjoint from IRIs and literals. Otherwise, the set of possible blank nodes is arbitrary. RDF makes no reference to any internal structure of blank nodes. Blank nodes do not have identifiers in the RDF abstract syntax. The blank node identifiers introduced by some concrete syntaxes have only local scope and are purely an artefact of the serialisation.
|IRI prefix||value suffix|
It helps me to think about IRIs as global identifiers and blank nodes as local identifiers. Or you can think about IRIs as bounded variables and blank nodes as free variables in lambda calculus.
# RDF notation
I will use following notation:
- blank nodes as
:something(sometimes noted as
- IRIs as
someis IRI “prefix”,
thingis value “suffix”)
- values as
"something"(I omit datatype IRI, because it is irrelevant in this context)
Example of RDF triple (as tuple):
or as graph:
See RDF vs Graphs.