--
-- Provides for richer parent-child relationships than the simple
-- link encapsulated in the primary table. May be subclassed to provide
-- additional attributes.
--
CREATE TABLE cr_child_rels (
rel_id integer PRIMARY KEY NOT NULL,
parent_id integer NOT NULL,
child_id integer NOT NULL,
relation_tag varchar(100),
order_n integer,
CONSTRAINT cr_child_rels_rel_id_fk REFERENCES acs_objects ()
);
CREATE INDEX cr_child_rels_by_parent ON cr_child_rels (parent_id);
CREATE UNIQUE INDEX cr_child_rels_kids_idx ON cr_child_rels (child_id);
CREATE UNIQUE INDEX cr_child_rels_unq_id ON cr_child_rels (parent_id, child_id);
-- Table size: 16,384 bytes
-- Table rows: 117
Tables: