Table of Contents



pears.DocumentStampDepartment

Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.

Description

Links Stamp Images to Departments. Images with no record are available for all Departments.

Columns

Column Type Null Default Comment
DocumentStampDepartmentID char(20) NOT NULL
DepartmentID char(2) NULL
DocumentStampID char(20) NULL

Primary Key

Foreign Keys

Constraint Columns References Delete/update action
Department DepartmentID pears.Department (departmentid) ON DELETE CASCADE
DocumentStamp DocumentStampID pears.DocumentStamp (DocumentStampID) ON DELETE CASCADE

Referenced By

Indexes

Triggers

Original SQL

-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."DocumentStampDepartment"
-- Table comment: Links Stamp Images to Departments. Images with no record are available for all Departments.
-- Statement count: 4
 
CREATE TABLE "pears"."DocumentStampDepartment" (
    "DocumentStampDepartmentID"      CHAR(20) NOT NULL
   ,"DepartmentID"                   CHAR(2) NULL
   ,"DocumentStampID"                CHAR(20) NULL
   ,PRIMARY KEY ("DocumentStampDepartmentID" ASC) 
)
GO
 
 
COMMENT ON TABLE "pears"."DocumentStampDepartment" IS 
	'Links Stamp Images to Departments. Images with no record are available for all Departments.'
GO
 
 
ALTER TABLE "pears"."DocumentStampDepartment"
    ADD FOREIGN KEY "Department" ("DepartmentID" ASC)
    REFERENCES "pears"."Department" ("departmentid")
    ON DELETE CASCADE
GO
 
 
ALTER TABLE "pears"."DocumentStampDepartment"
    ADD FOREIGN KEY "DocumentStamp" ("DocumentStampID" ASC)
    REFERENCES "pears"."DocumentStamp" ("DocumentStampID")
    ON DELETE CASCADE
GO