MARRIAGERELATIONSHIP
Marriage relationships
Primary Key
Primary Key | Field Type |
---|---|
ID | uniqueidentifier |
Fields
Field | Field Type | Null | Notes | Description |
---|---|---|---|---|
SPOUSEGENDERCODE | tinyint | Default = 0 | 0=Unknown, 1=Male, 2=Female, 3=Any | |
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. |
SPOUSEGENDER | nvarchar(7) (Computed) | yes | CASE [SPOUSEGENDERCODE] WHEN 0 THEN N'Unknown' WHEN 1 THEN N'Male' WHEN 2 THEN N'Female' WHEN 3 THEN N'Any' END | Provides a translation for the 'SPOUSEGENDERCODE' field. |
Foreign Keys
Foreign Key | Field Type | Null | Notes | Description |
---|---|---|---|---|
SPOUSERELATIONSHIPTYPECODEID | uniqueidentifier | yes | RELATIONSHIPTYPECODE.ID | FK to RELATIONSHIPTYPECODE |
ADDEDBYID | uniqueidentifier | CHANGEAGENT.ID | FK to CHANGEAGENT. | |
CHANGEDBYID | uniqueidentifier | CHANGEAGENT.ID | FK to CHANGEAGENT. |
Indexes
Index Name | Fields | Unique | Primary | Clustered |
---|---|---|---|---|
IX_MARRIAGERELATIONSHIP_DATEADDED | DATEADDED | yes | ||
IX_MARRIAGERELATIONSHIP_DATECHANGED | DATECHANGED | |||
PK_MARRIAGERELATIONSHIP | ID | yes | yes |
Triggers
Trigger Name | Description |
---|---|
TR_MARRIAGERELATIONSHIP_AUDIT_UPDATE | |
TR_MARRIAGERELATIONSHIP_AUDIT_DELETE |
Referenced by
Referenced by | Field |
---|---|
MARRIAGERELATIONSHIPASSOCIATION | MARRIAGERELATIONSHIPID |