MKTSOURCECODEMAPPART

Stores all of the unique source code parts for a given source code in a marketing effort.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
CODE nvarchar(11) Default = '' The value for the source code part.
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
MKTSOURCECODEMAPID uniqueidentifier MKTSOURCECODEMAP.ID The source code map this part belongs to.
MKTSOURCECODEPARTDEFINITIONID uniqueidentifier MKTSOURCECODEPARTDEFINITION.ID The source code part definition that describes this part.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
MKTSOURCECODEPARTDEFINITIONVALUESID uniqueidentifier yes MKTSOURCECODEPARTDEFINITIONVALUES.ID The source code part definition value that describes this part.

Indexes

Index Name Fields Unique Primary Clustered
IX_MKTSOURCECODEMAPPART_DATEADDED DATEADDED yes
IX_MKTSOURCECODEMAPPART_DATECHANGED DATECHANGED
IX_MKTSOURCECODEMAPPART_MKTSOURCECODEPARTDEFINITIONID MKTSOURCECODEPARTDEFINITIONID
IX_MKTSOURCECODEMAPPART_MKTSOURCECODEPARTDEFINITIONVALUESID MKTSOURCECODEPARTDEFINITIONVALUESID
PK_MKTSOURCECODEMAPPART ID yes yes
UIX_MKTSOURCECODEMAPPART_MKTSOURCECODEMAPID_MKTSOURCECODEPARTDEFINITIONID MKTSOURCECODEMAPID, MKTSOURCECODEPARTDEFINITIONID yes

Triggers

Trigger Name Description
TR_MKTSOURCECODEMAPPART_AUDIT_ETLDELETEDID
TR_MKTSOURCECODEMAPPART_AUDIT_UPDATE
TR_MKTSOURCECODEMAPPART_AUDIT_DELETE