Data Modeling (RDF)#

Resource Description Framework (RDF) is a framework for describing a resource, but describing the resource in a way that allows you to integrate with (i.e., “link to”) related data across the Web.

RDF resource is a document/file whose contents consists of statements that have the following form (also known as a triple):

<subject> <predicate> <object>


  • subject is the thing being described and is a URL.

  • predicate is the descriptive property (e.g., name, height, size, etc.) of the thing and is a URL.

  • object is the property value and is either a URL or a literal.

The predicate describes the relationship between the subject and the object. That is,

flowchart LR subgraph something id1((subject)) end subgraph this value id2((object)) end id1 --predicate/has some property with --> id2

Use of URLs#

In RDF, the use of URLs allows for disambiguation of the terms:

  • URLs provide global uniqueness.

  • URLs can be looked up which can provide additional context (such as descriptions and additional information) and thereby may help reduce ambiguity.

For example, consider a Java class with a field named "title". The string literal "title" may refer to a job title, an honorific (e.g., “Dr.”, etc.), a title of a book, etc. Determining which title definition applies depends on the context. The use of URLs can help address this ambiguity. For example:

  • refers to a job title, and

  • refers to a title of some resource (like a book, a course, etc.)

For more information, see Vocabulary.


When expressing RDF triples in Turtle (Terse RDF Triple Language) format :

  • URLs are enclosed in angle brackets.

  • Triple statements end with a period (.).

For example, the following statements are examples of Turtle:

<> <> "Example Restaurant" .
<>     <>  "2023-03-07T00:00:00Z"^^<> ;
<>     <>      "Example Restaurant" ;
<>     <>   "Team Lunch";
<>     <>      "Travel and Entertainment" ;
<>     <> "USD" ;
<>     <>    "120"^^<> .

In Turtle, for statements with the same subject, you can avoid repeating the subject by combining the statements with a semicolon (;):

        <>  "2023-03-07T00:00:00Z"^^<> ;
        <>      "Example Restaurant" ;
        <>   "Team Lunch";
        <>      "Travel and Entertainment" ;
        <> "USD" ;
        <>    "120"^^<> .

For object values (can be a literal or a URL), you can append ^^<URL of the data type> to the literal value to avoid ambiguity. For example, the following object value explicitly indicates that the value is a decimal and not a string or an integer literal.

"120"^^<> .

Additional Information#

For more information on RDF and Turtle, see: