Primary Key Field Type
 ID uniqueidentifier

Field Field Type Null Notes Description
 STARTDATE date Start date of the billing item price.
 ENDDATE date End date of the billing item price.
 PRICE money   Default = 0 The price of the billing item
 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.
 DATERANGETYPECODE tinyint   Default = 0 Flag indicating which kind of billing item.
 DATERANGETYPE nvarchar(14) (Computed) CASE [DATERANGETYPECODE] WHEN 0 THEN N'All dates' WHEN 1 THEN N'Specific dates' WHEN 2 THEN N'Academic year' END Provides a translation for the 'DATERANGETYPECODE' field.

Foreign Key Field Type Null Notes Description
 BILLINGITEMID uniqueidentifier   BILLINGITEM.ID A foreign key to the billing item.
 ADDEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 CHANGEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.

Index Name Field(s) Unique Primary Clustered
 IX_BILLINGITEMPRICE_DATEADDED DATEADDED    
 IX_BILLINGITEMPRICE_DATECHANGED DATECHANGED      
 PK_BILLINGITEMPRICE ID  
 UIX_BILLINGITEMPRICE_BILLINGITEMID_STARTDATE BILLINGITEMID, STARTDATE    

Trigger Name Description
 TR_BILLINGITEMPRICE_AUDIT_UPDATE
 TR_BILLINGITEMPRICE_AUDIT_DELETE
 TR_BILLINGITEMPRICE_INSERT_UPDATE

Entity-Relationship diagram of this table