# Table: ProductVendor

## Properties

Property | Value
--- | ---
Name | ProductVendor
ID | 466100701
Owner | dbo
Schema | Purchasing
Filegroup | PRIMARY
Data Size (KB) | 40 KB
Index Size (KB) | 48 KB
Rows | 460
Unused (KB) | 0 KB
ANSI Null On |
Quoted Identifier |
Lock Escalation | TABLE
Lock On Bulk Load |
Lob Data Space |
Filestream Data Space ID |
Has Unchecked Assembly Data |
Text In Row Limit (bytes) | Option not set
Large Value Types Out Of Row |
FullText Change Tracking On |
Tracked By Cdc |
Published |
Schema Published |
Replicated |
Replication Filter |
Merge Published |
Sync Tran Subscribed |
MS Shipped |
Modify Date | 8/8/2010 5:23:40 PM
Create Date | 8/8/2010 5:21:52 PM

## Extended Properties

Name | Value
--- | ---
MS_Description | Cross-reference table mapping vendors with the products they supply.

## Columns

Column ID | Column Name | Datatype | Nullable | Is Sparse | Is Column Set
--- | --- | --- | --- | --- | ---
1 | ProductID | int |  |  |
2 | BusinessEntityID | int |  |  |
3 | AverageLeadTime | int |  |  |
4 | StandardPrice | money |  |  |
5 | LastReceiptCost | money |  |  |
6 | LastReceiptDate | datetime |  |  |
7 | MinOrderQty | int |  |  |
8 | MaxOrderQty | int |  |  |
9 | OnOrderQty | int |  |  |
10 | UnitMeasureCode | nchar(3) |  |  |
11 | ModifiedDate | datetime |  |  |

## Identity Columns

No identity columns defined.

## Primary Key Constraints

Name | Is System Named | Extended Property Name | Extended Property Value
--- | --- | --- | ---
PK_ProductVendor_ProductID_BusinessEntityID |  | MS_Description | Primary key (clustered) constraint

## Primary Key Columns

Name
ProductID
BusinessEntityID

## Foreign Keys

Name | Referenced Object | Update Action | Delete Action
--- | --- | --- | ---
FK_ProductVendor_Product_ProductID | Production.Product | No action | No action
FK_ProductVendor_UnitMeasure_UnitMeasureCode | Production.UnitMeasure | No action | No action
FK_ProductVendor_Vendor_BusinessEntityID | Purchasing.Vendor | No action | No action

## Column Level Check Constraints

Name | Column ID | Column | Definition | Is Disabled | Is Not For Replication | Is Not Trusted | Uses Database Collation | Is System Named
--- | --- | --- | --- | --- | --- | --- | --- | ---
CK_ProductVendor_AverageLeadTime | 3 | AverageLeadTime | ([AverageLeadTime]>=(1)) |  |  |  |  |
CK_ProductVendor_StandardPrice | 4 | StandardPrice | ([StandardPrice]>(0.00)) |  |  |  |  |
CK_ProductVendor_LastReceiptCost | 5 | LastReceiptCost | ([LastReceiptCost]>(0.00)) |  |  |  |  |
CK_ProductVendor_MinOrderQty | 7 | MinOrderQty | ([MinOrderQty]>=(1)) |  |  |  |  |
CK_ProductVendor_MaxOrderQty | 8 | MaxOrderQty | ([MaxOrderQty]>=(1)) |  |  |  |  |
CK_ProductVendor_OnOrderQty | 9 | OnOrderQty | ([OnOrderQty]>=(0)) |  |  |  |  |

## Table Level Check Constraints

No table constraints defined.

## Default Constraints

Name | Column | Definition | Is System Named | Extended Property Name | Extended Property Value
--- | --- | --- | --- | --- | ---
DF_ProductVendor_ModifiedDate | ModifiedDate | (getdate()) |  | MS_Description | Default constraint value of GETDATE()

## Indexes

Name | Index Type | Primary Key | Unique | Unique Constraint | Ignore Duplicate Key | Disabled
--- | --- | --- | --- | --- | --- | ---
PK_ProductVendor_ProductID_BusinessEntityID | CLUSTERED |  |  |  |  |
IX_ProductVendor_UnitMeasureCode | NONCLUSTERED |  |  |  |  |
IX_ProductVendor_BusinessEntityID | NONCLUSTERED |  |  |  |  |

