Purchasing.ProductVendor (table)

From dbscript Online Help
Jump to: navigation, search

wikibot

Table Purchasing.ProductVendor
Description Cross-reference table mapping vendors with the products they supply.

Columns

Column Data Type Nullable Default Description
ProductID int not null Primary key. Foreign key to Product.ProductID.
VendorID int not null Primary key. Foreign key to Vendor.VendorID.
AverageLeadTime int not null The average span of time (in days) between placing an order with the vendor and receiving the purchased product.
StandardPrice money not null The vendor's usual selling price.
LastReceiptCost money null The selling price when last purchased.
LastReceiptDate datetime null Date the product was last received by the vendor.
MinOrderQty int not null The maximum quantity that should be ordered.
MaxOrderQty int not null The minimum quantity that should be ordered.
OnOrderQty int null The quantity currently on order.
UnitMeasureCode nchar(3) not null The product's unit of measure.
ModifiedDate datetime not null (getdate()) Date and time the record was last updated.

Primary Key

Primary Key Columns
PK_ProductVendor_ProductID_VendorID ProductID, VendorID

Indexes

Index Type Columns
IX_ProductVendor_UnitMeasureCode UnitMeasureCode
IX_ProductVendor_VendorID VendorID

Check Constraints

Check Constraint Expression Description
CK_ProductVendor_AverageLeadTime ([AverageLeadTime]>=(1)) Check constraint [AverageLeadTime] >= (1)
CK_ProductVendor_LastReceiptCost ([LastReceiptCost]>(0.00)) Check constraint [LastReceiptCost] > (0.00)
CK_ProductVendor_MaxOrderQty ([MaxOrderQty]>=(1)) Check constraint [MaxOrderQty] >= (1)
CK_ProductVendor_MinOrderQty ([MinOrderQty]>=(1)) Check constraint [MinOrderQty] >= (1)
CK_ProductVendor_OnOrderQty ([OnOrderQty]>=(0)) Check constraint [OnOrderQty] >= (0)
CK_ProductVendor_StandardPrice ([StandardPrice]>(0.00)) Check constraint [StandardPrice] > (0.00)

Foreign Keys

Relation Column Referenced Column
Production.Product ProductID ProductID
Production.UnitMeasure UnitMeasureCode UnitMeasureCode
Purchasing.Vendor VendorID VendorID

References

Dependency Type Object Type Referenced Object
Schema Schema Purchasing


automatically generated

Table Purchasing.ProductVendor
Description Cross-reference table mapping vendors with the products they supply.


Column Data Type Nullable Default Description / PK / Index
ProductID int not null Primary key. Foreign key to Product.ProductID.
PK_ProductVendor_ProductID_VendorID
VendorID int not null Primary key. Foreign key to Vendor.VendorID.
PK_ProductVendor_ProductID_VendorIDIX_ProductVendor_VendorID
AverageLeadTime int not null The average span of time (in days) between placing an order with the vendor and receiving the purchased product.
StandardPrice money not null The vendor's usual selling price.
LastReceiptCost money null The selling price when last purchased.
LastReceiptDate datetime null Date the product was last received by the vendor.
MinOrderQty int not null The maximum quantity that should be ordered.
MaxOrderQty int not null The minimum quantity that should be ordered.
OnOrderQty int null The quantity currently on order.
UnitMeasureCode nchar(3) not null The product's unit of measure.
IX_ProductVendor_UnitMeasureCode
ModifiedDate datetime not null (GETDATE()) Date and time the record was last updated.


Relation Column Referenced Column
Production.Product ProductID ProductID
Production.UnitMeasure UnitMeasureCode UnitMeasureCode
Purchasing.Vendor VendorID VendorID


Dependency Type Object Type Referenced Object
Schema Schema Purchasing