Production.ProductInventory

Table: 'Production.ProductInventory'

7 fields. 61 bytes.

Product inventory information.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
ProductIDint   Not nullProduct identification number. Foreign key to Product.ProductID. 
LocationIDsmallint   Not nullInventory location identification number. Foreign key to Location.LocationID.  
Shelfnvarchar10  Not nullStorage compartment within an inventory location.([Shelf] like '[A-Za-z]' OR [Shelf]='N/A')
Bintinyint   Not nullStorage container on a shelf in an inventory location.([Bin]>=(0) AND [Bin]<=(100))
Quantitysmallint  (0)Not nullQuantity of products in the inventory location. 
rowguiduniqueidentifier  newid()Not nullROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Production.ProductInventory'

Primary Key NameField Names
PK_ProductInventory_ProductID_LocationIDProductID, LocationID

Foreign keys for table 'Production.ProductInventory', 2 items

ForeignPrimaryKey Name
ProductInventory.LocationIDLocation.LocationIDFK_ProductInventory_Location_LocationID
ProductInventory.ProductIDProduct.ProductIDFK_ProductInventory_Product_ProductID

Indexes for table 'Production.ProductInventory', 1 item

Index NameDescriptionClusteredUniqueFields
PK_ProductInventory_ProductID_LocationIDClustered index created by a primary key constraint.YesYesProductID, LocationID

Triggers for table 'Production.ProductInventory', 1 item

NameDescriptionTypeEnabled
uProductInventoryAFTER UPDATE trigger setting the ModifiedDate column in the ProductInventory table to the current date.after Update Yes

Dependencies for table 'Production.ProductInventory', 4 items

Object NameTypeField Name
dbo.ufnGetStockscalar functionN/A
Production.CK_ProductInventory_Bincheck cnsN/A
Production.CK_ProductInventory_Shelfcheck cnsN/A
Production.uProductInventorytriggerN/A