## FullText Indexes

No fulltext indexes defined.

## Referencing Tables

No referencing tables defined.

## Object Level Permissions

No object level permissions defined.

## Column Level Permissions

No explicit column permissions granted to this object

## Statistics

### Detailed Statistics General

Name | Updated | Rows | Rows Sampled | Steps | Density | Average Key Length | String Index | Filter Expression | Unfiltered Rows
--- | --- | --- | --- | --- | --- | --- | --- | --- | ---
PK_ProductVendor_ProductID_BusinessEntityID | Aug 8 2010 5:22PM | 460 | 460 | 142 | 0.6 | 8 |  |  | 460

### Detailed Statistics Density

All Density | Average Length | Columns
--- | --- | ---
0.003773585 | 4 | ProductID
0.002173913 | 8 | ProductID, BusinessEntityID

### Detailed Statistics Histogram

Range High Key | Range Rows | Estimated Rows | Distinct Range Rows | Avg Range Rows
--- | --- | --- | --- | ---
1 | 0 | 1 | 0 | 1
317 | 2 | 2 | 2 | 1
318 | 0 | 2 | 0 | 1
320 | 3 | 3 | 1 | 3
322 | 3 | 3 | 1 | 3
325 | 1 | 1 | 1 | 1
332 | 1 | 1 | 1 | 1
341 | 0 | 3 | 0 | 1
343 | 3 | 3 | 1 | 3
345 | 3 | 3 | 1 | 3
347 | 3 | 3 | 1 | 3
349 | 3 | 3 | 1 | 3
351 | 0 | 2 | 0 | 1
352 | 0 | 2 | 0 | 1
356 | 1 | 2 | 1 | 1
357 | 0 | 2 | 0 | 1
359 | 1 | 2 | 1 | 1
361 | 2 | 2 | 1 | 2
362 | 0 | 2 | 0 | 1
364 | 2 | 2 | 1 | 2
366 | 2 | 2 | 1 | 2
368 | 2 | 2 | 1 | 2
370 | 2 | 2 | 1 | 2
372 | 2 | 2 | 1 | 2
374 | 2 | 2 | 1 | 2
376 | 3 | 3 | 1 | 3
378 | 3 | 3 | 1 | 3
380 | 3 | 3 | 1 | 3
381 | 0 | 3 | 0 | 1
383 | 2 | 2 | 1 | 2
385 | 2 | 2 | 1 | 2
387 | 2 | 2 | 1 | 2
389 | 2 | 2 | 1 | 2
391 | 2 | 2 | 1 | 2
393 | 2 | 2 | 1 | 2
394 | 0 | 2 | 0 | 1
396 | 2 | 2 | 1 | 2
397 | 0 | 2 | 0 | 1
403 | 1 | 3 | 1 | 1
405 | 3 | 3 | 1 | 3
407 | 3 | 3 | 1 | 3
409 | 3 | 3 | 1 | 3
411 | 2 | 2 | 1 | 2
413 | 2 | 2 | 1 | 2
415 | 2 | 2 | 1 | 2
417 | 2 | 2 | 1 | 2
419 | 2 | 2 | 1 | 2
421 | 2 | 2 | 1 | 2
423 | 3 | 3 | 1 | 3
425 | 3 | 3 | 1 | 3
427 | 3 | 3 | 1 | 3
429 | 3 | 3 | 1 | 3
431 | 3 | 3 | 1 | 3
433 | 3 | 3 | 1 | 3
435 | 3 | 3 | 1 | 3
437 | 3 | 3 | 1 | 3
439 | 2 | 2 | 1 | 2
441 | 2 | 2 | 1 | 2
443 | 2 | 2 | 1 | 2
445 | 2 | 2 | 1 | 2
447 | 2 | 2 | 1 | 2
449 | 2 | 2 | 1 | 2
451 | 2 | 2 | 1 | 2
453 | 2 | 2 | 1 | 2
455 | 2 | 2 | 1 | 2
457 | 2 | 2 | 1 | 2
459 | 2 | 2 | 1 | 2
460 | 0 | 2 | 0 | 1
462 | 1 | 1 | 1 | 1
464 | 1 | 1 | 1 | 1
466 | 1 | 1 | 1 | 1
468 | 1 | 1 | 1 | 1
470 | 1 | 1 | 1 | 1
472 | 1 | 1 | 1 | 1
474 | 1 | 1 | 1 | 1
476 | 1 | 1 | 1 | 1
478 | 1 | 1 | 1 | 1
480 | 1 | 1 | 1 | 1
482 | 1 | 1 | 1 | 1
484 | 1 | 1 | 1 | 1
486 | 1 | 1 | 1 | 1
488 | 1 | 1 | 1 | 1
490 | 1 | 2 | 1 | 1
492 | 2 | 2 | 1 | 2
494 | 2 | 2 | 1 | 2
496 | 2 | 2 | 1 | 2
504 | 1 | 1 | 1 | 1
506 | 1 | 1 | 1 | 1
508 | 2 | 2 | 1 | 2
510 | 1 | 2 | 1 | 1
512 | 2 | 2 | 1 | 2
513 | 0 | 2 | 0 | 1
523 | 0 | 2 | 0 | 1
524 | 0 | 2 | 0 | 1
526 | 1 | 1 | 1 | 1
528 | 1 | 1 | 1 | 1
535 | 1 | 1 | 1 | 1
679 | 0 | 2 | 0 | 1
708 | 1 | 1 | 1 | 1
710 | 1 | 1 | 1 | 1
712 | 1 | 1 | 1 | 1
714 | 1 | 1 | 1 | 1
716 | 1 | 1 | 1 | 1
842 | 1 | 1 | 1 | 1
844 | 1 | 1 | 1 | 1
846 | 1 | 1 | 1 | 1
848 | 1 | 1 | 1 | 1
850 | 1 | 1 | 1 | 1
852 | 1 | 1 | 1 | 1
854 | 1 | 1 | 1 | 1
856 | 1 | 1 | 1 | 1
858 | 1 | 1 | 1 | 1
860 | 1 | 1 | 1 | 1
862 | 1 | 1 | 1 | 1
864 | 1 | 1 | 1 | 1
866 | 1 | 1 | 1 | 1
868 | 1 | 1 | 1 | 1
870 | 1 | 1 | 1 | 1
872 | 1 | 1 | 1 | 1
874 | 1 | 1 | 1 | 1
876 | 1 | 1 | 1 | 1
878 | 1 | 1 | 1 | 1
880 | 1 | 1 | 1 | 1
882 | 1 | 1 | 1 | 1
884 | 1 | 1 | 1 | 1
908 | 1 | 2 | 1 | 1
910 | 2 | 2 | 1 | 2
911 | 0 | 2 | 0 | 1
913 | 2 | 2 | 1 | 2
915 | 2 | 2 | 1 | 2
916 | 0 | 2 | 0 | 1
922 | 1 | 1 | 1 | 1
928 | 1 | 2 | 1 | 1
930 | 2 | 2 | 1 | 2
932 | 2 | 2 | 1 | 2
933 | 0 | 2 | 0 | 1
935 | 2 | 2 | 1 | 2
936 | 0 | 2 | 0 | 1
938 | 1 | 2 | 1 | 1
939 | 0 | 2 | 0 | 1
948 | 2 | 1 | 2 | 1
952 | 0 | 1 | 0 | 1

