Tables | SQL 2005 Adventure Works OLTP |
Cross-reference table mapping products and product photos.
Columns
Name Data type Nullable Description ProductID int No Product identification number. Foreign key to Product.ProductID. ProductPhotoID int No Product photo identification number. Foreign key to ProductPhoto.ProductPhotoID. Primary Flag No Default value: 0
0 = Photo is not the principal image. 1 = Photo is the principal image.ModifiedDate datetime No Default value: GETDATE()
Date and time the record was last updated.
Constraints
Name Type Columns Description DF_ProductProductPhoto_Primary DEFAULT Primary Value: 0
Default constraint value of 0 (FALSE)DF_ProductProductPhoto_ModifiedDate DEFAULT ModifiedDate Value: GETDATE()
Default constraint value of GETDATE()PK_ProductProductPhoto_ProductID_ProductPhotoID PRIMARY KEY ProductID
ProductPhotoIDNonclustered index created by a primary key constraint. FK_ProductProductPhoto_Product_ProductID FOREIGN KEY ProductID Reference table: Production.Product
Foreign key constraint referencing Product.ProductID.FK_ProductProductPhoto_ProductPhoto_ProductPhotoID FOREIGN KEY ProductPhotoID Reference table: Production.ProductPhoto
Foreign key constraint referencing ProductPhoto.ProductPhotoID.
Indices
Name Description AK_ProductProductPhoto_ProductID_ProductPhotoID Unique nonclustered index.
Triggers
Name Description Production.uProductProductPhoto AFTER UPDATE trigger setting the ModifiedDate column in the ProductProductPhoto table to the current date.
Accessed by
Name Description Product Catalog Adventure Works full product catalog with pictures. This report illustrates the use of embedded images, database images, page breaks, page footers, tables, conditional formatting, and a document map.
Modified by
Name Description Production.uProductProductPhoto AFTER UPDATE trigger setting the ModifiedDate column in the ProductProductPhoto table to the current date.
Applies to
Tables | User