AdventureWorks

Basic Index   Expanded Index

Table Name:Sales.ShoppingCartItem
Description:Contains online customer orders until the order is submitted or cancelled.
Primary Keys:ShoppingCartItemID
FieldTypeDefaultsNulls?Comments
ShoppingCartItemIDint - IdentityNoneNoPrimary key for ShoppingCartItem records.
ShoppingCartIDnvarchar (50)NoneNoShopping cart identification number.
Quantityint((1))NoProduct quantity ordered.
ProductIDintNoneNoProduct ordered. Foreign key to Product.ProductID.
DateCreateddatetime(getdate())NoDate the time the record was created.
ModifiedDatedatetime(getdate())NoDate and time the record was last updated.

IndexClustered?Unique?Fields
PK_ShoppingCartItem_ShoppingCartItemIDYesYesShoppingCartItemID
IX_ShoppingCartItem_ShoppingCartID_ProductIDNoNoShoppingCartID
ProductID

Check ConstraintText
CK_ShoppingCartItem_Quantity([Quantity]>=(1))

Internal Foreign Key ConstraintAffected FieldSource Table
FK_ShoppingCartItem_Product_ProductIDProductIDProduction.Product

No primary keys as foreign key constraints
No triggers