SPONSORSHIPOPPORTUNITYRESERVATIONCOUNTS

Table for holding the selection counts for reserving children.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
GENDERCODE tinyint Default = 0 0=Any, 1=Male, 2=Female
GENDER nvarchar(6) (Computed) yes CASE [GENDERCODE] WHEN 0 THEN N'Any' WHEN 1 THEN N'Male' WHEN 2 THEN N'Female' END Provides a translation for the 'GENDERCODE' field.
INITIALCOUNT int Default = 0
NEWCOUNT int Default = 0
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
AGERANGEID uniqueidentifier yes SPONSORSHIPOPPORTUNITYAGERANGE.ID FK to SPONSORSHIPOPPORTUNITYAGERANGE
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_SPONSORSHIPOPPORTUNITYRESERVATIONCOUNTS_DATEADDED DATEADDED yes
IX_SPONSORSHIPOPPORTUNITYRESERVATIONCOUNTS_DATECHANGED DATECHANGED
PK_SPONSORSHIPOPPORTUNITYRESERVATIONCOUNTS ID yes yes

Triggers

Trigger Name Description
TR_SPONSORSHIPOPPORTUNITYRESERVATIONCOUNTS_AUDIT_UPDATE
TR_SPONSORSHIPOPPORTUNITYRESERVATIONCOUNTS_AUDIT_DELETE