BATCHCONSTITUENTCONSTITUENCY

Stores the constituent batch user-defined constituency information.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
DATEFROM date yes
DATETO date yes
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.
SEQUENCE int Default = 0

Foreign Keys

Foreign Key Field Type Null Notes Description
BATCHCONSTITUENTID uniqueidentifier BATCHCONSTITUENT.ID FK to BATCHCONSTITUENT
CONSTITUENCYCODEID uniqueidentifier CONSTITUENCYCODE.LOCALID FK to CONSTITUENCYCODE
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_BATCHCONSTITUENTCONSTITUENCY_BATCHCONSTITUENTID BATCHCONSTITUENTID
IX_BATCHCONSTITUENTCONSTITUENCY_DATEADDED DATEADDED yes
IX_BATCHCONSTITUENTCONSTITUENCY_DATECHANGED DATECHANGED
PK_BATCHCONSTITUENTCONSTITUENCY ID yes yes

Triggers

Trigger Name Description
TR_BATCHCONSTITUENTCONSTITUENCY_AUDIT_UPDATE
TR_BATCHCONSTITUENTCONSTITUENCY_AUDIT_DELETE