| Production |
| 04/26/2006 |
| PRIMARY |
| 56 |
| 16 |
| 1069 |
| Product inventory information. |
|
|
ProductID |
int |
4 |
|
|
|
|
Product identification number. Foreign key to Product.ProductID. |
|
|
LocationID |
smallint |
2 |
|
|
|
|
Inventory location identification number. Foreign key to Location.LocationID. |
|
|
Shelf |
nvarchar |
10 |
|
|
|
|
Storage compartment within an inventory location. |
|
|
Bin |
tinyint |
1 |
|
|
|
|
Storage container on a shelf in an inventory location. |
|
|
Quantity |
smallint |
2 |
|
((0)) |
|
|
Quantity of products in the inventory location. |
|
|
rowguid |
uniqueidentifier |
16 |
|
(newid()) |
|
|
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. |
|
|
ModifiedDate |
datetime |
8 |
|
(getdate()) |
|
|
Date and time the record was last updated. |
Total: 7 column(s)
Total: 1 index(es)
|
CK_ProductInventory_Bin |
([Bin]>=(0) AND [Bin]<=(100)) |
|
CK_ProductInventory_Shelf |
([Shelf] like '[A-Za-z]' OR [Shelf]='N/A') |
Total: 2 constraint(s)
Total: 2 table(s)
Total: 8 object(s)
Total: 1 object(s)
CREATE TABLE [ProductInventory] (
[ProductID] [int] NOT NULL ,
[LocationID] [smallint] NOT NULL ,
[Shelf] [nvarchar] (10) COLLATE Latin1_General_CS_AS NOT NULL ,
[Bin] [tinyint] NOT NULL ,
[Quantity] [smallint] NOT NULL CONSTRAINT [DF_ProductInventory_Quantity] DEFAULT ((0)),
[rowguid] uniqueidentifier ROWGUIDCOL NOT NULL CONSTRAINT [DF_ProductInventory_rowguid] DEFAULT (newid()),
[ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_ProductInventory_ModifiedDate] DEFAULT (getdate()),
CONSTRAINT [PK_ProductInventory_ProductID_LocationID] PRIMARY KEY CLUSTERED
(
[ProductID],
[LocationID]
) ON [PRIMARY] ,
CONSTRAINT [FK_ProductInventory_Location_LocationID] FOREIGN KEY
(
[LocationID]
) REFERENCES [Location] (
[LocationID]
),
CONSTRAINT [FK_ProductInventory_Product_ProductID] FOREIGN KEY
(
[ProductID]
) REFERENCES [Product] (
[ProductID]
),
CONSTRAINT [CK_ProductInventory_Bin] CHECK ([Bin]>=(0) AND [Bin]<=(100)),
CONSTRAINT [CK_ProductInventory_Shelf] CHECK ([Shelf] like '[A-Za-z]' OR [Shelf]='N/A')
) ON [PRIMARY]
GO
List of tables