RELATIONSHIP
This table stores relationships for constituents.
Primary Key
Primary Key |
Field Type |
ID |
uniqueidentifier |
Fields
Field |
Field Type |
Null |
Notes |
Description |
STARTDATE |
datetime |
yes |
|
Date that the relationship was established or became effective |
ENDDATE |
datetime |
yes |
|
Date that the relationship was dissolved or ceased to be effective |
ISSPOUSE |
bit |
|
Default = 0 |
Designates the relationship as a spouse record |
ISPRIMARYBUSINESS |
bit |
|
Default = 0 |
Designates the relationship as a primary business record |
ISCONTACT |
bit |
|
Default = 0 |
Designates the relationship as a contact record |
POSITION |
nvarchar(100) |
|
Default = '' |
Store the position value for records marked as contacts |
ISMATCHINGGIFTRELATIONSHIP |
bit |
|
Default = 0 |
The organization in the relationship will match the individual's gifts. |
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. |
ISPRIMARYCONTACT |
bit |
|
Default = 0 |
Indicates whether the contact is a primary contact |
COMMENTS |
nvarchar(max) |
|
Default = '' |
|
ISEMERGENCYCONTACT |
bit |
|
Default = 0 |
Indicates this relation is an emergency contact. |
RECEIVESREPORTCARD |
bit |
|
Default = 0 |
Indicates this relation receives report cards for the student. |
DESCRIPTION |
nvarchar(700) (Computed) |
yes |
dbo.UFN_RELATIONSHIP_DESCRIPTION(ID) |
Provides a translation field for the relationship record |
Foreign Keys
Foreign Key |
Field Type |
Null |
Notes |
Description |
RELATIONSHIPCONSTITUENTID |
uniqueidentifier |
|
CONSTITUENT.LOCALID
|
Stores the ID of the relationship constituent |
RECIPROCALCONSTITUENTID |
uniqueidentifier |
|
CONSTITUENT.LOCALID
|
Stores the ID of the reciprocal relationship constituent |
RELATIONSHIPTYPECODEID |
uniqueidentifier |
|
RELATIONSHIPTYPECODE.ID
|
Stores the relationship type for the relationship record |
RECIPROCALTYPECODEID |
uniqueidentifier |
|
RELATIONSHIPTYPECODE.ID
|
Stores the relationship type for the reciprocal relationship record |
CONTACTTYPECODEID |
uniqueidentifier |
yes |
CONTACTTYPECODE.LOCALID
|
Stores the contact type for records marked as contacts |
ADDEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
CHANGEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
RELATIONSHIPSETID |
uniqueidentifier |
yes |
RELATIONSHIPSET.ID
|
Stores the category of the job for this relationship |
Indexes
Index Name |
Fields |
Unique |
Primary |
Clustered |
IX_RELATIONSHIP_DATEADDED |
DATEADDED |
|
|
yes |
IX_RELATIONSHIP_DATECHANGED |
DATECHANGED |
|
|
|
IX_RELATIONSHIP_RECIPROCALCONSTITUENTID |
RECIPROCALCONSTITUENTID |
|
|
|
IX_RELATIONSHIP_RELATIONSHIPCONSTITUENTID |
RELATIONSHIPCONSTITUENTID |
|
|
|
IX_RELATIONSHIP_RELATIONSHIPTYPECODEID |
RELATIONSHIPTYPECODEID |
|
|
|
PK_RELATIONSHIP |
ID |
yes |
yes |
|
UIX_RELATIONSHIP_RELATIONSHIPCONSTITUENTID_RECIPROCALCONSTITUENTID_RELATIONSHIPTYPECODEID_RECIPROCALTYPECODEID |
RELATIONSHIPCONSTITUENTID, RECIPROCALCONSTITUENTID, RELATIONSHIPTYPECODEID, RECIPROCALTYPECODEID |
yes |
|
|
Triggers
Referenced by