The Resource Description Framework (RDF) is a language for representing information about resources in the World Wide Web. This primer is designed to provide the reader with the basic knowledge required to effectively use RDF. It introduces the basic concepts of RDF and describes its syntax. It describes how to define RDF vocabularies using the RDF Vocabulary Description Language, and gives an overview of some deployed RDF applications. It also describes the content and purpose of other RDF 1.1 specification documents.

Introduction

This document reflects current progress of the RDF Working Group towards updating the 2004 version of the RDF Primer. The editors expect to work on a number of issues, some of which are listed in boxes like this throughout the document.

The Resource Description Framework (RDF) is a framework for describing information about resources in the World Wide Web, such as such author and modification time of a Web page or copyright and licensing information of a Web video.

A Web resource is anything we can point to with a Web identifier. Technically, a Web identifier is called an IRI, short for "International Resource Identifier". A URL (Uniform Resource Locator) which we put in our Web browser is a typical example of an IRI: we can retrieve the resource through the URL. There are also IRIs that are used to identify things we cannot "retrieve", such as people or products. For example, if Bob's home page is http://www.example.com/bob a popular convention is to use the IRI http://www.example.com/bob#me as a Web identifier for Bob. If you insert this IRI in your browser it may or may not retrieve something, but it definitely will not retrieve Bob in person (well, at least not with the current state of the art).

RDF is intended for situations in which this information needs to be processed by applications, rather than being only displayed to people. RDF provides a common framework for expressing this information so it can be exchanged between applications without loss of meaning. Since it is a common framework, application designers can leverage the availability of common RDF parsers and processing tools. The ability to exchange information between different applications means that the information may be made available to applications other than those for which it was originally created.

The primer is not a normative document. Normative documentation of RDF can be found in the following documents:

This primer provides a roadmap for people who want to study the normative RDF documents (see Sec. "Roadmap".

RDF Data Model

RDF Statement

RDF allows us to make statements about resources indetified with an IRI. The format of these statements is simple. It always has the following form:

      <subject>  <predicate> <object>
    

The subject is the Web resource we like to make a statement about. The predicate represents the feature we want to make a statement about. The object represents the value of the feature for this subject. Informally speaking, RDF allows us to make statements of the form:

      <Bob> <is a friend of> <Alice>.
      <Bob> <is born on> <the 4th of July 1990>. 
      <Leonardo da Vinci> <is the creator of> <the Mona Lisa>.
      <The Mona Lisa> <is on display in> <the Louvre>.       
    

Because RDF statements consist of three elements they are called triples. Resources typically occur in multiple triples, for example Bob and the Mona Lisa in the examples above. We can therefore visualise triples as a connected graph. Graphs consists of nodes and arcs. The subjects and objects of the triples make up the nodes in the graph; the predicates form the arcs.

Informal graphs of the four sample triples
Informal graphs of the four sample triples

Let's look at the three parts in an RDF statement in some more detail.

Subject
The subject is the thing that the RDF statement is about. The subject is usually a Web identifier, such as a URL. ...
Predicate
...
Object
...

Readers familiar with databases could view the RDF data model as a binary database model, where every distinct predicate forms a two-column table with subjects in the first column and objects in the second column.

In the following sections we discuss the three basic constructs that appear in triples, namely IRIs, literals and blank nodes, in more detail.

IRI

Literal

Blank node

RDF Syntax

RDF has many syntactic forms Turtle Syntax Namespace prefixes

RDF Vocabularies

RDF Graphs and what you can do with them

Multiple graphs

Document roadmap

Acknowledgments

This section does not yet list those who made contributions to the RDF 1.1 version, nor does it list the current RDF WG members.

The RDF 2004 editors acknowledge the contributions from many members of the RDF Core Working Group. Specific thanks are due to Art Barstow, Dave Beckett, Dan Brickley, Ron Daniel, Ben Hammersley, Martyn Horner, Graham Klyne, Sean Palmer, Patrick Stickler, Aaron Swartz, Ralph Swick, and Garret Wilson who, together with the many people who commented on earlier versions of the Primer, provided valuable contributions to this document. In addition, this document contains a significant contribution from Pat Hayes, Sergey Melnik, and Patrick Stickler, who led the development of the RDF datatype facilities described in the RDF family of specifications.

Changes from RDF 2004