Owner: | Production |
Creation Date: | 04/26/2006 |
Located On: | PRIMARY |
Data Size KB: | 8 |
Index Size KB: | 8 |
Rows: | 32 |
Description: | Cross-reference table mapping products to related product documents. |
Name | Data Type | Length | NULL | Default | IsIdentity | IsGUID | Description | ||
|
|
ProductID | int | 4 |
|
|
|
Product identification number. Foreign key to Product.ProductID. | |
|
|
DocumentID | int | 4 |
|
|
|
Document identification number. Foreign key to Document.DocumentID. | |
|
ModifiedDate | datetime | 8 |
|
(getdate()) |
|
|
Date and time the record was last updated. |
Index | Primary | Unique | Description | |
|
PK_ProductDocument_ProductID_DocumentID |
|
|
Primary key (clustered) constraint |
Table | Foreign Key | Primary Key or Unique Constraint | |
|
Production.Document | FK_ProductDocument_Document_DocumentID | PK_Document_DocumentID |
|
Production.Product | FK_ProductDocument_Product_ProductID | PK_Product_ProductID |
Objects that [Production].[ProductDocument] depends on
Object Name | Owner | Object Type | Dep Level | |
|
Flag | dbo | User Defined type | 1 |
|
Name | dbo | User Defined type | 1 |
|
Document | Production | Table | 2 |
|
ProductCategory | Production | Table | 2 |
|
ProductModel | Production | Table | 2 |
|
UnitMeasure | Production | Table | 2 |
|
ProductSubcategory | Production | Table | 3 |
|
Product | Production | Table | 4 |
CREATE TABLE [ProductDocument] (
[ProductID] [int] NOT NULL ,
[DocumentID] [int] NOT NULL ,
[ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_ProductDocument_ModifiedDate] DEFAULT (getdate()),
CONSTRAINT [PK_ProductDocument_ProductID_DocumentID] PRIMARY KEY CLUSTERED
(
[ProductID],
[DocumentID]
) ON [PRIMARY] ,
CONSTRAINT [FK_ProductDocument_Document_DocumentID] FOREIGN KEY
(
[DocumentID]
) REFERENCES [Document] (
[DocumentID]
),
CONSTRAINT [FK_ProductDocument_Product_ProductID] FOREIGN KEY
(
[ProductID]
) REFERENCES [Product] (
[ProductID]
)
) ON [PRIMARY]
GO
See Also
List of tables