Rdf example developed during lecture

Allikas: Lambda

Three representations: relational database tables, "ordinary" logic and rdf triplets:

Relational database tables:

people

id    name  salary  
1     jaan   100
2     ants   200

cars

id  model owner
1   opel    1
2   ford    2
3   volvo   2

"Ordinary" logic:


people(1,jaan,100)
people(2,ants,200)
cars(1,opel,1)
cars(2,ford,2)
cars(3,volvo,2)

Rdf-style triplets (not in any concrete syntax):

tanel_people1  rdf:type  people
tanel_people2  rdf:type  people
tanel_people1   name    "jaan"
tanel_people1   salary  100 
tanel_people2   name    "ants"
tanel_people2   salary  200

tanel_cars1  rdf:type  cars
tanel_cars2  rdf:type  cars
tanel_cars3  rdf:type  cars
tanel_cars1  model  "opel"
tanel_cars1  owner  tanel_people1
tanel_cars2  model  "ford"
tanel_cars2  owner  tanel_people2
tanel_cars3  model  "volvo"
tanel_cars3  owner  tanel_people2