Primary Key Field Type
 ID uniqueidentifier

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) CONVERT(bigint, TS) Numeric representation of the timestamp.

Foreign Key Field Type Null Notes Description
 ID uniqueidentifier   SALESORDERITEM.ID Primary Key.
 MERCHANDISEPRODUCTINSTANCEID uniqueidentifier   MERCHANDISEPRODUCTINSTANCE.ID The product instance being sold.
 ADDEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 CHANGEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 MERCHANDISEDEPARTMENTID uniqueidentifier   MERCHANDISEDEPARTMENT.ID The department to which the product belonged at time of sale.
 MERCHANDISEDEPARTMENTCATEGORYID uniqueidentifier MERCHANDISEDEPARTMENTCATEGORY.ID The category to which the product belonged at time of sale.
 MERCHANDISEPRODUCTINSTANCEOPTIONVALUE1ID uniqueidentifier MERCHANDISEPRODUCTOPTIONVALUE.ID Option value 1 at sale time.
 MERCHANDISEPRODUCTINSTANCEOPTIONVALUE2ID uniqueidentifier MERCHANDISEPRODUCTOPTIONVALUE.ID Option value 2 at sale time.
 MERCHANDISEPRODUCTINSTANCEOPTIONVALUE3ID uniqueidentifier MERCHANDISEPRODUCTOPTIONVALUE.ID Option value 3 at sale time.

Index Name Field(s) Unique Primary Clustered
 IX_SALESORDERITEMMERCHANDISE_DATEADDED DATEADDED    
 IX_SALESORDERITEMMERCHANDISE_DATECHANGED DATECHANGED      
 PK_SALESORDERITEMMERCHANDISE ID  

Trigger Name Description
 TR_SALESORDERITEMMERCHANDISE_AUDIT_UPDATE
 TR_SALESORDERITEMMERCHANDISE_AUDIT_DELETE

Entity-Relationship diagram of this table