Owner: Production 
Creation Date: 04/26/2006 
Located On: PRIMARY 
Data Size KB: 16 
Index Size KB: 40 
Rows: 504 
Description: Cross-reference table mapping products and product photos. 


Name Data Type Length NULL Default IsIdentity IsGUID Description
    ProductID  int          Product identification number. Foreign key to Product.ProductID. 
    ProductPhotoID  int          Product photo identification number. Foreign key to ProductPhoto.ProductPhotoID. 
    Primary  Flag    ((0))      0 = Photo is not the principal image. 1 = Photo is the principal image. 
    ModifiedDate  datetime    (getdate())      Date and time the record was last updated. 
Total: 4 column(s)


Index Primary Unique Description
  PK_ProductProductPhoto_ProductID_ProductPhotoID      Primary key (clustered) constraint 
Total: 1 index(es)

Referenced Tables

Table Foreign Key Primary Key or Unique Constraint
  Production.Product  FK_ProductProductPhoto_Product_ProductID  PK_Product_ProductID 
  Production.ProductPhoto  FK_ProductProductPhoto_ProductPhoto_ProductPhotoID  PK_ProductPhoto_ProductPhotoID 
Total: 2 table(s)

Objects that [Production].[ProductProductPhoto] depends on

Object Name Owner Object Type Dep Level
  Flag  dbo  User Defined type 
  Name  dbo  User Defined type 
  ProductCategory  Production  Table 
  ProductModel  Production  Table 
  ProductPhoto  Production  Table 
  UnitMeasure  Production  Table 
  ProductSubcategory  Production  Table 
  Product  Production  Table 
Total: 8 object(s)


CREATE TABLE [ProductProductPhoto] (
    [ProductID] [int] NOT NULL ,
    [ProductPhotoID] [int] NOT NULL ,
    [Primary] [Flag] NOT NULL CONSTRAINT [DF_ProductProductPhoto_Primary] DEFAULT ((0)),
    [ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_ProductProductPhoto_ModifiedDate] DEFAULT (getdate()),
    CONSTRAINT [PK_ProductProductPhoto_ProductID_ProductPhotoID] PRIMARY KEY  NONCLUSTERED
    )  ON [PRIMARY] ,
    CONSTRAINT [FK_ProductProductPhoto_Product_ProductID] FOREIGN KEY
    ) REFERENCES [Product] (
    CONSTRAINT [FK_ProductProductPhoto_ProductPhoto_ProductPhotoID] FOREIGN KEY
    ) REFERENCES [ProductPhoto] (

See Also

List of tables