### Detailed Statistics General

Name | Updated | Rows | Rows Sampled | Steps | Density | Average Key Length | String Index | Filter Expression | Unfiltered Rows
--- | --- | --- | --- | --- | --- | --- | --- | --- | ---
IX_ProductVendor_UnitMeasureCode | Aug 8 2010 5:23PM | 460 | 460 | 7 | 0 | 14 |  |  | 460

### Detailed Statistics Density

All Density | Average Length | Columns
--- | --- | ---
0.1428571 | 6 | UnitMeasureCode
0.003773585 | 10 | UnitMeasureCode, ProductID
0.002173913 | 14 | UnitMeasureCode, ProductID, BusinessEntityID

### Detailed Statistics Histogram

Range High Key | Range Rows | Estimated Rows | Distinct Range Rows | Avg Range Rows
--- | --- | --- | --- | ---
CAN | 0 | 68 | 0 | 1
CS | 0 | 38 | 0 | 1
CTN | 0 | 178 | 0 | 1
DZ | 0 | 7 | 0 | 1
EA | 0 | 154 | 0 | 1
GAL | 0 | 10 | 0 | 1
PAK | 0 | 5 | 0 | 1

### Detailed Statistics General

Name | Updated | Rows | Rows Sampled | Steps | Density | Average Key Length | String Index | Filter Expression | Unfiltered Rows
--- | --- | --- | --- | --- | --- | --- | --- | --- | ---
IX_ProductVendor_BusinessEntityID | Aug 8 2010 5:23PM | 460 | 460 | 75 | 0.6111111 | 8 |  |  | 460

