Primary Key Field Type
 ID uniqueidentifier

Field Field Type Null Notes Description
 DATEFROM date Lower end of date range for which this constituency code is applicable.
 DATETO date Upper end of date range for which this constituency code is applicable.
 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
 CONSTITUENTID uniqueidentifier   CONSTITUENT.LOCALID The constituent for which the constituency is valid.
 CONSTITUENCYCODEID uniqueidentifier   CONSTITUENCYCODE.LOCALID The associated user defined constituency.
 ADDEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 CHANGEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.

Index Name Field(s) Unique Primary Clustered
 IX_CONSTITUENCY_CONSTITUENTID CONSTITUENTID      
 IX_CONSTITUENCY_DATEADDED DATEADDED    
 IX_CONSTITUENCY_DATECHANGED DATECHANGED      
 PK_CONSTITUENCY ID  

Trigger Name Description
 TR_CONSTITUENCY_AUDIT_ETLDELETEDID
 TR_CONSTITUENCY_MARKASCONSTITUENT
 TR_CONSTITUENCY_TASYNC_I
 TR_CONSTITUENCY_TASYNC_U
 TR_CONSTITUENCY_TASYNC_D
 TR_CONSTITUENCY_AUDIT_UPDATE
 TR_CONSTITUENCY_AUDIT_DELETE

Referenced by Field
 BATCHCONSTITUENTUPDATECONSTITUENCIES ORIGINALCONSTITUENCYID

Entity-Relationship diagram of this table