Primary Key Field Type
 ID uniqueidentifier

Field Field Type Null Notes Description
 NAME nvarchar(100)   Default = '' A name for the attachment.
 DESCRIPTION nvarchar(255)   Default = '' A description about the attachment.
 FILENAME nvarchar(255)   Default = '' The original file name for the attachment.
 FILE varbinary   The actual file for the attachment.
 FILETHUMBNAIL varbinary For image files, a thumbnail image, otherwise empty.
 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
 MARKETINGPLANITEMID uniqueidentifier   MKTMARKETINGPLANITEM.ID The marketing plan item to which this attachment belongs.
 ATTACHMENTTYPECODEID uniqueidentifier   MKTATTACHMENTTYPECODE.ID The type of attachment associated with a marketing plan item.
 ADDEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 CHANGEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.

Index Name Field(s) Unique Primary Clustered
 IX_MKTMARKETINGPLANITEMATTACHMENT_DATEADDED DATEADDED    
 IX_MKTMARKETINGPLANITEMATTACHMENT_DATECHANGED DATECHANGED      
 IX_MKTMARKETINGPLANITEMATTACHMENT_MARKETINGPLANITEMID MARKETINGPLANITEMID      
 PK_MKTMARKETINGPLANITEMATTACHMENT ID  
 UC_MKTMARKETINGPLANITEMATTACHMENT_NAME NAME    

Trigger Name Description
 TR_MKTMARKETINGPLANITEMATTACHMENT_AUDIT_UPDATE
 TR_MKTMARKETINGPLANITEMATTACHMENT_AUDIT_DELETE

Entity-Relationship diagram of this table