Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
Link between Person and Staff
| Column | Type | Null | Default | Comment |
|---|---|---|---|---|
| PersonID | char(20) | NOT NULL | ||
| StaffID | char(20) | NOT NULL |
| Constraint | Columns | References | Delete/update action |
|---|---|---|---|
| PersonInterest1 | PersonID | pears.Person (personid) | NOT NULL; ON DELETE CASCADE |
| PersonInterest2 | StaffID | pears.staff (staffid) | NOT NULL; ON DELETE CASCADE |
-- IQX database structure split by table -- Source: IQXDatabaseStructure - with comments.sql -- Table: "pears"."PersonInterest" -- Table comment: Link between Person and Staff -- Statement count: 4 CREATE TABLE "pears"."PersonInterest" ( "PersonID" CHAR(20) NOT NULL ,"StaffID" CHAR(20) NOT NULL ,PRIMARY KEY ("PersonID" ASC,"StaffID" ASC) ) GO COMMENT ON TABLE "pears"."PersonInterest" IS 'Link between Person and Staff' GO ALTER TABLE "pears"."PersonInterest" ADD NOT NULL FOREIGN KEY "PersonInterest1" ("PersonID" ASC) REFERENCES "pears"."Person" ("personid") ON DELETE CASCADE GO ALTER TABLE "pears"."PersonInterest" ADD NOT NULL FOREIGN KEY "PersonInterest2" ("StaffID" ASC) REFERENCES "pears"."staff" ("staffid") ON DELETE CASCADE GO