Difference between revisions of "Relation Table"
Jump to navigation
Jump to search
| Line 3: | Line 3: | ||
<source lang="SQL"> | <source lang="SQL"> | ||
| − | CREATE TABLE "Relation" ( | + | CREATE TABLE "Relation" |
| − | + | ( | |
| − | + | "A_ID" uuid NOT NULL, | |
| − | + | "B_ID" uuid NOT NULL, | |
| − | + | "A_ObjectTypeID" smallint NOT NULL, | |
| − | + | "B_ObjectTypeID" smallint NOT NULL, | |
| − | + | "RelationTypeID" integer NOT NULL, | |
| − | + | "SourceID" uuid NOT NULL, | |
| + | "SourceObjectTypeID" smallint NOT NULL | ||
); | ); | ||
</source> | </source> | ||
Revision as of 08:53, 8 December 2020
This table stores the relationships between things in Truxton. This is how the graph of Truxton objects is stored.
CREATE TABLE "Relation"
(
"A_ID" uuid NOT NULL,
"B_ID" uuid NOT NULL,
"A_ObjectTypeID" smallint NOT NULL,
"B_ObjectTypeID" smallint NOT NULL,
"RelationTypeID" integer NOT NULL,
"SourceID" uuid NOT NULL,
"SourceObjectTypeID" smallint NOT NULL
);