Owner: Purchasing 
Creation Date: 04/26/2006 
Located On: PRIMARY 
Data Size KB: 40 
Index Size KB: 48 
Rows: 460 
Description: Cross-reference table mapping vendors with the products they supply. 


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


Index Primary Unique Description
  PK_ProductVendor_ProductID_VendorID      Primary key (clustered) constraint 
  IX_ProductVendor_UnitMeasureCode      Nonclustered index. 
  IX_ProductVendor_VendorID      Nonclustered index. 
Total: 3 index(es)

Check Constraints

Name Expression
  CK_ProductVendor_AverageLeadTime  ([AverageLeadTime]>=(1)) 
  CK_ProductVendor_LastReceiptCost  ([LastReceiptCost]>(0.00)) 
  CK_ProductVendor_MaxOrderQty  ([MaxOrderQty]>=(1)) 
  CK_ProductVendor_MinOrderQty  ([MinOrderQty]>=(1)) 
  CK_ProductVendor_OnOrderQty  ([OnOrderQty]>=(0)) 
  CK_ProductVendor_StandardPrice  ([StandardPrice]>(0.00)) 
Total: 6 constraint(s)

Referenced Tables

Table Foreign Key Primary Key or Unique Constraint
  Production.Product  FK_ProductVendor_Product_ProductID  PK_Product_ProductID 
  Production.UnitMeasure  FK_ProductVendor_UnitMeasure_UnitMeasureCode  PK_UnitMeasure_UnitMeasureCode 
  Purchasing.Vendor  FK_ProductVendor_Vendor_VendorID  PK_Vendor_VendorID 
Total: 3 table(s)

Objects that [Purchasing].[ProductVendor] depends on

Object Name Owner Object Type Dep Level
  AccountNumber  dbo  User Defined type 
  Flag  dbo  User Defined type 
  Name  dbo  User Defined type 
  ProductCategory  Production  Table 
  ProductModel  Production  Table 
  UnitMeasure  Production  Table 
  Vendor  Purchasing  Table 
  ProductSubcategory  Production  Table 
  Product  Production  Table 
Total: 9 object(s)


CREATE TABLE [ProductVendor] (
    [ProductID] [int] NOT NULL ,
    [VendorID] [int] NOT NULL ,
    [AverageLeadTime] [int] NOT NULL ,
    [StandardPrice] [money] NOT NULL ,
    [LastReceiptCost] [money] NULL ,
    [LastReceiptDate] [datetime] NULL ,
    [MinOrderQty] [int] NOT NULL ,
    [MaxOrderQty] [int] NOT NULL ,
    [OnOrderQty] [int] NULL ,
    [UnitMeasureCode] [nchar] (3) COLLATE Latin1_General_CS_AS NOT NULL ,
    [ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_ProductVendor_ModifiedDate] DEFAULT (getdate()),
    )  ON [PRIMARY] ,
    CONSTRAINT [FK_ProductVendor_Product_ProductID] FOREIGN KEY
    ) REFERENCES [Product] (
    CONSTRAINT [FK_ProductVendor_UnitMeasure_UnitMeasureCode] FOREIGN KEY
    ) REFERENCES [UnitMeasure] (
    CONSTRAINT [FK_ProductVendor_Vendor_VendorID] FOREIGN KEY
    ) REFERENCES [Vendor] (
    CONSTRAINT [CK_ProductVendor_AverageLeadTime] CHECK ([AverageLeadTime]>=(1)),
    CONSTRAINT [CK_ProductVendor_LastReceiptCost] CHECK ([LastReceiptCost]>(0.00)),
    CONSTRAINT [CK_ProductVendor_MaxOrderQty] CHECK ([MaxOrderQty]>=(1)),
    CONSTRAINT [CK_ProductVendor_MinOrderQty] CHECK ([MinOrderQty]>=(1)),
    CONSTRAINT [CK_ProductVendor_OnOrderQty] CHECK ([OnOrderQty]>=(0)),
    CONSTRAINT [CK_ProductVendor_StandardPrice] CHECK ([StandardPrice]>(0.00))

See Also

List of tables