Notes about schema for rdf / first lab

Allikas: Lambda
Redaktsioon seisuga 7. veebruar 2020, kell 11:49 kasutajalt Tammet (arutelu | kaastöö) (Uus lehekülg: 'Notes written during the lecture: <pre> sql, rdf, json ============== object property value <a1> <name> "john"^^string <a1> <country> "usa"^^stri...')
(erin) ←Vanem redaktsioon | Viimane redaktsiooni (erin) | Uuem redaktsioon→ (erin)
Mine navigeerimisribale Mine otsikasti

Notes written during the lecture:

sql, rdf, json
==============

object    property   value            
<a1>      <name>     "john"^^string
<a1>      <country>  "usa"^^string

<a2>      <neighbour>  <a1>
  1          2         

geo:
  id: autoincrement int
  ts: timestamp
  status: boolean
  obj : varchar  / int
  prop : varchar / int
  val : varchar
  

names:
  id: autoincrement int
  name: <a1>
  
------
select obj from geo as geo1, geo as geo2 where 
geo1.prop='<name>' and geo1.val='"john"^^string' and
geo2.prop='<country>' and geo2.val='"usa"^^string' and
geo1.obj=geo2.obj

==========    

geojs


object    property   value            
<a1>      <name>     "john"^^string
<a1>      <name>     "pete"^^string
<a1>      <country>  "usa"^^string

id object info
   <a1>   {"<name>": ["john"^^string","pete"^^string], 
           "<country>":  ["usa"^^string"],
		   "<neighbour>":["<a1>","usa"^^string"]}

          [["<name>","john"^^string],
		   ["<name>","pete"^^string],
		   ["<country>"  "usa"^^string]]