MKTSEGMENTPASSIVE

This table contains segment information specific to media outlets, time slots and marketing locations.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
IMPRESSIONS int Default = 0 The number of impressions expected for this segment.
INACTIVE bit Default = 0 Indicates that the segment is no longer active.
SCHEDULESTARTTIME time yes Indicates the start time of a time slot segment.
SCHEDULEENDTIME time yes Indicates the end time of a time slot segment.
SCHEDULEDURATION int Default = 0 The length of the time slot in seconds.
LOCATIONPOSTCODE nvarchar(12) Default = '' The marketing location's post code.
LOCATIONCITY nvarchar(50) Default = '' The marketing location's city.
LOCATIONADDRESSBLOCK nvarchar(150) Default = '' The marketing location's street address.
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.
IMPRESSIONCALCULATIONMETHODCODE tinyint Default = 0 The method to be used to determine the total number of impressions contributed to a marketing effort by the segment.
IMPRESSIONCALCULATIONMETHOD nvarchar(20) (Computed) yes CASE [IMPRESSIONCALCULATIONMETHODCODE] WHEN 0 THEN N'Per day' WHEN 1 THEN N'Per marketing effort' END Provides a translation for the 'IMPRESSIONCALCULATIONMETHODCODE' field.

Foreign Keys

Foreign Key Field Type Null Notes Description
ID uniqueidentifier MKTSEGMENT.ID Primary Key.
VENDORID uniqueidentifier yes VENDOR.ID The segment's vendor.
PARENTMEDIAOUTLETSEGMENTID uniqueidentifier yes MKTSEGMENT.ID The media outlet segment to which this time slot belongs.
LOCATIONCOUNTRYID uniqueidentifier yes COUNTRY.LOCALID The marketing location's country.
LOCATIONSTATEID uniqueidentifier yes STATE.LOCALID The marketing location's state.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_MKTSEGMENTPASSIVE_DATEADDED DATEADDED yes
IX_MKTSEGMENTPASSIVE_DATECHANGED DATECHANGED
IX_MKTSEGMENTPASSIVE_LOCATIONCOUNTRYID LOCATIONCOUNTRYID
IX_MKTSEGMENTPASSIVE_LOCATIONSTATEID LOCATIONSTATEID
IX_MKTSEGMENTPASSIVE_PARENTMEDIAOUTLETSEGMENTID PARENTMEDIAOUTLETSEGMENTID
IX_MKTSEGMENTPASSIVE_VENDORID VENDORID
PK_MKTSEGMENTPASSIVE ID yes yes

Triggers

Trigger Name Description
TR_MKTSEGMENTPASSIVE_AUDIT_UPDATE
TR_MKTSEGMENTPASSIVE_AUDIT_DELETE