### Detailed Statistics Density

All Density | Average Length | Columns
--- | --- | ---
0.01162791 | 4 | BusinessEntityID
0.002173913 | 8 | BusinessEntityID, ProductID

### Detailed Statistics Histogram

Range High Key | Range Rows | Estimated Rows | Distinct Range Rows | Avg Range Rows
--- | --- | --- | --- | ---
1492 | 0 | 16 | 0 | 1
1494 | 0 | 1 | 0 | 1
1496 | 0 | 16 | 0 | 1
1498 | 0 | 2 | 0 | 1
1500 | 0 | 1 | 0 | 1
1504 | 0 | 1 | 0 | 1
1506 | 0 | 2 | 0 | 1
1508 | 0 | 3 | 0 | 1
1510 | 0 | 1 | 0 | 1
1514 | 0 | 3 | 0 | 1
1516 | 0 | 2 | 0 | 1
1518 | 0 | 7 | 0 | 1
1520 | 0 | 3 | 0 | 1
1522 | 0 | 1 | 0 | 1
1530 | 2 | 2 | 1 | 2
1534 | 0 | 16 | 0 | 1
1536 | 0 | 23 | 0 | 1
1538 | 0 | 2 | 0 | 1
1540 | 0 | 24 | 0 | 1
1542 | 0 | 2 | 0 | 1
1544 | 0 | 3 | 0 | 1
1546 | 0 | 9 | 0 | 1
1548 | 0 | 1 | 0 | 1
1554 | 0 | 16 | 0 | 1
1556 | 0 | 1 | 0 | 1
1560 | 0 | 2 | 0 | 1
1562 | 0 | 23 | 0 | 1
1566 | 0 | 1 | 0 | 1
1568 | 0 | 14 | 0 | 1
1570 | 0 | 3 | 0 | 1
1572 | 0 | 2 | 0 | 1
1574 | 0 | 4 | 0 | 1
1576 | 0 | 2 | 0 | 1
1578 | 0 | 3 | 0 | 1
1580 | 0 | 1 | 0 | 1
1582 | 0 | 13 | 0 | 1
1584 | 0 | 5 | 0 | 1
1588 | 2 | 2 | 1 | 2
1592 | 2 | 2 | 1 | 2
1594 | 0 | 9 | 0 | 1
1598 | 0 | 9 | 0 | 1
1600 | 0 | 1 | 0 | 1
1604 | 3 | 3 | 1 | 3
1612 | 2 | 1 | 2 | 1
1614 | 0 | 9 | 0 | 1
1616 | 0 | 19 | 0 | 1
1620 | 1 | 1 | 1 | 1
1622 | 0 | 9 | 0 | 1
1624 | 0 | 2 | 0 | 1
1628 | 1 | 1 | 1 | 1
1632 | 0 | 3 | 0 | 1
1636 | 0 | 10 | 0 | 1
1638 | 0 | 1 | 0 | 1
1644 | 0 | 1 | 0 | 1
1646 | 0 | 3 | 0 | 1
1650 | 1 | 1 | 1 | 1
1652 | 0 | 4 | 0 | 1
1654 | 0 | 1 | 0 | 1
1656 | 0 | 30 | 0 | 1
1658 | 0 | 2 | 0 | 1
1662 | 0 | 1 | 0 | 1
1664 | 0 | 1 | 0 | 1
1666 | 0 | 16 | 0 | 1
1672 | 0 | 10 | 0 | 1
1674 | 0 | 1 | 0 | 1
1676 | 0 | 12 | 0 | 1
1680 | 3 | 3 | 1 | 3
1682 | 0 | 1 | 0 | 1
1684 | 0 | 4 | 0 | 1
1686 | 0 | 19 | 0 | 1
1690 | 1 | 1 | 1 | 1
1692 | 0 | 5 | 0 | 1
1694 | 0 | 3 | 0 | 1
1696 | 0 | 9 | 0 | 1
1698 | 0 | 1 | 0 | 1

