Primary Key Field Type
 ID uniqueidentifier

Field Field Type Null Notes Description
 FIRSTNAME nvarchar(50)   Default = '' For individuals, stores the first name.
 MIDDLENAME nvarchar(50)   Default = '' For individuals, stores the middle name.
 LASTNAME nvarchar(100)   Default = '' Last name of child
 GENDERCODE tinyint   Default = 0 0=Unknown, 1=Male, 2=Female
 GENDER nvarchar(7) (Computed) CASE [GENDERCODE] WHEN 0 THEN N'Unknown' WHEN 1 THEN N'Male' WHEN 2 THEN N'Female' END Provides a translation for the 'GENDERCODE' field.
 BIRTHDATE UDT_FUZZYDATE   Default = '00000000' For individuals, stores the date of birth.
 ISHIVPOSITIVE bit   Default = 0 Indicates if child sponsorship opportunity is HIV+
 ISORPHANED bit   Default = 0 Indicates if a child sponsorship opportunity is an orphan
 PICTURE varbinary A photo or emblem for this child.
 PICTURETHUMBNAIL varbinary
 NAME nvarchar(154) (Computed) CASE FIRSTNAME WHEN '' THEN '' ELSE FIRSTNAME + ' ' END + CASE MIDDLENAME WHEN '' THEN '' ELSE LEFT(MIDDLENAME,1) + '. ' END + LASTNAME Returns the child name (First + Middle Initial + Last (individuals)).
 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.
 AGE int (Computed) dbo.UFN_CONSTITUENT_GETAGE(SPONSORSHIPOPPORTUNITYCHILD.CONSTITUENTID) For child, returns the age.

Foreign Key Field Type Null Notes Description
 ID uniqueidentifier   SPONSORSHIPOPPORTUNITY.ID Primary Key.
 SPROPPCHILDCONDITIONCODEID uniqueidentifier SPROPPCHILDCONDITIONCODE.ID FK to SPROPPCHILDCONDITIONCODE
 ADDEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 CHANGEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 CONSTITUENTID uniqueidentifier   CONSTITUENT.LOCALID Constituent record for this child

Index Name Field(s) Unique Primary Clustered
 IX_SPONSORSHIPOPPORTUNITYCHILD_DATEADDED DATEADDED    
 IX_SPONSORSHIPOPPORTUNITYCHILD_DATECHANGED DATECHANGED      
 IX_SPONSORSHIPOPPORTUNITYCHILD_SPROPPCHILDCONDITIONCODEID SPROPPCHILDCONDITIONCODEID      
 PK_SPONSORSHIPOPPORTUNITYCHILD ID  
 UC_SPONSORSHIPOPPORTUNITYCHILD_CONSTITUENTID CONSTITUENTID    

Trigger Name Description
 TR_SPONSORSHIPOPPORTUNITYCHILD_AUDIT_UPDATE
 TR_SPONSORSHIPOPPORTUNITYCHILD_AUDIT_DELETE

Entity-Relationship diagram of this table