Difference between revisions of "Purchasing.ProductVendor (table)"
(7 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
− | |- | + | |- valign="top" |
| '''Table | | '''Table | ||
| Purchasing.ProductVendor | | Purchasing.ProductVendor | ||
− | |- | + | |- valign="top" |
+ | | '''Description | ||
+ | | Cross-reference table mapping vendors with the products they supply. | ||
|} | |} | ||
− | + | === Columns === | |
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
|- style="background:silver" | |- style="background:silver" | ||
Line 15: | Line 17: | ||
| '''Nullable | | '''Nullable | ||
| '''Default | | '''Default | ||
− | | ''' | + | | '''Description |
− | + | ||
− | + | |- valign="top" | |
− | |- | ||
| ProductID | | ProductID | ||
| int | | int | ||
| not null | | not null | ||
| | | | ||
− | | | + | | Primary key. Foreign key to Product.ProductID. |
− | + | |- valign="top" | |
− | |- | ||
| VendorID | | VendorID | ||
| int | | int | ||
| not null | | not null | ||
| | | | ||
− | | | + | | Primary key. Foreign key to Vendor.VendorID. |
− | + | |- valign="top" | |
− | |- | ||
| AverageLeadTime | | AverageLeadTime | ||
| int | | int | ||
| not null | | not null | ||
| | | | ||
− | | | + | | The average span of time (in days) between placing an order with the vendor and receiving the purchased product. |
− | + | |- valign="top" | |
− | |- | ||
| StandardPrice | | StandardPrice | ||
| money | | money | ||
| not null | | not null | ||
| | | | ||
− | | | + | | The vendor's usual selling price. |
− | + | |- valign="top" | |
− | |- | ||
| LastReceiptCost | | LastReceiptCost | ||
| money | | money | ||
| null | | null | ||
| | | | ||
− | | | + | | The selling price when last purchased. |
− | + | |- valign="top" | |
− | |- | ||
| LastReceiptDate | | LastReceiptDate | ||
| datetime | | datetime | ||
| null | | null | ||
| | | | ||
− | | | + | | Date the product was last received by the vendor. |
− | + | |- valign="top" | |
− | |- | ||
| MinOrderQty | | MinOrderQty | ||
| int | | int | ||
| not null | | not null | ||
| | | | ||
− | | | + | | The maximum quantity that should be ordered. |
− | + | |- valign="top" | |
− | |- | ||
| MaxOrderQty | | MaxOrderQty | ||
| int | | int | ||
| not null | | not null | ||
| | | | ||
− | | | + | | The minimum quantity that should be ordered. |
− | + | |- valign="top" | |
− | |- | ||
| OnOrderQty | | OnOrderQty | ||
| int | | int | ||
| null | | null | ||
| | | | ||
− | | | + | | The quantity currently on order. |
− | + | |- valign="top" | |
− | |- | ||
| UnitMeasureCode | | UnitMeasureCode | ||
| nchar(3) | | nchar(3) | ||
| not null | | not null | ||
| | | | ||
− | | | + | | The product's unit of measure. |
− | + | |- valign="top" | |
− | |- | ||
| ModifiedDate | | ModifiedDate | ||
| datetime | | datetime | ||
| not null | | not null | ||
| (getdate()) | | (getdate()) | ||
+ | | Date and time the record was last updated. | ||
+ | |} | ||
+ | |||
+ | === Primary Key === | ||
+ | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
+ | |- style="background:silver" | ||
+ | | '''Primary Key | ||
+ | | '''Columns | ||
+ | |- valign="top" | ||
+ | | PK_ProductVendor_ProductID_VendorID | ||
+ | | ProductID, VendorID | ||
+ | |} | ||
+ | |||
+ | === Indexes === | ||
+ | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
+ | |- style="background:silver" | ||
+ | | '''Index | ||
+ | | '''Type | ||
+ | | '''Columns | ||
+ | |||
+ | |- valign="top" | ||
+ | | IX_ProductVendor_UnitMeasureCode | ||
| | | | ||
+ | | UnitMeasureCode | ||
+ | |- valign="top" | ||
+ | | IX_ProductVendor_VendorID | ||
| | | | ||
+ | | VendorID | ||
|} | |} | ||
+ | === Check Constraints === | ||
+ | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
+ | |- style="background:silver" | ||
+ | | '''Check Constraint | ||
+ | | '''Expression | ||
+ | | '''Description | ||
+ | |- valign="top" | ||
+ | | CK_ProductVendor_AverageLeadTime | ||
+ | | ([AverageLeadTime]>=(1)) | ||
+ | | Check constraint [AverageLeadTime] >= (1) | ||
+ | |- valign="top" | ||
+ | | CK_ProductVendor_LastReceiptCost | ||
+ | | ([LastReceiptCost]>(0.00)) | ||
+ | | Check constraint [LastReceiptCost] > (0.00) | ||
+ | |- valign="top" | ||
+ | | CK_ProductVendor_MaxOrderQty | ||
+ | | ([MaxOrderQty]>=(1)) | ||
+ | | Check constraint [MaxOrderQty] >= (1) | ||
+ | |- valign="top" | ||
+ | | CK_ProductVendor_MinOrderQty | ||
+ | | ([MinOrderQty]>=(1)) | ||
+ | | Check constraint [MinOrderQty] >= (1) | ||
+ | |- valign="top" | ||
+ | | CK_ProductVendor_OnOrderQty | ||
+ | | ([OnOrderQty]>=(0)) | ||
+ | | Check constraint [OnOrderQty] >= (0) | ||
+ | |- valign="top" | ||
+ | | CK_ProductVendor_StandardPrice | ||
+ | | ([StandardPrice]>(0.00)) | ||
+ | | Check constraint [StandardPrice] > (0.00) | ||
+ | |} | ||
+ | === Foreign Keys === | ||
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
|- style="background:silver" | |- style="background:silver" | ||
Line 104: | Line 153: | ||
| '''Column | | '''Column | ||
| '''Referenced Column | | '''Referenced Column | ||
− | + | ||
− | |- | + | |- valign="top" |
| [[Production.Product_(table)|Production.Product]] | | [[Production.Product_(table)|Production.Product]] | ||
| ProductID | | ProductID | ||
| ProductID | | ProductID | ||
− | |- | + | |- valign="top" |
| [[Production.UnitMeasure_(table)|Production.UnitMeasure]] | | [[Production.UnitMeasure_(table)|Production.UnitMeasure]] | ||
| UnitMeasureCode | | UnitMeasureCode | ||
| UnitMeasureCode | | UnitMeasureCode | ||
− | |- | + | |- valign="top" |
| [[Purchasing.Vendor_(table)|Purchasing.Vendor]] | | [[Purchasing.Vendor_(table)|Purchasing.Vendor]] | ||
| VendorID | | VendorID | ||
| VendorID | | VendorID | ||
|} | |} | ||
+ | |||
+ | === References === | ||
+ | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
+ | |- style="background:silver" | ||
+ | | '''Dependency Type | ||
+ | | '''Object Type | ||
+ | | '''Referenced Object | ||
+ | |||
+ | |- valign="top" | ||
+ | | Schema | ||
+ | | Schema | ||
+ | | [[Purchasing_(schema)|Purchasing]] | ||
+ | |||
+ | |} | ||
+ | |||
+ | |||
== automatically generated == | == automatically generated == | ||
Line 124: | Line 189: | ||
| '''Table | | '''Table | ||
| Purchasing.ProductVendor | | Purchasing.ProductVendor | ||
− | |- | + | |- valign="top" |
− | |||
| '''Description | | '''Description | ||
| Cross-reference table mapping vendors with the products they supply. | | Cross-reference table mapping vendors with the products they supply. | ||
|- | |- | ||
− | |||
|} | |} | ||
Line 146: | Line 209: | ||
| not null | | not null | ||
| | | | ||
− | | Primary key. Foreign key to Product.ProductID.PK_ProductVendor_ProductID_VendorID | + | | Primary key. Foreign key to Product.ProductID.<br />PK_ProductVendor_ProductID_VendorID |
|- valign="top" | |- valign="top" | ||
| VendorID | | VendorID | ||
Line 152: | Line 215: | ||
| not null | | not null | ||
| | | | ||
− | | Primary key. Foreign key to Vendor.VendorID.PK_ProductVendor_ProductID_VendorIDIX_ProductVendor_VendorID | + | | Primary key. Foreign key to Vendor.VendorID.<br />PK_ProductVendor_ProductID_VendorIDIX_ProductVendor_VendorID |
|- valign="top" | |- valign="top" | ||
| AverageLeadTime | | AverageLeadTime | ||
Line 158: | Line 221: | ||
| not null | | not null | ||
| | | | ||
− | | The average span of time (in days) between placing an order with the vendor and receiving the purchased product. | + | | The average span of time (in days) between placing an order with the vendor and receiving the purchased product.<br /> |
|- valign="top" | |- valign="top" | ||
| StandardPrice | | StandardPrice | ||
Line 164: | Line 227: | ||
| not null | | not null | ||
| | | | ||
− | | The vendor's usual selling price. | + | | The vendor's usual selling price.<br /> |
|- valign="top" | |- valign="top" | ||
| LastReceiptCost | | LastReceiptCost | ||
Line 170: | Line 233: | ||
| null | | null | ||
| | | | ||
− | | The selling price when last purchased. | + | | The selling price when last purchased.<br /> |
|- valign="top" | |- valign="top" | ||
| LastReceiptDate | | LastReceiptDate | ||
Line 176: | Line 239: | ||
| null | | null | ||
| | | | ||
− | | Date the product was last received by the vendor. | + | | Date the product was last received by the vendor.<br /> |
|- valign="top" | |- valign="top" | ||
| MinOrderQty | | MinOrderQty | ||
Line 182: | Line 245: | ||
| not null | | not null | ||
| | | | ||
− | | The maximum quantity that should be ordered. | + | | The maximum quantity that should be ordered.<br /> |
|- valign="top" | |- valign="top" | ||
| MaxOrderQty | | MaxOrderQty | ||
Line 188: | Line 251: | ||
| not null | | not null | ||
| | | | ||
− | | The minimum quantity that should be ordered. | + | | The minimum quantity that should be ordered.<br /> |
|- valign="top" | |- valign="top" | ||
| OnOrderQty | | OnOrderQty | ||
Line 194: | Line 257: | ||
| null | | null | ||
| | | | ||
− | | The quantity currently on order. | + | | The quantity currently on order.<br /> |
|- valign="top" | |- valign="top" | ||
| UnitMeasureCode | | UnitMeasureCode | ||
Line 200: | Line 263: | ||
| not null | | not null | ||
| | | | ||
− | | The product's unit of measure.IX_ProductVendor_UnitMeasureCode | + | | The product's unit of measure.<br />IX_ProductVendor_UnitMeasureCode |
|- valign="top" | |- valign="top" | ||
| ModifiedDate | | ModifiedDate | ||
Line 206: | Line 269: | ||
| not null | | not null | ||
| (GETDATE()) | | (GETDATE()) | ||
− | | Date and time the record was last updated. | + | | Date and time the record was last updated.<br /> |
|} | |} | ||
Line 229: | Line 292: | ||
| VendorID | | VendorID | ||
| VendorID | | VendorID | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
+ | |- style="background:silver" | ||
+ | | '''Dependency Type | ||
+ | | '''Object Type | ||
+ | | '''Referenced Object | ||
+ | |||
+ | |- | ||
+ | | Schema | ||
+ | | Schema | ||
+ | | [[Purchasing_(schema)|Purchasing]] | ||
+ | |||
|} | |} |
Latest revision as of 23:17, 23 June 2010
Contents
wikibot[edit]
Table | Purchasing.ProductVendor |
Description | Cross-reference table mapping vendors with the products they supply. |
Columns[edit]
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[edit]
Primary Key | Columns |
PK_ProductVendor_ProductID_VendorID | ProductID, VendorID |
Indexes[edit]
Index | Type | Columns |
IX_ProductVendor_UnitMeasureCode | UnitMeasureCode | |
IX_ProductVendor_VendorID | VendorID |
Check Constraints[edit]
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[edit]
Relation | Column | Referenced Column |
Production.Product | ProductID | ProductID |
Production.UnitMeasure | UnitMeasureCode | UnitMeasureCode |
Purchasing.Vendor | VendorID | VendorID |
References[edit]
Dependency Type | Object Type | Referenced Object |
Schema | Schema | Purchasing |
automatically generated[edit]
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 |