AdventureWorks
Production.ProductPhoto Table
Description
Product images.
Properties
Creation Date08/01/2010 08:40
File GroupPRIMARY
Text File GroupPRIMARY
System Object
Published for Replication
Rows101
Data Space Used2,240.00 KB
Index Space Used16.00 KB
Columns
 Column NameDescriptionDatatypeLengthAllow NullsDefaultFormula
Primary Key ProductPhotoIDPrimary key for ProductPhoto records.int4   
 ThumbNailPhotoSmall image of the product.varbinary16  
 ThumbnailPhotoFileNameSmall image file name.nvarchar50  
 LargePhotoLarge image of the product.varbinary16  
 LargePhotoFileNameLarge image file name.nvarchar50  
 ModifiedDateDate and time the record was last updated.datetime4 
(getdate())
 
Indexes
IndexDescriptionPrimaryUnique
PK_ProductPhoto_ProductPhotoIDPrimary key (clustered) constraint
Relationships
RelationshipDescription
FK_ProductProductPhoto_ProductPhoto_ProductPhotoIDForeign key constraint referencing ProductPhoto.ProductPhotoID.
Objects that depend on Production.ProductPhoto
 Database ObjectObject TypeDescriptionDep Level
Production.ProductProductPhoto tableProduction.ProductProductPhotoTableCross-reference table mapping products and product photos.1
SQL
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
CREATE TABLE [Production].[ProductPhoto](
	[ProductPhotoID] [int] IDENTITY(1,1) NOT NULL,
	[ThumbNailPhoto] [varbinary](max) NULL,
	[ThumbnailPhotoFileName] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[LargePhoto] [varbinary](max) NULL,
	[LargePhotoFileName] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[ModifiedDate] [datetime] NOT NULL,
 CONSTRAINT [PK_ProductPhoto_ProductPhotoID] PRIMARY KEY CLUSTERED 
(
	[ProductPhotoID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

ALTER TABLE [Production].[ProductPhoto] ADD  CONSTRAINT [DF_ProductPhoto_ModifiedDate]  DEFAULT (getdate()) FOR [ModifiedDate]
See Also

Related Objects

Production Schema
AdventureWorks Database

 

 


© 2012 All Rights Reserved.

Send comments on this topic.