Resource Description Framework Explained

The Resource Description Framework (RDF) is a method to describe and exchange graph data. It was originally designed as a data model for metadata by the World Wide Web Consortium (W3C). It provides a variety of syntax notations and formats, of which the most widely used is Turtle (Terse RDF Triple Language).

RDF is a directed graph composed of triple statements. An RDF graph statement is represented by: (1) a node for the subject, (2) an arc from subject to object, representing a predicate, and (3) a node for the object. Each of these parts can be identified by a Internationalized Resource Identifier (IRI). An object can also be a literal value. This simple, flexible data model has a lot of expressive power to represent complex situations, relationships, and other things of interest, while also being appropriately abstract.

RDF was adopted as a W3C recommendation in 1999. The RDF 1.0 specification was published in 2004, and the RDF 1.1 specification in 2014. SPARQL is a standard query language for RDF graphs. RDF Schema (RDFS), Web Ontology Language (OWL) and SHACL (Shapes Constraint Language) are ontology languages that are used to describe RDF data.

Overview

The RDF data model[1] is similar to classical conceptual modeling approaches (such as entity–relationship or class diagrams). It is based on the idea of making statements about resources (in particular web resources) in expressions of the form subject–predicate–object, known as triples. The subject denotes the resource; the predicate denotes traits or aspects of the resource, and expresses a relationship between the subject and the object.

For example, one way to represent the notion "The sky has the color blue" in RDF is as the triple: a subject denoting "the sky", a predicate denoting "has the color", and an object denoting "blue". Therefore, RDF uses subject instead of object (or entity) in contrast to the typical approach of an entity–attribute–value model in object-oriented design: entity (sky), attribute (color), and value (blue).

RDF is an abstract model with several serialization formats (being essentially specialized file formats). In addition the particular encoding for resources or triples can vary from format to format.

This mechanism for describing resources is a major component in the W3C's Semantic Web activity: an evolutionary stage of the World Wide Web in which automated software can store, exchange, and use machine-readable information distributed throughout the Web, in turn enabling users to deal with the information with greater efficiency and certainty. RDF's simple data model and ability to model disparate, abstract concepts has also led to its increasing use in knowledge management applications unrelated to Semantic Web activity.

A collection of RDF statements intrinsically represents a labeled, directed multigraph. This makes an RDF data model better suited to certain kinds of knowledge representation than other relational or ontological models.

As RDFS, OWL and SHACL demonstrate, one can build additional ontology languages upon

RDF.

History

The initial RDF design, intended to "build a vendor-neutral and operating system- independent system of metadata",[2] derived from the W3C's Platform for Internet Content Selection (PICS), an early web content labelli system, but the project was also shaped by ideas from Dublin Core, and from the Meta Content Framework (MCF), which had been developed during 1995 to 1997 by Ramanathan V. Guha at Apple and Tim Bray at Netscape.[3]

A first public draft of RDF appeared in October 1997,[4] [5] issued by a W3C working group that included representatives from IBM, Microsoft, Netscape, Nokia, Reuters, SoftQuad, and the University of Michigan.[6]

In 1999, the W3C published the first recommended RDF specification, the Model and Syntax Specification ("RDF M&S"). This described RDF's data model and an XML serialization.[7]

Two persistent misunderstandings about RDF developed at this time: firstly, due to the MCF influence and the RDF "Resource Description" initialism, the idea that RDF was specifically for use in representing metadata; secondly that RDF was an XML format rather than a data model, and only the RDF/XML serialisation being XML-based. RDF saw little take-up in this period, but there was significant work done in Bristol, around ILRT at Bristol University and HP Labs, and in Boston at MIT. RSS 1.0 and FOAF became exemplar applications for RDF in this period.

The recommendation of 1999 was replaced in 2004 by a set of six specifications: "The RDF Primer", "RDF Concepts and Abstract", "RDF/XML Syntax Specification (revised)", "RDF Semantics", "RDF Vocabulary Description Language 1.0", and "The RDF Test Cases".

