SPONSORSHIPOPPORTUNITYGROUP

Groups of sponsorship opportunities as needed for assignment by programs.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
NAME nvarchar(100) Default = ''
SPONSORSHIPOPPORTUNITYTYPECODE tinyint Default = 1 1=Child, 2=Project
SPONSORSHIPOPPORTUNITYTYPE nvarchar(7) (Computed) yes CASE [SPONSORSHIPOPPORTUNITYTYPECODE] WHEN 1 THEN N'Child' WHEN 2 THEN N'Project' END Provides a translation for the 'SPONSORSHIPOPPORTUNITYTYPECODE' field.
SPONSORSPEROPPORTUNITY smallint Default = ((0)) The maximum number of sponsors allowed per opportunity in this group. A value of 0 means Unlimited.
OFFERSOLESPONSORSHIP bit Default = 0 True if the option of sole sponsorship should be offered for opportunities in this group.
OVERRIDESPONSORSPEROPPORTUNITY xml yes Location-specific overrides of the maximum number of sponsors allowed per opportunity and whether to offer sole sponsorship.
GENDERCODE tinyint Default = 0 A required gender for children in this group.
GENDER nvarchar(6) (Computed) yes CASE [GENDERCODE] WHEN 0 THEN N'Any' WHEN 1 THEN N'Male' WHEN 2 THEN N'Female' END Provides a translation for the 'GENDERCODE' field.
ISHIVPOSITIVECODE tinyint Default = 0 A required value for HIV Positive for children in this group.
ISHIVPOSITIVE nvarchar(3) (Computed) yes CASE [ISHIVPOSITIVECODE] WHEN 0 THEN N'Any' WHEN 1 THEN N'Yes' WHEN 2 THEN N'No' END Provides a translation for the 'ISHIVPOSITIVECODE' field.
HASCONDITIONCODE tinyint Default = 0 Whether a condition code is required or disallowed for children in this group.
HASCONDITION nvarchar(3) (Computed) yes CASE [HASCONDITIONCODE] WHEN 0 THEN N'Any' WHEN 1 THEN N'Yes' WHEN 2 THEN N'No' END Provides a translation for the 'HASCONDITIONCODE' field.
ISORPHANEDCODE tinyint Default = 0 A required value for Orphaned for children in this group.
ISORPHANED nvarchar(3) (Computed) yes CASE [ISORPHANEDCODE] WHEN 0 THEN N'Any' WHEN 1 THEN N'Yes' WHEN 2 THEN N'No' END Provides a translation for the 'ISORPHANEDCODE' field.
SEQUENCE int Default = 0
ISINACTIVE bit Default = 0
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
SPONSORSHIPLOCATIONID uniqueidentifier yes SPONSORSHIPLOCATION.ID A required location for opportunities in this group.
SPONSORSHIPOPPORTUNITYAGERANGEID uniqueidentifier yes SPONSORSHIPOPPORTUNITYAGERANGE.ID A required age range for children in this group.
SPROPPPROJECTCATEGORYCODEID uniqueidentifier yes SPROPPPROJECTCATEGORYCODE.ID A required category code for projects in this group.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_SPONSORSHIPOPPORTUNITYGROUP_DATEADDED DATEADDED yes
IX_SPONSORSHIPOPPORTUNITYGROUP_DATECHANGED DATECHANGED
IX_SPONSORSHIPOPPORTUNITYGROUP_SPONSORSHIPLOCATIONID SPONSORSHIPLOCATIONID
IX_SPONSORSHIPOPPORTUNITYGROUP_SPONSORSHIPOPPORTUNITYAGERANGEID SPONSORSHIPOPPORTUNITYAGERANGEID
IX_SPONSORSHIPOPPORTUNITYGROUP_SPROPPPROJECTCATEGORYCODEID SPROPPPROJECTCATEGORYCODEID
PK_SPONSORSHIPOPPORTUNITYGROUP ID yes yes
UC_SPONSORSHIPOPPORTUNITYGROUP_NAME NAME yes

Triggers

Trigger Name Description
TR_SPONSORSHIPOPPORTUNITYGROUP_AUDIT_UPDATE
TR_SPONSORSHIPOPPORTUNITYGROUP_AUDIT_DELETE

Referenced by

Referenced by Field
SPONSORSHIPOPPORTUNITY SPONSORSHIPOPPORTUNITYGROUPID
SPONSORSHIPOPPORTUNITYRESERVEPROCESS GROUPID
SPONSORSHIPPROGRAM SPONSORSHIPOPPORTUNITYGROUPID