Table of Contents



pears.ReferenceMasterQuestion

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

Description

Which questions to include in the reference request

Columns

Column Type Null Default Comment
ReferenceMasterQuestionID char(20) NOT NULL
ReferenceMasterID char(20) NOT NULL
taglocation char(3) NOT NULL
instanceid char(20) NULL
tagid char(3) NOT NULL
sortorder smallint NULL

Primary Key

Foreign Keys

Constraint Columns References Delete/update action
ReferenceMaster ReferenceMasterID pears.ReferenceMaster (ReferenceMasterID) NOT NULL; ON DELETE CASCADE
tag taglocation, tagid pears.tag (taglocation, tagid) NOT NULL; ON DELETE CASCADE

Referenced By

Indexes

Triggers

Original SQL

-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."ReferenceMasterQuestion"
-- Table comment: Which questions to include in the reference request
-- Statement count: 4
 
CREATE TABLE "pears"."ReferenceMasterQuestion" (
    "ReferenceMasterQuestionID"      CHAR(20) NOT NULL
   ,"ReferenceMasterID"              CHAR(20) NOT NULL
   ,"taglocation"                    CHAR(3) NOT NULL
   ,"instanceid"                     CHAR(20) NULL COMPUTE ("ReferenceMasterID")
   ,"tagid"                          CHAR(3) NOT NULL
   ,"sortorder"                      SMALLINT NULL
   ,PRIMARY KEY ("ReferenceMasterQuestionID" ASC) 
)
GO
 
 
COMMENT ON TABLE "pears"."ReferenceMasterQuestion" IS 
	'Which questions to include in the reference request'
GO
 
 
ALTER TABLE "pears"."ReferenceMasterQuestion"
    ADD NOT NULL FOREIGN KEY "ReferenceMaster" ("ReferenceMasterID" ASC)
    REFERENCES "pears"."ReferenceMaster" ("ReferenceMasterID")
    ON DELETE CASCADE
GO
 
 
ALTER TABLE "pears"."ReferenceMasterQuestion"
    ADD NOT NULL FOREIGN KEY "tag" ("taglocation" ASC,"tagid" ASC)
    REFERENCES "pears"."tag" ("taglocation","tagid")
    ON DELETE CASCADE
GO