Draft Paper: graph_database.pdf
An entity-relationship (type) diagram
with an existing association
can be generalized in the following way:
(TO): Topic / Entity
[TT]: Topic Type / Entity Type
{OT}: Occurrence Type / Attribute Type
<<AT>>: Association Type / Relationship
<RT>: Role Type / Role
This "typed" hypergraph can be implemented with the following relational database schema and primary keys:
TOPIC_TYPE [ TYPE_ID, TYPE_NAME ]
OCC_TYPE [ OCC_TYPE_ID, OCC_TYPE_NAME ]
ROLE_TYPE [ ROLE_TYPE_ID, ASSOC_TYPE_ID, ROLE_TYPE_NAME ]
ASSOC_TYPE [ ASSOC_TYPE_ID, ASSOC_TYPE_NAME ]
TOPIC [ TOPIC_ID, TOPIC_NAME, TYPE_ID ]
OCC [ OCC_ID, OCC_TYPE_ID, OCC_VALUE, TOPIC_ID ]
ASSOC_ROLE [ ASSOC_ID, TOPIC_ID, ROLE_TYPE_ID ]
*OCC_BYTES [ OCC_BYTES_ID, OCC_BVALUE ] *(for binary data)