ScrewTurn Wiki

Edit

wikibot

TablePurchasing.ProductVendor
DescriptionCross-reference table mapping vendors with the products they supply.

Edit

Columns

ColumnData TypeNullableDefaultDescription
ProductIDintnot null Primary key. Foreign key to Product.ProductID.
VendorIDintnot null Primary key. Foreign key to Vendor.VendorID.
AverageLeadTimeintnot null The average span of time (in days) between placing an order with the vendor and receiving the purchased product.
StandardPricemoneynot null The vendor's usual selling price.
LastReceiptCostmoneynull The selling price when last purchased.
LastReceiptDatedatetimenull Date the product was last received by the vendor.
MinOrderQtyintnot null The maximum quantity that should be ordered.
MaxOrderQtyintnot null The minimum quantity that should be ordered.
OnOrderQtyintnull The quantity currently on order.
UnitMeasureCodenchar(3)not null The product's unit of measure.
ModifiedDatedatetimenot null(getdate())Date and time the record was last updated.

Edit

Primary Key

Primary KeyColumns
PK_ProductVendor_ProductID_VendorIDProductID, VendorID

Edit

Indexes

IndexTypeColumns
IX_ProductVendor_UnitMeasureCode UnitMeasureCode
IX_ProductVendor_VendorID VendorID

Edit

Check Constraints

Check ConstraintExpressionDescription
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)

Edit

Foreign Keys

RelationColumnReferenced Column
Production.ProductProductIDProductID
Production.UnitMeasureUnitMeasureCodeUnitMeasureCode
Purchasing.VendorVendorIDVendorID

Edit

References

Dependency TypeObject TypeReferenced Object
SchemaSchemaPurchasing

Edit

automatically generated

TablePurchasing.ProductVendor
DescriptionCross-reference table mapping vendors with the products they supply.

ColumnData TypeNullableDefaultDescription / PK / Index
ProductIDintnot null Primary key. Foreign key to Product.ProductID.
PK_ProductVendor_ProductID_VendorID
VendorIDintnot null Primary key. Foreign key to Vendor.VendorID.
PK_ProductVendor_ProductID_VendorIDIX_ProductVendor_VendorID
AverageLeadTimeintnot null The average span of time (in days) between placing an order with the vendor and receiving the purchased product.
StandardPricemoneynot null The vendor's usual selling price.
LastReceiptCostmoneynull The selling price when last purchased.
LastReceiptDatedatetimenull Date the product was last received by the vendor.
MinOrderQtyintnot null The maximum quantity that should be ordered.
MaxOrderQtyintnot null The minimum quantity that should be ordered.
OnOrderQtyintnull The quantity currently on order.
UnitMeasureCodenchar(3)not null The product's unit of measure.
IX_ProductVendor_UnitMeasureCode
ModifiedDatedatetimenot null(GETDATE())Date and time the record was last updated.



RelationColumnReferenced Column
Production.ProductProductIDProductID
Production.UnitMeasureUnitMeasureCodeUnitMeasureCode
Purchasing.VendorVendorIDVendorID

Dependency TypeObject TypeReferenced Object
SchemaSchemaPurchasing

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