MKTPACKAGEMATERIAL

Stores the link between a packages and their materials.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
DATEADDED datetime Default = getdate() Indicates the date this record was added.
DATECHANGED datetime Default = getdate() Indicates the date this record was last changed.
TS timestamp Timestamp.
TSLONG bigint (Computed) yes CONVERT(bigint, TS) Numeric representation of the timestamp.

Foreign Keys

Foreign Key Field Type Null Notes Description
PACKAGEID uniqueidentifier MKTPACKAGE.ID The package that contains one or more materials.
MATERIALID uniqueidentifier MKTMATERIAL.ID The material linked to the package.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_MKTPACKAGEMATERIAL_DATEADDED DATEADDED yes
IX_MKTPACKAGEMATERIAL_DATECHANGED DATECHANGED
IX_MKTPACKAGEMATERIAL_MATERIALID MATERIALID
PK_MKTPACKAGEMATERIAL ID yes yes
UIX_MKTPACKAGEMATERIAL_PACKAGEID_MATERIALID PACKAGEID, MATERIALID yes

Triggers

Trigger Name Description
TR_MKTPACKAGEMATERIAL_AUDIT_UPDATE
TR_MKTPACKAGEMATERIAL_AUDIT_DELETE