AdventureWorks

Basic Index   Expanded Index

Table Name:Production.ProductProductPhoto
Description:Cross-reference table mapping products and product photos.
Primary Keys:ProductID
ProductPhotoID
FieldTypeDefaultsNulls?Comments
ProductIDintNoneNoProduct identification number. Foreign key to Product.ProductID.
ProductPhotoIDintNoneNoProduct photo identification number. Foreign key to ProductPhoto.ProductPhotoID.
Primarybit((0))No0 = Photo is not the principal image. 1 = Photo is the principal image.
ModifiedDatedatetime(getdate())NoDate and time the record was last updated.

IndexClustered?Unique?Fields
PK_ProductProductPhoto_ProductID_ProductPhotoIDNoYesProductID
ProductPhotoID

No check constraints
Internal Foreign Key ConstraintAffected FieldSource Table
FK_ProductProductPhoto_Product_ProductIDProductIDProduction.Product
FK_ProductProductPhoto_ProductPhoto_ProductPhotoIDProductPhotoIDProduction.ProductPhoto

No primary keys as foreign key constraints
No triggers