ScrewTurn Wiki

Edit

wikibot

TableProduction.ProductInventory
DescriptionProduct inventory information.

Edit

Columns

ColumnData TypeNullableDefaultDescription
ProductIDintnot null Product identification number. Foreign key to Product.ProductID.
LocationIDsmallintnot null Inventory location identification number. Foreign key to Location.LocationID.
Shelfnvarchar(10)not null Storage compartment within an inventory location.
Bintinyintnot null Storage container on a shelf in an inventory location.
Quantitysmallintnot null((0))Quantity of products in the inventory location.
rowguiduniqueidentifiernot null(newid())ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
ModifiedDatedatetimenot null(getdate())Date and time the record was last updated.

Edit

Primary Key

Primary KeyColumns
PK_ProductInventory_ProductID_LocationIDProductID, LocationID

Edit

Check Constraints

Check ConstraintExpressionDescription
CK_ProductInventory_Bin(Bin>=(0) AND Bin<=(100))Check constraint Bin BETWEEN (0) AND (100)
CK_ProductInventory_Shelf(Shelf like 'A-Za-z' OR Shelf='N/A')Check constraint Shelf like 'A-Za-z' OR Shelf='N/A'

Edit

Foreign Keys

RelationColumnReferenced Column
Production.LocationLocationIDLocationID
Production.ProductProductIDProductID

Edit

References

Dependency TypeObject TypeReferenced Object
SchemaSchemaProduction

Edit

Dependencies

Reference TypeObject TypeReferencing Object
SelectFunctiondbo.ufnGetStock

Edit

automatically generated

TableProduction.ProductInventory
DescriptionProduct inventory information.

ColumnData TypeNullableDefaultDescription / PK / Index
ProductIDintnot null Product identification number. Foreign key to Product.ProductID.
PK_ProductInventory_ProductID_LocationID
LocationIDsmallintnot null Inventory location identification number. Foreign key to Location.LocationID.
PK_ProductInventory_ProductID_LocationID
Shelfnvarchar(10)not null Storage compartment within an inventory location.
Bintinyintnot null Storage container on a shelf in an inventory location.
Quantitysmallintnot null(0)Quantity of products in the inventory location.
rowguiduniqueidentifiernot null(NEWID())ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
ModifiedDatedatetimenot null(GETDATE())Date and time the record was last updated.



RelationColumnReferenced Column
Production.LocationLocationIDLocationID
Production.ProductProductIDProductID

Dependency TypeObject TypeReferenced Object
SchemaSchemaProduction

Reference TypeObject TypeReferencing Object
SelectFunctiondbo.ufnGetStock

ScrewTurn Wiki version 2.0.36. Some of the icons created by FamFamFam.