This series was superseded in 2014 by the following six "RDF 1.1" documents: "RDF 1.1 Primer", "RDF 1.1 Concepts and Abstract Syntax", "RDF 1.1 XML Syntax", "RDF 1.1 Semantics", "RDF Schema 1.1", and "RDF 1.1 Test Cases".

RDF topics

Vocabulary

The vocabulary defined by the RDF specification is as follows:[8]

Classes

rdf
: the class of XML literal values
  • : the class of properties
  • : the class of RDF statements
  • ,, : containers of alternatives, unordered containers, and ordered containers (rdfs:Container is a super-class of the three)
  • : the class of RDF Lists
  • : an instance of rdf:List representing the empty list
  • rdfs
    : the class resource, everything
  • : the class of literal values, e.g. strings and integers
  • : the class of classes
  • : the class of RDF datatypes
  • : the class of RDF containers
  • : the class of container membership properties, rdf:_1, rdf:_2, ..., all of which are sub-properties of rdfs:member
  • Properties

    rdf
    : an instance of rdf:Property used to state that a resource is an instance of a class
  • : the first item in the subject RDF list
  • : the rest of the subject RDF list after rdf:first
  • : idiomatic property used for structured values
  • : the subject of the RDF statement
  • : the predicate of the RDF statement
  • : the object of the RDF statement
  • rdf:Statement, rdf:subject, rdf:predicate, rdf:object are used for reification (see below).

    rdfs
    : the subject is a subclass of a class
  • : the subject is a subproperty of a property
  • : a domain of the subject property
  • : a range of the subject property
  • : a human-readable name for the subject
  • : a description of the subject resource
  • : a member of the subject resource
  • : further information about the subject resource
  • : the definition of the subject resource
  • This vocabulary is used as a foundation for RDF Schema, where it is extended.

    Serialization formats

    RDF 1.1 Turtle serialization
    Extension:.ttl
    Mime:text/turtle[9]
    Owner:World Wide Web Consortium
    Standard:RDF 1.1 Turtle: Terse RDF Triple Language
    Open:Yes
    RDF 1.1 TriG serialization
    Extension:.trig
    Mime:application/trig[10]
    Owner:World Wide Web Consortium
    Standard:RDF 1.1 TriG: RDF Dataset Language
    Open:Yes
    RDF/XML serialization
    Extension:.rdf
    Mime:application/rdf+xml[11]
    Owner:World Wide Web Consortium
    Standard:Concepts and Abstract Syntax
    Open:Yes

    Several common serialization formats are in use, including:

    RDF/XML is sometimes misleadingly called simply RDF because it was introduced among the other W3C specifications defining RDF and it was historically the first W3C standard RDF serialization format. However, it is important to distinguish the RDF/XML format from the abstract RDF model itself. Although the RDF/XML format is still in use, other RDF serializations are now preferred by many RDF users, both because they are more human-friendly,[20] and because some RDF graphs are not representable in RDF/XML due to restrictions on the syntax of XML QNames.

    With a little effort, virtually any arbitrary XML may also be interpreted as RDF using GRDDL (pronounced 'griddle'), Gleaning Resource Descriptions from Dialects of Languages.

    RDF triples may be stored in a type of database called a triplestore.

    Resource identification

    The subject of an RDF statement is either a uniform resource identifier (URI) or a blank node, both of which denote resources. Resources indicated by blank nodes are called anonymous resources. They are not directly identifiable from the RDF statement. The predicate is a URI which also indicates a resource, representing a relationship. The object is a URI, blank node or a Unicode string literal. As of RDF 1.1 resources are identified by Internationalized Resource Identifiers (IRIs); IRI are a generalization of URI.[21]

    In Semantic Web applications, and in relatively popular applications of RDF like RSS and FOAF (Friend of a Friend), resources tend to be represented by URIs that intentionally denote, and can be used to access, actual data on the World Wide Web. But RDF, in general, is not limited to the description of Internet-based resources. In fact, the URI that names a resource does not have to be dereferenceable at all. For example, a URI that begins with "http:" and is used as the subject of an RDF statement does not necessarily have to represent a resource that is accessible via HTTP, nor does it need to represent a tangible, network-accessible resource—such a URI could represent absolutely anything. However, there is broad agreement that a bare URI (without a # symbol) which returns a 300-level coded response when used in an HTTP GET request should be treated as denoting the internet resource that it succeeds in accessing.

    Therefore, producers and consumers of RDF statements must agree on the semantics of resource identifiers. Such agreement is not inherent to RDF itself, although there are some controlled vocabularies in common use, such as Dublin Core Metadata, which is partially mapped to a URI space for use in RDF. The intent of publishing RDF-based ontologies on the Web is often to establish, or circumscribe, the intended meanings of the resource identifiers used to express data in RDF. For example, the URI:

    Notes and References

    1. Web site: Resource Description Framework (RDF) Model and Syntax Specification. W3C . 5 January 1999 . live . https://web.archive.org/web/20230714061139/https://www.w3.org/TR/PR-rdf-syntax/Overview.html . Jul 14, 2023 .
    2. News: World Wide Web Consortium Publishes Public Draft of Resource Description Framework. W3C. Cambridge, MA. 1997-10-03. live . https://web.archive.org/web/20220622121722/http://www.w3.org/Press/RDF . Jun 22, 2022 .
    3. Book: Hammersley, Ben. O’Reilly. 978-0-596-00881-9. Developing Feeds with RSS and Atom. 2–3. Sebastopol. 2005.
    4. Web site: Lassila. Ora. Swick. Ralph R.. Resource Description Framework (RDF): Model and Syntax. W3C. 2015-11-24. 1997-10-02.
    5. Web site: Swick . Ralph . Resource Description Framework (RDF) . W3C . 2015-11-24 . 1997-12-11 . dead . https://web.archive.org/web/19980214043631/http://www13.w3.org/RDF/Overview.html . February 14, 1998 .
    6. News: Lash . Alex . W3C takes first step toward RDF spec . CNET News . 2015-11-28 . 1997-10-03 . dead . https://web.archive.org/web/20110616023126/http://news.cnet.com/2100-1001-203893.html . June 16, 2011 .
    7. Web site: Resource Description Framework (RDF) Model and Syntax Specification. 22 Feb 1999. 5 May 2014.
    8. Web site: RDF Vocabulary Description Language 1.0: RDF Schema. W3C. 2004-02-10. 2011-01-05.
    9. Web site: RDF 1.1 Turtle: Terse RDF Triple Language . W3C . 9 Jan 2014 . 2014-02-22.
    10. Web site: RDF 1.1 TriG: RDF Dataset Language . W3C . 25 Feb 2014 . 2022-12-21.
    11. News: application/rdf+xml Media Type Registration . Ietf Datatracker . 2 . IETF . September 2004 . 2011-01-08.
    12. Web site: RDF 1.1 Turtle: Terse RDF Triple Language . 9 January 2014 . W3C.
    13. Web site: RDF 1.1 TriG: RDF Dataset Language . 25 February 2014 . W3C.
    14. Web site: RDF 1.1 N-Triples: A line-based syntax for an RDF graph . 9 January 2014 . W3C.
    15. Web site: N-Quads: Extending N-Triples with Context . 2012-06-25 . dead . https://web.archive.org/web/20130426135418/http://sw.deri.org/2008/07/n-quads/ . 2013-04-26.
    16. Web site: RDF 1.1 N-Quads . 25 February 2014 . W3C.
    17. Web site: JSON-LD 1.0: A JSON-based Serialization for Linked Data. W3C.
    18. Web site: RDF 1.1 XML Syntax . 25 February 2014 . W3C.
    19. Web site: RDF 1.1 JSON Alternate Serialization (RDF/JSON) . 7 November 2013 . W3C.
    20. Web site: Problems of the RDF syntax. Vuk Miličić. 2011-07-21. https://web.archive.org/web/20160308151359/http://milicicvuk.com/blog/2011/07/21/problems-of-the-rdf-syntax/. 2016-03-08.
    21. Web site: 25 February 2014 . RDF 1.1 Concepts and Abstract Syntax . live . https://web.archive.org/web/20240114081050/https://www.w3.org/TR/rdf11-concepts/ . Jan 14, 2024 . W3C.