## Objects that depend on [ProductVendor]

- Purchasing.ProductVendor

## Objects on which [ProductVendor] depends

- Purchasing.ProductVendor
  - Production.Product
    - Production.ProductSubcategory
      - Production.ProductCategory
        - dbo.Name
    - Production.ProductModel
      - Production.ProductDescriptionSchemaCollection
      - Production.ManuInstructionsSchemaCollection
    - Production.UnitMeasure
    - dbo.Flag
  - Purchasing.Vendor
    - dbo.uspLogError
      - dbo.uspPrintError
      - dbo.ErrorLog
    - dbo.AccountNumber
    - Person.BusinessEntity

## SQL

Script
SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON CREATE TABLE [Purchasing].[ProductVendor]( [ProductID] [int] NOT NULL, [BusinessEntityID] [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 SQL_Latin1_General_CP1_CI_AS NOT NULL, [ModifiedDate] [datetime] NOT NULL ) ON [PRIMARY] EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Primary key. Foreign key to Product.ProductID.' , @level0type=N'SCHEMA',@level0name=N'Purchasing', @level1type=N'TABLE',@level1name=N'ProductVendor', @level2type=N'COLUMN',@level2name=N'ProductID' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Primary key. Foreign key to Vendor.BusinessEntityID.' , @level0type=N'SCHEMA',@level0name=N'Purchasing', @level1type=N'TABLE',@level1name=N'ProductVendor', @level2type=N'COLUMN',@level2name=N'BusinessEntityID' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'The average span of time (in days) between placing an order with the vendor and receiving the purchased product.' , @level0type=N'SCHEMA',@level0name=N'Purchasing', @level1type=N'TABLE',@level1name=N'ProductVendor', @level2type=N'COLUMN',@level2name=N'AverageLeadTime' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'The vendor''s usual selling price.' , @level0type=N'SCHEMA',@level0name=N'Purchasing', @level1type=N'TABLE',@level1name=N'ProductVendor', @level2type=N'COLUMN',@level2name=N'StandardPrice' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'The selling price when last purchased.' , @level0type=N'SCHEMA',@level0name=N'Purchasing', @level1type=N'TABLE',@level1name=N'ProductVendor', @level2type=N'COLUMN',@level2name=N'LastReceiptCost' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Date the product was last received by the vendor.' , @level0type=N'SCHEMA',@level0name=N'Purchasing', @level1type=N'TABLE',@level1name=N'ProductVendor', @level2type=N'COLUMN',@level2name=N'LastReceiptDate' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'The maximum quantity that should be ordered.' , @level0type=N'SCHEMA',@level0name=N'Purchasing', @level1type=N'TABLE',@level1name=N'ProductVendor', @level2type=N'COLUMN',@level2name=N'MinOrderQty' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'The minimum quantity that should be ordered.' , @level0type=N'SCHEMA',@level0name=N'Purchasing', @level1type=N'TABLE',@level1name=N'ProductVendor', @level2type=N'COLUMN',@level2name=N'MaxOrderQty' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'The quantity currently on order.' , @level0type=N'SCHEMA',@level0name=N'Purchasing', @level1type=N'TABLE',@level1name=N'ProductVendor', @level2type=N'COLUMN',@level2name=N'OnOrderQty' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'The product''s unit of measure.' , @level0type=N'SCHEMA',@level0name=N'Purchasing', @level1type=N'TABLE',@level1name=N'ProductVendor', @level2type=N'COLUMN',@level2name=N'UnitMeasureCode' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Date and time the record was last updated.' , @level0type=N'SCHEMA',@level0name=N'Purchasing', @level1type=N'TABLE',@level1name=N'ProductVendor', @level2type=N'COLUMN',@level2name=N'ModifiedDate' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Cross-reference table mapping vendors with the products they supply.' , @level0type=N'SCHEMA',@level0name=N'Purchasing', @level1type=N'TABLE',@level1name=N'ProductVendor'

#### See also

List of Tables