A self describing graph schema
by
Jörg Baach
—
last modified
May 03, 2019 09:09 AM
2 years ago Christoph Pingel and myself designed a self describing graph schema.
This is just a public note, description will follow...
create (_sem_label:`Sem_Label` {`description`:"the meta label to label labels", `techname`:"Sem_Label"})
create (_description:`Sem_Property` {`description`:"longer description", `scalartype`:"string", `techname`:"description"})
create (_techname:`Sem_Property` {`description`:"internal scalar representation", `scalartype`:"string", `techname`:"techname"})
create (_sem_n_prop:`Sem_Relation` {`description`:"Sem_Label --Sem_N_PROP-> Sem_Property", `techname`:"Sem_N_PROP"})
create (_sem_r_prop:`Sem_Relation` {`description`:"Sem_Relation --Sem_R_PROP-> Sem_Property", `techname`:"Sem_R_PROP"})
create (_arity:`Sem_Property` {`description`:"How often can there be the element", `scalartype`:"string", `techname`:"arity"})
create (_sem_relation:`Sem_Label` {`description`:"used to define a type of relation", `techname`:"Sem_Relation"})
create (_sem_property:`Sem_Label` {`description`:"A description of property of semantic meta object", `techname`:"Sem_Property"})
create (_scalartype:`Sem_Property` {`description`:"Von welchem Typ ist der Wert", `scalartype`:"string", `techname`:"scalartype"})
create (_name:`Sem_Property` {`description`:"full name of thing", `scalartype`:"string", `techname`:"name"})
create (_person:`Sem_Label` {`description`:"a human", `techname`:"Person"})
create (_firstname:`Sem_Property` {`description`:"first name of a person", `scalartype`:"string", `techname`:"firstname"})
create (_lastname:`Sem_Property` {`description`:"last name of a person", `scalartype`:"string", `techname`:"lastname"})
create (_likes:`Sem_Relation` {`description`:"xoxoxo", `techname`:"LIKES"})
create (_bob:`Person` {`name`:"Bob"})
create (_alice:`Person` {`firstname`:"Alice", `lastname`:"Alison", `name`:"Alice Alison"})
create (_sem_label)-[:`Sem_N_PROP` {`arity`:"1"}]->(_description)
create (_sem_label)-[:`Sem_N_PROP` {`arity`:"1"}]->(_techname)
create (_sem_n_prop)-[:`Sem_R_PROP` {`arity`:1}]->(_arity)
create (_sem_r_prop)-[:`Sem_N_PROP` {`arity`:1}]->(_arity)
create (_sem_relation)-[:`Sem_N_PROP` {`arity`:"1"}]->(_techname)
create (_sem_relation)-[:`Sem_N_PROP` {`arity`:"1"}]->(_description)
create (_sem_property)-[:`Sem_N_PROP` {`arity`:1}]->(_scalartype)
create (_sem_property)-[:`Sem_N_PROP` {`arity`:1}]->(_description)
create (_sem_property)-[:`Sem_N_PROP` {`arity`:"1"}]->(_techname)
create (_person)-[:`Sem_N_PROP` {`arity`:"?"}]->(_lastname)
create (_person)-[:`Sem_N_PROP` {`arity`:"?"}]->(_firstname)
create (_person)-[:`Sem_N_PROP` {`arity`:"1"}]->(_name)
create (_bob)-[:`LIKES`]->(_alice)
create (_alice)-[:`LIKES`]->(_bob)
;
Visualized, it becomes this:
TODO: Explaination of things