Northwind Database (Document! X Sample)
AdventureWorks Database / Production Schema / Production.ProductModelIllustration Table
In This Topic
    Production.ProductModelIllustration Table
    In This Topic
    Description
    Cross-reference table mapping product models and illustrations.
    Properties
    Creation Date27/10/2017 14:33
    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 Primary key. Foreign key to ProductModel.ProductModelID.Integer4   
    Primary Key Primary key. Foreign key to Illustration.IllustrationID.Integer4   
     Date and time the record was last updated.DBTimeStamp4 
    (getdate())
     
    Indexes
    IndexDescriptionPrimaryUnique
    Primary key (clustered) constraint
    Relationships
    RelationshipDescription
    Foreign key constraint referencing Illustration.IllustrationID.
    Foreign 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.2
    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] ADD  CONSTRAINT [DF_ProductModelIllustration_ModifiedDate]  DEFAULT (getdate()) FOR [ModifiedDate]
    ALTER TABLE [Production].[ProductModelIllustration]  WITH CHECK ADD  CONSTRAINT [FK_ProductModelIllustration_Illustration_IllustrationID] FOREIGN KEY([IllustrationID])
    REFERENCES [Production].[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 [Production].[ProductModel] ([ProductModelID])
    ALTER TABLE [Production].[ProductModelIllustration] CHECK CONSTRAINT [FK_ProductModelIllustration_ProductModel_ProductModelID]
    See Also