MERCHANDISEPRODUCTSALESMETHOD

A mapping table between sales method and merchandise item record types.

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
MERCHANDISEPRODUCTID uniqueidentifier yes MERCHANDISEPRODUCT.ID The product record ID.
SALESMETHODID uniqueidentifier yes SALESMETHOD.ID The sales method record ID.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_MERCHANDISEPRODUCTSALESMETHOD_DATEADDED DATEADDED yes
IX_MERCHANDISEPRODUCTSALESMETHOD_DATECHANGED DATECHANGED
PK_MERCHANDISEPRODUCTSALESMETHOD ID yes yes

Triggers

Trigger Name Description
TR_MERCHANDISEPRODUCTSALESMETHOD_AUDIT_UPDATE
TR_MERCHANDISEPRODUCTSALESMETHOD_AUDIT_DELETE