STUDENTCONSTITUENCYSETTINGS

Contains a list of settings for the student constituency that need to be used across all users and within the database.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
ISCONSTITUENTWHENCODE tinyint Default = 0 Determines the criteria by which a student is considered a constituent.
ISCONSTITUENTWHEN nvarchar(35) (Computed) yes CASE [ISCONSTITUENTWHENCODE] WHEN 0 THEN N'As soon as the student is enrolled' WHEN 1 THEN N'When the student becomes an alumnus' END Provides a translation for the 'ISCONSTITUENTWHENCODE' field.
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
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_STUDENTCONSTITUENCYSETTINGS_DATEADDED DATEADDED yes
IX_STUDENTCONSTITUENCYSETTINGS_DATECHANGED DATECHANGED
PK_STUDENTCONSTITUENCYSETTINGS ID yes yes

Triggers

Trigger Name Description
TR_STUDENTCONSTITUENCYSETTINGS_ONLYONEROW
TR_STUDENTCONSTITUENCYSETTINGS_AUDIT_UPDATE
TR_STUDENTCONSTITUENCYSETTINGS_AUDIT_DELETE