AdventureWorks

Basic Index   Expanded Index

Table Name:Production.ProductReview
Description:Customer reviews of products they have purchased.
Primary Keys:ProductReviewID
FieldTypeDefaultsNulls?Comments
ProductReviewIDint - IdentityNoneNoPrimary key for ProductReview records.
ProductIDintNoneNoProduct identification number. Foreign key to Product.ProductID.
ReviewerNamenvarchar (50)NoneNoName of the reviewer.
ReviewDatedatetime(getdate())NoDate review was submitted.
EmailAddressnvarchar (50)NoneNoReviewer's e-mail address.
RatingintNoneNoProduct rating given by the reviewer. Scale is 1 to 5 with 5 as the highest rating.
Commentsnvarchar (3850)NoneYesReviewer's comments
ModifiedDatedatetime(getdate())NoDate and time the record was last updated.

IndexClustered?Unique?Fields
PK_ProductReview_ProductReviewIDYesYesProductReviewID
IX_ProductReview_ProductID_NameNoNoProductID
ReviewerName

Check ConstraintText
CK_ProductReview_Rating([Rating]>=(1) AND [Rating]<=(5))

Internal Foreign Key ConstraintAffected FieldSource Table
FK_ProductReview_Product_ProductIDProductIDProduction.Product

No primary keys as foreign key constraints
No triggers