AdventureWorks
Production.ProductModelIllustration Table
Description
Cross-reference table mapping product models and illustrations.
Properties
Creation Date08/01/2010 08:40
File GroupPRIMARY
Text File Group
System Object
Published for Replication
Rows7
Data Space Used8.00 KB
Index Space Used8.00 KB
Columns
 Column NameDescriptionDatatypeLengthAllow NullsDefaultFormula
Primary Key ProductModelIDPrimary key. Foreign key to ProductModel.ProductModelID.int4   
Primary Key IllustrationIDPrimary key. Foreign key to Illustration.IllustrationID.int4   
 ModifiedDateDate and time the record was last updated.datetime4 
(getdate())
 
Indexes
IndexDescriptionPrimaryUnique
PK_ProductModelIllustration_ProductModelID_IllustrationIDPrimary key (clustered) constraint
Relationships
RelationshipDescription
FK_ProductModelIllustration_Illustration_IllustrationIDForeign key constraint referencing Illustration.IllustrationID.
FK_ProductModelIllustration_ProductModel_ProductModelIDForeign key constraint referencing ProductModel.ProductModelID.
Objects that Production.ProductModelIllustration depends on
 Database ObjectObject TypeDescriptionDep Level
Production.Illustration tableProduction.IllustrationTableBicycle assembly diagrams.1
dbo.Name datatypedbo.NameUser Defined Data Type 2
Production.ProductModel tableProduction.ProductModelTableProduct model classification.1
SQL
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
CREATE TABLE [Production].[ProductModelIllustration](
	[ProductModelID] [int] NOT NULL,
	[IllustrationID] [int] NOT NULL,
	[ModifiedDate] [datetime] NOT NULL,
 CONSTRAINT [PK_ProductModelIllustration_ProductModelID_IllustrationID] PRIMARY KEY CLUSTERED 
(
	[ProductModelID] ASC,
	[IllustrationID] 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].[ProductModelIllustration]  WITH CHECK ADD  CONSTRAINT [FK_ProductModelIllustration_Illustration_IllustrationID] FOREIGN KEY([IllustrationID])
REFERENCES [Illustration] ([IllustrationID])
ALTER TABLE [Production].[ProductModelIllustration] CHECK CONSTRAINT [FK_ProductModelIllustration_Illustration_IllustrationID]
ALTER TABLE [Production].[ProductModelIllustration]  WITH CHECK ADD  CONSTRAINT [FK_ProductModelIllustration_ProductModel_ProductModelID] FOREIGN KEY([ProductModelID])
REFERENCES [ProductModel] ([ProductModelID])
ALTER TABLE [Production].[ProductModelIllustration] CHECK CONSTRAINT [FK_ProductModelIllustration_ProductModel_ProductModelID]
ALTER TABLE [Production].[ProductModelIllustration] ADD  CONSTRAINT [DF_ProductModelIllustration_ModifiedDate]  DEFAULT (getdate()) FOR [ModifiedDate]
See Also

Related Objects

Production Schema
AdventureWorks Database

 

 


© 2012 All Rights Reserved.

Send comments on this topic.