====== pears.CompliancePersonDomain ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Description =====
Linkage between Domains so several can apply
===== Columns =====
^ Column ^ Type ^ Null ^ Default ^ Comment ^
| **ComplianceDomainID** | char(20) | NOT NULL | | |
| **PersonID** | char(20) | NOT NULL | | |
===== Primary Key =====
* ComplianceDomainID, PersonID
===== Foreign Keys =====
^ Constraint ^ Columns ^ References ^ Delete/update action ^
| ComplianceDomain | ComplianceDomainID | [[database:tables:pears_compliancedomain|pears.ComplianceDomain (ComplianceDomainID)]] | NOT NULL; ON DELETE CASCADE |
| Person | PersonID | [[database:tables:pears_person|pears.Person (personid)]] | NOT NULL; ON DELETE CASCADE |
===== Referenced By =====
* No incoming foreign keys found.
===== Indexes =====
* No indexes found.
===== Triggers =====
* No triggers found.
===== Original SQL =====
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."CompliancePersonDomain"
-- Table comment: Linkage between Domains so several can apply
-- Statement count: 4
CREATE TABLE "pears"."CompliancePersonDomain" (
"ComplianceDomainID" char(20) NOT NULL
,"PersonID" char(20) NOT NULL
,PRIMARY KEY ("ComplianceDomainID" ASC,"PersonID" ASC)
)
go
COMMENT ON TABLE "pears"."CompliancePersonDomain" IS
'Linkage between Domains so several can apply'
go
ALTER TABLE "pears"."CompliancePersonDomain"
ADD NOT NULL FOREIGN KEY "ComplianceDomain" ("ComplianceDomainID" ASC)
REFERENCES "pears"."ComplianceDomain" ("ComplianceDomainID")
ON DELETE CASCADE
go
ALTER TABLE "pears"."CompliancePersonDomain"
ADD NOT NULL FOREIGN KEY "Person" ("PersonID" ASC)
REFERENCES "pears"."Person" ("personid")
ON DELETE CASCADE
go