AdventureWorks

Basic Index   Expanded Index

Table Name:Production.ProductListPriceHistory
Description:Changes in the list price of a product over time.
Primary Keys:ProductID
StartDate
FieldTypeDefaultsNulls?Comments
ProductIDintNoneNoProduct identification number. Foreign key to Product.ProductID
StartDatedatetimeNoneNoList price start date.
EndDatedatetimeNoneYesList price end date
ListPricemoneyNoneNoProduct list price.
ModifiedDatedatetime(getdate())NoDate and time the record was last updated.

IndexClustered?Unique?Fields
PK_ProductListPriceHistory_ProductID_StartDateYesYesProductID
StartDate

Check ConstraintText
CK_ProductListPriceHistory_EndDate([EndDate]>=[StartDate] OR [EndDate] IS NULL)
CK_ProductListPriceHistory_ListPrice([ListPrice]>(0.00))

Internal Foreign Key ConstraintAffected FieldSource Table
FK_ProductListPriceHistory_Product_ProductIDProductIDProduction.Product

No primary keys as foreign key constraints
No triggers