Questions tagged [rdf]

The Resource Description Framework (RDF) is a language for representing information about resources in the World Wide Web. It is a syntax independent data model that may be serialised in a variety of concrete syntaxes. RDF is the core data format used on the Semantic Web.

The Resource Description Framework (RDF) is a language for representing information about resources in the World Wide Web. It is a syntax independent data model that may be serialised in a variety of concrete syntaxes. RDF is the core data format used on the Semantic Web.

Data Model

The data model for RDF is Graph based. Every fact in the data is represented as a Triple (or Statement) composed of a Subject, Predicate and Object. The Subject and Object can be thought of as nodes in the Graph while the Predicate is an arc in the Graph. Graphs are composed of a set of Triples, note that duplicates have no meaning.

Subjects must be resources which can either be named (using a IRI) or anonymous (known as Blank Nodes). IRIs are considered to be globally scoped while Blank Nodes are scoped to the Graph in which they appear.

Predicates must always be named resources i.e. IRIs.

Objects may be resources - IRIs/Blank Nodes - or they may be Literal values. Literal values are of three types:

  1. Simple Literals - These are just strings e.g. "simple literal"
  2. Literals with Language Specifiers - These are strings with the language of strings specified using standard language tags e.g. "literal with language tag"@en-gb
  3. Literals with DataTypes - These are values with a declared data type e.g. "123"^^xsd:integer . XML Schema DataTypes are commonly used and supported by related standards like SPARQL

Syntaxes

RDF is a syntax independent model but has a variety of officially and semi-officially standardised concrete syntaxes which are used to serialise it.

Official Standards (W3C)

The following are official standards created by the W3C

  • RDF/XML is the official XML based serialisation of RDF. RDF/XML is quite commonly used but has some drawbacks in being difficult for a human to understand or write by hand.
  • NTriples is the official plain text format for serialising RDF. It is a very simple serialisation that uses no syntactic sugar, it is very quick to parse and can be read/written by hand. It's disadvantage is that it is very verbose compared to other syntaxes.
  • RDFa is the officially recommended mechanism for embedding RDF into existing (X)HTML web pages. It is easy to use once learned but is sometimes criticised for the fact that the DOM structures required to embed RDFa often don't fit with the DOM structures of pages forcing developers to embed additional hidden elements with the RDFa.
  • Turtle is a readable yet compact plain text serialisation of RDF developed by Dave Beckett who was one of the members of the W3C working group that created the RDF specifications. It is quick and easy to parse and includes various syntactic sugar for compressing the data to make it less verbose. Turtle is a superset of NTriples and a subset of Notation 3 Turtle was introduces as an official RDF serialization in February 2014.
  • JSON-LD - JSON-LD is another JSON serialisation of RDF. It emphasises compact syntax and the ability to add RDF into your existing JSON data. It becamse official along with Turtle in February 2014.

Unofficial Standards

While the following are not officially standardised they are reasonably well specified and are widely implemented in RDF/Semantic Web APIs:

  • Notation 3 is a readable yet compact plain text serialisation of RDF developed by Tim Berners-Lee. It is a superset of Turtle and is capable of expressing data which is outside of the core RDF model as well as expressing all valid RDF.
  • Talis RDF/JSON - One of several competing JSON serialisations of RDF that tries to be as compact as possible

Resources

4248 questions
228
votes
12 answers

What is the difference between RDF and OWL?

I am trying to grasp the concept of Semantic Web. I am finding it hard to understand what exactly is the difference between RDF and OWL. Is OWL an extension of RDF or these two are totally different technologies?
user32262
  • 8,660
  • 21
  • 64
  • 77
70
votes
14 answers

What's a RDF triple?

In layman's terms, what's a RDF triple?
jade
  • 977
  • 1
  • 9
  • 8
53
votes
5 answers

Exploratory SPARQL queries?

whenever I start using SQL I tend to throw a couple of exploratory statements at the database in order to understand what is available, and what form the data takes. e.g. show tables describe table select * from table Could anyone help me…
significance
  • 4,797
  • 8
  • 38
  • 57
