====== pears.PlacementElement ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Description =====
Instances of Placement Element Types for individual placements.
===== Columns =====
^ Column ^ Type ^ Null ^ Default ^ Comment ^
| **PlacementElementTypeID** | char(20) | NOT NULL | | |
| **PlacementID** | char(20) | NOT NULL | | |
| Value | long varchar | NULL | | |
| Volatile | smallint | NULL | | |
===== Primary Key =====
* PlacementElementTypeID, PlacementID
===== Foreign Keys =====
^ Constraint ^ Columns ^ References ^ Delete/update action ^
| PlacementElementType | PlacementElementTypeID | [[database:tables:pears_placementelementtype|pears.PlacementElementType (PlacementElementTypeID)]] | NOT NULL; |
| Placement | PlacementID | [[database:tables:pears_placement|pears.Placement (placementid)]] | 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"."PlacementElement"
-- Table comment: Instances of Placement Element Types for individual placements.
-- Statement count: 4
CREATE TABLE "pears"."PlacementElement" (
"PlacementElementTypeID" char(20) NOT NULL
,"PlacementID" char(20) NOT NULL
,"Value" long varchar NULL
,"Volatile" smallint NULL
,PRIMARY KEY ("PlacementElementTypeID" ASC,"PlacementID" ASC)
)
go
COMMENT ON TABLE "pears"."PlacementElement" IS
'Instances of Placement Element Types for individual placements.'
go
ALTER TABLE "pears"."PlacementElement"
ADD NOT NULL FOREIGN KEY "PlacementElementType" ("PlacementElementTypeID" ASC)
REFERENCES "pears"."PlacementElementType" ("PlacementElementTypeID")
go
ALTER TABLE "pears"."PlacementElement"
ADD NOT NULL FOREIGN KEY "Placement" ("PlacementID" ASC)
REFERENCES "pears"."Placement" ("placementid")
ON DELETE CASCADE
go