FIRSTNAMES

Used to help determine gender code by first name

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
FIRSTNAME nvarchar(50) Default = '' Contains first names.
GENDERCODE tinyint Default = 0 0=Unknown, 1=Male, 2=Female
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.
GENDER nvarchar(6) (Computed) yes CASE [GENDERCODE] WHEN 0 THEN N'Any' WHEN 1 THEN N'Male' WHEN 2 THEN N'Female' END

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_FIRSTNAMES_DATEADDED DATEADDED yes
IX_FIRSTNAMES_DATECHANGED DATECHANGED
PK_FIRSTNAMES ID yes yes
UC_FIRSTNAMES_FIRSTNAME FIRSTNAME yes

Triggers

Trigger Name Description
TR_FIRSTNAMES_AUDIT_UPDATE
TR_FIRSTNAMES_AUDIT_DELETE