50
votes
6 answers

microformats, rdf or microdata

Is there any difference between using one of this technologies? I'm building now a site using HTML5, and I'm having hard time to decide which one of them to use. I cannot see any difference between them, else the syntax size, which I'm not quite…
neoswf
  • 4,730
  • 6
  • 39
  • 59
49
votes
10 answers

What is the semantic web?

I've heard a lot about the semantic web but I'm still not exactly sure what it is. How will it be different to the web we know now?
Matthew James Taylor
  • 4,806
  • 5
  • 29
  • 33
46
votes
2 answers

Difference between domain and range in rdf schema?

could you please explain me the difference between rdfs:domain and rdfs:range with an example? and when should i use domain and when range? i have read h w3c rdf primer but i did not understand the difference
Baper
  • 1,533
  • 5
  • 22
  • 30
46
votes
9 answers

Are there any tools to visualize a RDF graph? (please include a screenshot)

I'm looking for a tool that will render a RDF graph in a reasonably useful graphic format. The primary purpose of the graphic format being inclusion into a PowerPoint slide or printing on a large plotter for management review. I am currently using…
Eric Schoonover
  • 47,184
  • 49
  • 157
  • 202
46
votes
3 answers

Great RDF visualization tools

I want to find some great tools or styles to visualize my RDF data so that it can give viewers a shock when they access the RDF data. The problem is that the visualization tools I get now can just generate some simple styles (node,edge...) like…
ChandlerQ
  • 1,428
  • 2
  • 21
  • 29
40
votes
6 answers

How are RDF and RDFS related?

I've been reading about Semantic Web technologies such as RDF/RDFS and "ontology", but was wondering how each of these are related? At the moment the terms all seem interchangeable, or I'm not understanding a fundamental concept here.
Webster Thesaurus
  • 431
  • 1
  • 4
  • 4
34
votes
2 answers

Differences between rdf:resource, rdf:about and rdf:ID

What are the conceptual differences between rdf:resource, rdf:about, and rdf:ID. I did some investigation but the difference between them are not clear for me yet. For example, whether rdf:ID is used when declaring a resource for the first time,…
suat
  • 4,239
  • 3
  • 28
  • 51
33
votes
4 answers

What is the difference between GraphQL and SPARQL?

I'm doing a lot of research right now on Semantic Web and complex data models that represent relationships between individuals and organizations. I knew a little semantic ontologies although I never understood what it was used if not make graphs. I…
Erwan Pesle
  • 821
  • 2
  • 8
  • 12
33
votes
1 answer

What is the difference between DatatypeProperty, ObjectProperty, & FunctionalProperty, and when should I use them?

When writing an ontology, there are several very commonly used types, including: DatatypeProperty ObjectProperty FunctionalProperty InverseFunctionalProperty The first three kinda look like they'd be used in a particular set of ways, but I find my…
Kristian
  • 21,204
  • 19
  • 101
  • 176
32
votes
7 answers

Is there any killer application for Ontology/semantics/OWL/RDF yet?

I got interested in semantic technologies after reading a lot of books, blogs and articles on the net saying that it would make data machine-understandable, allow intelligent agents make great reasoning, automated & dynamic service composition…
user304867
  • 337
  • 3
  • 3
32
votes
3 answers

Graph DBs vs. Document DBs vs. Triplestores

This is a somewhat abstract and general question. I'm interested in the inherent (as well as implementation-specific) properties of different approaches to persist unstructured data with both lots of internal references (graph-like) and lots of…
mb21
  • 34,845
  • 8
  • 116
  • 142
29
votes
4 answers

Simple example of reification in RDF

Could anybody be so kind to give me a simple example of reification in RDF? I want to see if I understood it correctly. For example, I propose the following case Tolkien -> wrote -> Lord of the rings /|\ | Wikipedia…
Stefano Borini
  • 138,652
  • 96
  • 297
  • 431
1
2 3
99 100