BANK

This table extends the constituent table and contains bank-specific fields.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
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.
DEFAULTROUTINGNUMBER nvarchar(4000) Default = '' Default routing number to be used on all accounts that belong to this bank.
DEFAULTSORTCODE nvarchar(8) Default = '' User-defined sort code for the UK
DEFAULTBIC nvarchar(11) Default = ''
DEFAULTBANKCODE nvarchar(25) Default = ''

Foreign Keys

Foreign Key Field Type Null Notes Description
ID uniqueidentifier CONSTITUENT.LOCALID Primary Key.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
DEFAULTBANKINGSYSTEMID uniqueidentifier yes BANKINGSYSTEM.ID

Indexes

Index Name Fields Unique Primary Clustered
IX_BANK_DATEADDED DATEADDED yes
IX_BANK_DATECHANGED DATECHANGED
PK_BANK ID yes yes

Triggers

Trigger Name Description
TR_BANK_AUDIT_UPDATE
TR_BANK_AUDIT_DELETE

Referenced by

Referenced by Field
BANKACCOUNT BANKID