I model a conceptual ontology as a polytree .
Using the edge list model , this will be:
CREATE TABLE nodes(
nodeID CHAR(1) PRIMARY KEY
);
CREATE TABLE edges(
childID CHAR(1) NOT NULL,
parentID CHAR(1) NOT NULL,
PRIMARY KEY(childID,parentID)
);
My problem is how can I model it in SQL so that the nodes can have other properties like "types". For instance.
(father-node) **Music**
It has
(child-node) **jazz** [type: genre], **soul** [type: genre]
(child-node) **concert** [type: performed], **DJ set** [type: performed]
source
share