ORGANIZATIONDATA

This table contains constituent information specific to organizations.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
NUMEMPLOYEES int Default = 0 For organizations, stores the number of employees.
NUMSUBSIDIARIES int Default = 0 For organizations, stores the number of subsidiary organizations.
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.
ISPRIMARY bit Default = 0 True if the organization is marked as a primary organization.

Foreign Keys

Foreign Key Field Type Null Notes Description
ID uniqueidentifier CONSTITUENT.LOCALID Primary Key.
INDUSTRYCODEID uniqueidentifier yes INDUSTRYCODE.LOCALID FK to INDUSTRYCODE
PARENTCORPID uniqueidentifier yes CONSTITUENT.LOCALID FK to CONSTITUENT
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_ORGANIZATIONDATA_DATEADDED DATEADDED yes
IX_ORGANIZATIONDATA_DATECHANGED DATECHANGED
IX_ORGANIZATIONDATA_PARENTCORPID PARENTCORPID
PK_ORGANIZATIONDATA ID yes yes

Triggers

Trigger Name Description
TR_ORGANIZATIONDATA_AUDIT_UPDATE
TR_ORGANIZATIONDATA_AUDIT_DELETE
TR_ORGANIZATIONDATA_INSERTUPDATE