What is a triple?

Triples (also known as facts) are a way to express graph data.
A triple consists of three components: A subject, a predicate, and an object.

For example, we might say:

:john a :Doctor .


This triple can be broken down like this:
Subject : John
Predicate : a
Object : Doctor

The predicate describes the relationship between two nodes (or a node and a literal—a string, number, date, etc.), one the subject and the other the object. Each node can be both a subject and object simultaneously if it’s used in more than one triple.

If we add multiple triples together, we can start to build a graph:

:john a :Doctor .
:john :hasAge 46 .
:marina a :Doctor .
:marina :hasAge 45 .
:marina :marriedTo :john.
:alice :hasMother:marina .
:alice :hasFather :john.
:marriedTo aowl:SymmetricProperty .

Triples are a part of the RDF (Resource Description Framework) data model, and they have one additional and very important constraint—every item in an RDF triple must be uniquely identifiable via IRI, with the exception of blank nodes. According to the RDF standards, IRIs must take the form of a web address, but stripped back to its most basic utility, a IRI acts as label for each item.

 

<http://rdfox.com/triple-example#john>

 

This absolute unambiguity means the knowledge graph can be queried and reasoned over which is the source of RDFs power.

Down arrow icon.