Difference between revisions of "Triple"

From BITPlan Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
The term "Triple" is being used in Semantic Web Technology. {{Link|target=http://en.wikipedia.org/wiki/Triple|title=The english wikipedia article on "Triple"}} describes a triple
 
The term "Triple" is being used in Semantic Web Technology. {{Link|target=http://en.wikipedia.org/wiki/Triple|title=The english wikipedia article on "Triple"}} describes a triple
 
as {{Link|target=http://en.wikipedia.org/wiki/Resource_Description_Framework|title=The atomic data entity in the Resource Description Framework}}
 
as {{Link|target=http://en.wikipedia.org/wiki/Resource_Description_Framework|title=The atomic data entity in the Resource Description Framework}}
 +
 +
== Three part structure ==
 +
A Triple consists of
 +
# subject
 +
# predicate
 +
# object
 +
=== Examples for triples ===
 +
Here are some triples:
 +
<source lang='xml' id='dadlovesmum'>
 +
dad loves mum
 +
kid loves mum
 +
kid loves dad
 +
dad hates sister_in_law
 +
sister_in_law likes mum
 +
kid likes granny
 +
</source>
 +
=== Natural graph representation of triples ===
 +
Each Triple of subject - predicate - object can be presented as a graph. The above triples would
 +
e.g. be represented as:
 +
<graphviz format='svg'>
 +
digraph  {
 +
  rankdir="TB";
 +
    "dad" -> "mum" [label="loves"];
 +
    "dad" -> "sister_in_law" [label="hates"];
 +
    "kid" -> "mum" [label="loves"];
 +
    "kid" -> "dad" [label="loves"];
 +
    "kid" -> "granny" [label="likes"];
 +
    "sister_in_law" -> "mum" [label="likes"];
 +
  }
 +
</graphviz>

Revision as of 14:45, 8 January 2018

The term "Triple" is being used in Semantic Web Technology. The english wikipedia article on "Triple" describes a triple as The atomic data entity in the Resource Description Framework

Three part structure

A Triple consists of

  1. subject
  2. predicate
  3. object

Examples for triples

Here are some triples:

dad loves mum
kid loves mum
kid loves dad
dad hates sister_in_law
sister_in_law likes mum
kid likes granny

Natural graph representation of triples

Each Triple of subject - predicate - object can be presented as a graph. The above triples would e.g. be represented as: