RELATIONSHIPCONFIGURATIONCORPORATE

This is a single row table that holds the corporate relationship settings

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
CREATEPARENTOFPARENTRELATIONSHIP bit Default = 0 Designates whether parent of parent relationships should be created
CREATETOPPARENTRELATIONSHIP bit Default = 0 Designates whether top level parent relation to the subsidiary should be defined differently
SETENDDATE bit Default = 0 Determines whether an end date should be set for defunct relationships when an intermediate parent changes.
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.

Foreign Keys

Foreign Key Field Type Null Notes Description
PARENTORGID uniqueidentifier RELATIONSHIPTYPECODE.ID Stores the relationship type for the parent relationship record
SUBSIDIARYORGID uniqueidentifier RELATIONSHIPTYPECODE.ID Stores the relationship type for the subsidiary org relationship record
PARENTOFPARENTORGID uniqueidentifier yes RELATIONSHIPTYPECODE.ID Stores the relationship type for the parent of parent relationship record
PARENTOFPARENTSUBSIDIARYORGID uniqueidentifier yes RELATIONSHIPTYPECODE.ID Stores the relationship type for the parent of parent subsidiary relationship record
TOPPARENTORGID uniqueidentifier yes RELATIONSHIPTYPECODE.ID Stores the relationship type for the top level parent relationship record
TOPSUBSIDIARYORGID uniqueidentifier yes RELATIONSHIPTYPECODE.ID Stores the relationship type for the top level parent subsidiary relationship record
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_RELATIONSHIPCONFIGURATIONCORPORATE_DATEADDED DATEADDED yes
IX_RELATIONSHIPCONFIGURATIONCORPORATE_DATECHANGED DATECHANGED
PK_RELATIONSHIPCONFIGURATIONCORPORATE ID yes yes

Triggers

Trigger Name Description
TR_RELATIONSHIPCONFIGURATIONCORPORATE_AUDIT_UPDATE
TR_RELATIONSHIPCONFIGURATIONCORPORATE_AUDIT_DELETE