Triple Store

create view TRIPLE as ( <query> )

Schema TRIPLE/(subject, property, object)

ER Diagram Modification

<query> - union of queries QTi over each of the other tables Ti

Qti = 
(select OID as subject, 'in' as property, 'Ti' as object from Ti)
    union
(select OID as subject, 'A1' as property, A1 as object from Ti)
    union
    ...
    union
(select OID as subject, 'An' as property, An as object from Ti)  
Note

  • Data in TRIPLE replicates data in all other tables
    • All queries over a triple store schema have equivalent formulations that only mention TRIPLE
  • A relational schema with single TRIPLE table can replicate any relational database
    • Never requires revision
  • Replacing OID with URI roughly obtains a RDF encoding of data
    • Resource Description Framework (RDF)
  • Graphical Data Models
    • Each column subject or object as a graph node and each tuple in TRIPLE as a labelled graph edge