AdventureWorks

Basic Index   Expanded Index

Table Name:Sales.SpecialOffer
Description:Sale discounts lookup table.
Primary Keys:SpecialOfferID
FieldTypeDefaultsNulls?Comments
SpecialOfferIDint - IdentityNoneNoPrimary key for SpecialOffer records.
Descriptionnvarchar (255)NoneNoDiscount description.
DiscountPctsmallmoney((0.00))NoDiscount precentage.
Typenvarchar (50)NoneNoDiscount type category.
Categorynvarchar (50)NoneNoGroup the discount applies to such as Reseller or Customer.
StartDatedatetimeNoneNoDiscount start date.
EndDatedatetimeNoneNoDiscount end date.
MinQtyint((0))NoMinimum discount percent allowed.
MaxQtyintNoneYesMaximum discount percent allowed.
rowguiduniqueidentifier(newid())NoROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
ModifiedDatedatetime(getdate())NoDate and time the record was last updated.

IndexClustered?Unique?Fields
PK_SpecialOffer_SpecialOfferIDYesYesSpecialOfferID
AK_SpecialOffer_rowguidNoYesrowguid

Check ConstraintText
CK_SpecialOffer_EndDate([EndDate]>=[StartDate])
CK_SpecialOffer_DiscountPct([DiscountPct]>=(0.00))
CK_SpecialOffer_MinQty([MinQty]>=(0))
CK_SpecialOffer_MaxQty([MaxQty]>=(0))

No internal foreign key constraints
Primary Key as Foreign Key ConstraintAffected TableAffected Field
FK_SpecialOfferProduct_SpecialOffer_SpecialOfferIDSales.SpecialOfferProductSpecialOfferID

No triggers