pears.deptmaintenance

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

Records which staff members have manintenace rights in which department.

Column Type Null Default Comment
departmentid char(2) NOT NULL
staffid char(20) NOT NULL
  • departmentid, staffid
Constraint Columns References Delete/update action
department departmentid pears.Department (departmentid) NOT NULL;
staff staffid pears.staff (staffid) NOT NULL;
  • No incoming foreign keys found.
  • No indexes found.
  • No triggers found.
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."deptmaintenance"
-- Table comment: Records which staff members have manintenace rights in which department.
-- Statement count: 4
 
CREATE TABLE "pears"."deptmaintenance" (
    "departmentid"                   CHAR(2) NOT NULL
   ,"staffid"                        CHAR(20) NOT NULL
   ,PRIMARY KEY ("departmentid" ASC,"staffid" ASC) 
)
GO
 
 
COMMENT ON TABLE "pears"."deptmaintenance" IS 
	'Records which staff members have manintenace rights in which department.'
GO
 
 
ALTER TABLE "pears"."deptmaintenance"
    ADD NOT NULL FOREIGN KEY "department" ("departmentid" ASC)
    REFERENCES "pears"."Department" ("departmentid")
GO
 
 
ALTER TABLE "pears"."deptmaintenance"
    ADD NOT NULL FOREIGN KEY "staff" ("staffid" ASC)
    REFERENCES "pears"."staff" ("staffid")
GO
  • database/tables/pears_deptmaintenance.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1