Primary Key Field Type
 ID uniqueidentifier

Field Field Type Null Notes Description
 DESCRIPTION nvarchar(60)   Default = '' User defined description for the relationship rule.
 CUSTOMIDENTIFIER nvarchar(100)   Default = '' User-definable custom identifier.
 SEQUENCEID int   Identity column used to increment the default lookupid.
 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) CONVERT(bigint, TS) Numeric representation of the timestamp.
 RELATIONSHIPID nvarchar(60)   Default = '' User defined ID for the relationship rule.
 LOOKUPID nvarchar(100) (Computed) (CASE LEN(CUSTOMIDENTIFIER) WHEN 0 THEN '8-' + CAST(SEQUENCEID AS nvarchar(20)) ELSE CUSTOMIDENTIFIER END) Unique identifer that supports user defined values as well as system generated values.
 RESTRICTIONCODE tinyint   Default = 1 Whether this relationship allows or restricts elements.
 RESTRICTION nvarchar(55) (Computed) CASE [RESTRICTIONCODE] WHEN 1 THEN N'Allow use of selected elements with basis element(s)' WHEN 2 THEN N'Restrict use of selected elements with basis element(s)' END Provides a translation for the 'RESTRICTIONCODE' field.

Foreign Key Field Type Null Notes Description
 BASEELEMENTACCOUNTSTRUCTUREID uniqueidentifier   PDACCOUNTSTRUCTURE.ID Refers to the accounting element this represents.
 ADDEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 CHANGEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.

Index Name Field(s) Unique Primary Clustered
 IX_ACCOUNTINGELEMENTRELATIONSHIP_BASEELEMENTACCOUNTSTRUCTUREID BASEELEMENTACCOUNTSTRUCTUREID      
 IX_ACCOUNTINGELEMENTRELATIONSHIP_DATEADDED DATEADDED    
 IX_ACCOUNTINGELEMENTRELATIONSHIP_DATECHANGED DATECHANGED      
 PK_ACCOUNTINGELEMENTRELATIONSHIP ID  
 UC_ACCOUNTINGELEMENTRELATIONSHIP_DESCRIPTION DESCRIPTION    
 UC_ACCOUNTINGELEMENTRELATIONSHIP_LOOKUPID LOOKUPID    
 UC_ACCOUNTINGELEMENTRELATIONSHIP_RELATIONSHIPID RELATIONSHIPID    

Trigger Name Description
 TR_ACCOUNTINGELEMENTRELATIONSHIP_AUDIT_UPDATE
 TR_ACCOUNTINGELEMENTRELATIONSHIP_AUDIT_DELETE

Referenced by Field
 ACCOUNTINGELEMENTRELATIONSHIPDETAIL ACCOUNTINGELEMENTRELATIONSHIPID
 ACCOUNTINGELEMENTRELATIONSHIPELEMENTPARAMETER ACCOUNTINGELEMENTRELATIONSHIPID
 ACCOUNTINGELEMENTRELATIONSHIPQUERYPARAMETER ACCOUNTINGELEMENTRELATIONSHIPID

Entity-Relationship diagram of this table