Difference between revisions of "Production.Product (table)"
Line 12: | Line 12: | ||
+ | === 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 18: | Line 19: | ||
| '''Nullable | | '''Nullable | ||
| '''Default | | '''Default | ||
− | | '''Description | + | | '''Description |
|- valign="top" | |- valign="top" | ||
Line 25: | Line 26: | ||
| not null | | not null | ||
| | | | ||
− | | Primary key for Product records. | + | | Primary key for Product records. |
|- valign="top" | |- valign="top" | ||
| Name | | Name | ||
Line 31: | Line 32: | ||
| not null | | not null | ||
| | | | ||
− | | Name of the product. | + | | Name of the product. |
|- valign="top" | |- valign="top" | ||
| ProductNumber | | ProductNumber | ||
Line 37: | Line 38: | ||
| not null | | not null | ||
| | | | ||
− | | Unique product identification number. | + | | Unique product identification number. |
|- valign="top" | |- valign="top" | ||
| MakeFlag | | MakeFlag | ||
Line 43: | Line 44: | ||
| not null | | not null | ||
| ((1)) | | ((1)) | ||
− | | 0 = Product is purchased, 1 = Product is manufactured in-house. | + | | 0 = Product is purchased, 1 = Product is manufactured in-house. |
|- valign="top" | |- valign="top" | ||
| FinishedGoodsFlag | | FinishedGoodsFlag | ||
Line 49: | Line 50: | ||
| not null | | not null | ||
| ((1)) | | ((1)) | ||
− | | 0 = Product is not a salable item. 1 = Product is salable. | + | | 0 = Product is not a salable item. 1 = Product is salable. |
|- valign="top" | |- valign="top" | ||
| Color | | Color | ||
Line 55: | Line 56: | ||
| null | | null | ||
| | | | ||
− | | Product color. | + | | Product color. |
|- valign="top" | |- valign="top" | ||
| SafetyStockLevel | | SafetyStockLevel | ||
Line 61: | Line 62: | ||
| not null | | not null | ||
| | | | ||
− | | Minimum inventory quantity. | + | | Minimum inventory quantity. |
|- valign="top" | |- valign="top" | ||
| ReorderPoint | | ReorderPoint | ||
Line 67: | Line 68: | ||
| not null | | not null | ||
| | | | ||
− | | Inventory level that triggers a purchase order or work order. | + | | Inventory level that triggers a purchase order or work order. |
|- valign="top" | |- valign="top" | ||
| StandardCost | | StandardCost | ||
Line 73: | Line 74: | ||
| not null | | not null | ||
| | | | ||
− | | Standard cost of the product. | + | | Standard cost of the product. |
|- valign="top" | |- valign="top" | ||
| ListPrice | | ListPrice | ||
Line 79: | Line 80: | ||
| not null | | not null | ||
| | | | ||
− | | Selling price. | + | | Selling price. |
|- valign="top" | |- valign="top" | ||
| Size | | Size | ||
Line 85: | Line 86: | ||
| null | | null | ||
| | | | ||
− | | Product size. | + | | Product size. |
|- valign="top" | |- valign="top" | ||
| SizeUnitMeasureCode | | SizeUnitMeasureCode | ||
Line 91: | Line 92: | ||
| null | | null | ||
| | | | ||
− | | Unit of measure for Size column. | + | | Unit of measure for Size column. |
|- valign="top" | |- valign="top" | ||
| WeightUnitMeasureCode | | WeightUnitMeasureCode | ||
Line 97: | Line 98: | ||
| null | | null | ||
| | | | ||
− | | Unit of measure for Weight column. | + | | Unit of measure for Weight column. |
|- valign="top" | |- valign="top" | ||
| Weight | | Weight | ||
Line 103: | Line 104: | ||
| null | | null | ||
| | | | ||
− | | Product weight. | + | | Product weight. |
|- valign="top" | |- valign="top" | ||
| DaysToManufacture | | DaysToManufacture | ||
Line 109: | Line 110: | ||
| not null | | not null | ||
| | | | ||
− | | Number of days required to manufacture the product. | + | | Number of days required to manufacture the product. |
|- valign="top" | |- valign="top" | ||
| ProductLine | | ProductLine | ||
Line 115: | Line 116: | ||
| null | | null | ||
| | | | ||
− | | R = Road, M = Mountain, T = Touring, S = Standard | + | | R = Road, M = Mountain, T = Touring, S = Standard |
|- valign="top" | |- valign="top" | ||
| Class | | Class | ||
Line 121: | Line 122: | ||
| null | | null | ||
| | | | ||
− | | H = High, M = Medium, L = Low | + | | H = High, M = Medium, L = Low |
|- valign="top" | |- valign="top" | ||
| Style | | Style | ||
Line 127: | Line 128: | ||
| null | | null | ||
| | | | ||
− | | W = Womens, M = Mens, U = Universal | + | | W = Womens, M = Mens, U = Universal |
|- valign="top" | |- valign="top" | ||
| ProductSubcategoryID | | ProductSubcategoryID | ||
Line 133: | Line 134: | ||
| null | | null | ||
| | | | ||
− | | Product is a member of this product subcategory. Foreign key to ProductSubCategory.ProductSubCategoryID. | + | | Product is a member of this product subcategory. Foreign key to ProductSubCategory.ProductSubCategoryID. |
|- valign="top" | |- valign="top" | ||
| ProductModelID | | ProductModelID | ||
Line 139: | Line 140: | ||
| null | | null | ||
| | | | ||
− | | Product is a member of this product model. Foreign key to ProductModel.ProductModelID. | + | | Product is a member of this product model. Foreign key to ProductModel.ProductModelID. |
|- valign="top" | |- valign="top" | ||
| SellStartDate | | SellStartDate | ||
Line 145: | Line 146: | ||
| not null | | not null | ||
| | | | ||
− | | Date the product was available for sale. | + | | Date the product was available for sale. |
|- valign="top" | |- valign="top" | ||
| SellEndDate | | SellEndDate | ||
Line 151: | Line 152: | ||
| null | | null | ||
| | | | ||
− | | Date the product was no longer available for sale. | + | | Date the product was no longer available for sale. |
|- valign="top" | |- valign="top" | ||
| DiscontinuedDate | | DiscontinuedDate | ||
Line 157: | Line 158: | ||
| null | | null | ||
| | | | ||
− | | Date the product was discontinued. | + | | Date the product was discontinued. |
|- valign="top" | |- valign="top" | ||
| rowguid | | rowguid | ||
Line 163: | Line 164: | ||
| not null | | not null | ||
| (newid()) | | (newid()) | ||
− | | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. | + | | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. |
|- valign="top" | |- valign="top" | ||
| ModifiedDate | | ModifiedDate | ||
Line 169: | Line 170: | ||
| not null | | not null | ||
| (getdate()) | | (getdate()) | ||
− | | Date and time the record was last updated. | + | | 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 | ||
+ | |- | ||
+ | | PK_Product_ProductID | ||
+ | | ProductID | ||
+ | |} | ||
+ | |||
+ | === Indexes === | ||
+ | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
+ | |- style="background:silver" | ||
+ | | '''Index | ||
+ | | '''Type | ||
+ | | '''Columns | ||
+ | |||
+ | |- | ||
+ | | AK_Product_ProductNumber | ||
+ | | Unique | ||
+ | | ProductNumber | ||
+ | |- | ||
+ | | AK_Product_Name | ||
+ | | Unique | ||
+ | | Name | ||
+ | |- | ||
+ | | AK_Product_rowguid | ||
+ | | Unique | ||
+ | | rowguid | ||
+ | |} | ||
+ | === Check Constraints === | ||
+ | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
+ | |- style="background:silver" | ||
+ | | '''Check Constraint | ||
+ | | '''Expression | ||
+ | | '''Description | ||
+ | |||
+ | |- | ||
+ | | CK_Product_Class | ||
+ | | (upper([Class])='H' OR upper([Class])='M' OR upper([Class])='L' OR [Class] IS NULL) | ||
+ | | Check constraint [Class]='h' OR [Class]='m' OR [Class]='l' OR [Class]='H' OR [Class]='M' OR [Class]='L' OR [Class] IS NULL | ||
+ | |- | ||
+ | | CK_Product_DaysToManufacture | ||
+ | | ([DaysToManufacture]>=(0)) | ||
+ | | Check constraint [DaysToManufacture] >= (0) | ||
+ | |- | ||
+ | | CK_Product_ListPrice | ||
+ | | ([ListPrice]>=(0.00)) | ||
+ | | Check constraint [ListPrice] >= (0.00) | ||
+ | |- | ||
+ | | CK_Product_ProductLine | ||
+ | | (upper([ProductLine])='R' OR upper([ProductLine])='M' OR upper([ProductLine])='T' OR upper([ProductLine])='S' OR [ProductLine] IS NULL) | ||
+ | | Check constraint [ProductLine]='r' OR [ProductLine]='m' OR [ProductLine]='t' OR [ProductLine]='s' OR [ProductLine]='R' OR [ProductLine]='M' OR [ProductLine]='T' OR [ProductLine]='S' OR [ProductLine] IS NULL | ||
+ | |- | ||
+ | | CK_Product_ReorderPoint | ||
+ | | ([ReorderPoint]>(0)) | ||
+ | | Check constraint [ReorderPoint] > (0) | ||
+ | |- | ||
+ | | CK_Product_SafetyStockLevel | ||
+ | | ([SafetyStockLevel]>(0)) | ||
+ | | Check constraint [SafetyStockLevel] > (0) | ||
+ | |- | ||
+ | | CK_Product_SellEndDate | ||
+ | | ([SellEndDate]>=[SellStartDate] OR [SellEndDate] IS NULL) | ||
+ | | Check constraint [SellEndDate] >= [SellStartDate] OR [SellEndDate] IS NULL | ||
+ | |- | ||
+ | | CK_Product_StandardCost | ||
+ | | ([StandardCost]>=(0.00)) | ||
+ | | Check constraint [SafetyStockLevel] > (0) | ||
+ | |- | ||
+ | | CK_Product_Style | ||
+ | | (upper([Style])='U' OR upper([Style])='M' OR upper([Style])='W' OR [Style] IS NULL) | ||
+ | | Check constraint [Style]='u' OR [Style]='m' OR [Style]='w' OR [Style]='U' OR [Style]='M' OR [Style]='W' OR [Style] IS NULL | ||
+ | |- | ||
+ | | CK_Product_Weight | ||
+ | | ([Weight]>(0.00)) | ||
+ | | Check constraint [Weight] > (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 198: | Line 278: | ||
|} | |} | ||
− | + | === Detail Tables === | |
{| 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 263: | Line 343: | ||
|} | |} | ||
− | + | === References === | |
{| 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 279: | Line 359: | ||
| Type | | Type | ||
| [[dbo.Name_(type)|dbo.Name]] | | [[dbo.Name_(type)|dbo.Name]] | ||
+ | |||
+ | |- | ||
+ | | Schema | ||
+ | | Schema | ||
+ | | [[Production_(schema)|Production]] | ||
|} | |} | ||
− | + | === Dependencies === | |
{| 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 320: | Line 405: | ||
|} | |} | ||
− | |||
Revision as of 23:06, 2 February 2010
Contents
wikibot
Table | Production.Product |
Description | Products sold or used in the manfacturing of sold products. |
Columns
Column | Data Type | Nullable | Default | Description |
ProductID | int | not null | Primary key for Product records. | |
Name | dbo.Name | not null | Name of the product. | |
ProductNumber | nvarchar(25) | not null | Unique product identification number. | |
MakeFlag | dbo.Flag | not null | ((1)) | 0 = Product is purchased, 1 = Product is manufactured in-house. |
FinishedGoodsFlag | dbo.Flag | not null | ((1)) | 0 = Product is not a salable item. 1 = Product is salable. |
Color | nvarchar(15) | null | Product color. | |
SafetyStockLevel | smallint | not null | Minimum inventory quantity. | |
ReorderPoint | smallint | not null | Inventory level that triggers a purchase order or work order. | |
StandardCost | money | not null | Standard cost of the product. | |
ListPrice | money | not null | Selling price. | |
Size | nvarchar(5) | null | Product size. | |
SizeUnitMeasureCode | nchar(3) | null | Unit of measure for Size column. | |
WeightUnitMeasureCode | nchar(3) | null | Unit of measure for Weight column. | |
Weight | decimal(8, 2) | null | Product weight. | |
DaysToManufacture | int | not null | Number of days required to manufacture the product. | |
ProductLine | nchar(2) | null | R = Road, M = Mountain, T = Touring, S = Standard | |
Class | nchar(2) | null | H = High, M = Medium, L = Low | |
Style | nchar(2) | null | W = Womens, M = Mens, U = Universal | |
ProductSubcategoryID | int | null | Product is a member of this product subcategory. Foreign key to ProductSubCategory.ProductSubCategoryID. | |
ProductModelID | int | null | Product is a member of this product model. Foreign key to ProductModel.ProductModelID. | |
SellStartDate | datetime | not null | Date the product was available for sale. | |
SellEndDate | datetime | null | Date the product was no longer available for sale. | |
DiscontinuedDate | datetime | null | Date the product was discontinued. | |
rowguid | uniqueidentifier | not null | (newid()) | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. |
ModifiedDate | datetime | not null | (getdate()) | Date and time the record was last updated. |
Primary Key
Primary Key | Columns |
PK_Product_ProductID | ProductID |
Indexes
Index | Type | Columns |
AK_Product_ProductNumber | Unique | ProductNumber |
AK_Product_Name | Unique | Name |
AK_Product_rowguid | Unique | rowguid |
Check Constraints
Check Constraint | Expression | Description |
CK_Product_Class | (upper([Class])='H' OR upper([Class])='M' OR upper([Class])='L' OR [Class] IS NULL) | Check constraint [Class]='h' OR [Class]='m' OR [Class]='l' OR [Class]='H' OR [Class]='M' OR [Class]='L' OR [Class] IS NULL |
CK_Product_DaysToManufacture | ([DaysToManufacture]>=(0)) | Check constraint [DaysToManufacture] >= (0) |
CK_Product_ListPrice | ([ListPrice]>=(0.00)) | Check constraint [ListPrice] >= (0.00) |
CK_Product_ProductLine | (upper([ProductLine])='R' OR upper([ProductLine])='M' OR upper([ProductLine])='T' OR upper([ProductLine])='S' OR [ProductLine] IS NULL) | Check constraint [ProductLine]='r' OR [ProductLine]='m' OR [ProductLine]='t' OR [ProductLine]='s' OR [ProductLine]='R' OR [ProductLine]='M' OR [ProductLine]='T' OR [ProductLine]='S' OR [ProductLine] IS NULL |
CK_Product_ReorderPoint | ([ReorderPoint]>(0)) | Check constraint [ReorderPoint] > (0) |
CK_Product_SafetyStockLevel | ([SafetyStockLevel]>(0)) | Check constraint [SafetyStockLevel] > (0) |
CK_Product_SellEndDate | ([SellEndDate]>=[SellStartDate] OR [SellEndDate] IS NULL) | Check constraint [SellEndDate] >= [SellStartDate] OR [SellEndDate] IS NULL |
CK_Product_StandardCost | ([StandardCost]>=(0.00)) | Check constraint [SafetyStockLevel] > (0) |
CK_Product_Style | (upper([Style])='U' OR upper([Style])='M' OR upper([Style])='W' OR [Style] IS NULL) | Check constraint [Style]='u' OR [Style]='m' OR [Style]='w' OR [Style]='U' OR [Style]='M' OR [Style]='W' OR [Style] IS NULL |
CK_Product_Weight | ([Weight]>(0.00)) | Check constraint [Weight] > (0.00) |
Foreign Keys
Relation | Column | Referenced Column |
Production.ProductModel | ProductModelID | ProductModelID |
Production.ProductSubcategory | ProductSubcategoryID | ProductSubcategoryID |
Production.UnitMeasure | SizeUnitMeasureCode | UnitMeasureCode |
Production.UnitMeasure | WeightUnitMeasureCode | UnitMeasureCode |
Detail Tables
Detail Table | Column | Referencing Column |
Production.BillOfMaterials | ProductID | ComponentID |
Production.BillOfMaterials | ProductID | ProductAssemblyID |
Production.ProductCostHistory | ProductID | ProductID |
Production.ProductDocument | ProductID | ProductID |
Production.ProductInventory | ProductID | ProductID |
Production.ProductListPriceHistory | ProductID | ProductID |
Production.ProductProductPhoto | ProductID | ProductID |
Production.ProductReview | ProductID | ProductID |
Purchasing.ProductVendor | ProductID | ProductID |
Purchasing.PurchaseOrderDetail | ProductID | ProductID |
Sales.ShoppingCartItem | ProductID | ProductID |
Sales.SpecialOfferProduct | ProductID | ProductID |
Production.TransactionHistory | ProductID | ProductID |
Production.WorkOrder | ProductID | ProductID |
References
Dependency Type | Object Type | Referenced Object |
Data Type | Type | dbo.Flag |
Data Type | Type | dbo.Name |
Schema | Schema | Production |
Dependencies
Reference Type | Object Type | Referencing Object |
Select | View | Production.vProductAndDescription |
Select | Procedure | dbo.uspGetBillOfMaterials |
Select | Procedure | dbo.uspGetWhereUsedProductID |
Select | Function | dbo.ufnGetProductDealerPrice |
Select | Function | dbo.ufnGetProductListPrice |
Select | Function | dbo.ufnGetProductStandardCost |
automatically generated
Table | Production.Product |
Description | Products sold or used in the manfacturing of sold products. |
Column | Data Type | Nullable | Default | Description / PK / Index |
ProductID | int | not null | Primary key for Product records. PK_Product_ProductID | |
Name | Name | not null | Name of the product. AK_Product_Name | |
ProductNumber | nvarchar(25) | not null | Unique product identification number. AK_Product_ProductNumber | |
MakeFlag | Flag | not null | (1) | 0 = Product is purchased, 1 = Product is manufactured in-house. |
FinishedGoodsFlag | Flag | not null | (1) | 0 = Product is not a salable item. 1 = Product is salable. |
Color | nvarchar(15) | null | Product color. | |
SafetyStockLevel | smallint | not null | Minimum inventory quantity. | |
ReorderPoint | smallint | not null | Inventory level that triggers a purchase order or work order. | |
StandardCost | money | not null | Standard cost of the product. | |
ListPrice | money | not null | Selling price. | |
Size | nvarchar(5) | null | Product size. | |
SizeUnitMeasureCode | nchar(3) | null | Unit of measure for Size column. | |
WeightUnitMeasureCode | nchar(3) | null | Unit of measure for Weight column. | |
Weight | decimal(8, 2) | null | Product weight. | |
DaysToManufacture | int | not null | Number of days required to manufacture the product. | |
ProductLine | nchar(2) | null | R = Road, M = Mountain, T = Touring, S = Standard | |
Class | nchar(2) | null | H = High, M = Medium, L = Low | |
Style | nchar(2) | null | W = Womens, M = Mens, U = Universal | |
ProductSubcategoryID | int | null | Product is a member of this product subcategory. Foreign key to ProductSubCategory.ProductSubCategoryID. | |
ProductModelID | int | null | Product is a member of this product model. Foreign key to ProductModel.ProductModelID. | |
SellStartDate | datetime | not null | Date the product was available for sale. | |
SellEndDate | datetime | null | Date the product was no longer available for sale. | |
DiscontinuedDate | datetime | null | Date the product was discontinued. | |
rowguid | uniqueidentifier | not null | (NEWID()) | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. AK_Product_rowguid |
ModifiedDate | datetime | not null | (GETDATE()) | Date and time the record was last updated. |
Relation | Column | Referenced Column |
Production.ProductModel | ProductModelID | ProductModelID |
Production.ProductSubcategory | ProductSubcategoryID | ProductSubcategoryID |
Production.UnitMeasure | SizeUnitMeasureCode | UnitMeasureCode |
Production.UnitMeasure | WeightUnitMeasureCode | UnitMeasureCode |
Detail Table | Column | Referencing Column |
Production.BillOfMaterials | ProductID | ComponentID |
Production.BillOfMaterials | ProductID | ProductAssemblyID |
Production.ProductCostHistory | ProductID | ProductID |
Production.ProductDocument | ProductID | ProductID |
Production.ProductInventory | ProductID | ProductID |
Production.ProductListPriceHistory | ProductID | ProductID |
Production.ProductProductPhoto | ProductID | ProductID |
Production.ProductReview | ProductID | ProductID |
Purchasing.ProductVendor | ProductID | ProductID |
Purchasing.PurchaseOrderDetail | ProductID | ProductID |
Sales.ShoppingCartItem | ProductID | ProductID |
Sales.SpecialOfferProduct | ProductID | ProductID |
Production.TransactionHistory | ProductID | ProductID |
Production.WorkOrder | ProductID | ProductID |
Dependency Type | Object Type | Referenced Object |
Data Type | Type | dbo.Flag |
Data Type | Type | dbo.Name |
Schema | Schema | Production |
Reference Type | Object Type | Referencing Object |
Select | View | Production.vProductAndDescription |
Select | Procedure | dbo.uspGetBillOfMaterials |
Select | Procedure | dbo.uspGetWhereUsedProductID |
Select | Function | dbo.ufnGetProductDealerPrice |
Select | Function | dbo.ufnGetProductListPrice |
Select | Function | dbo.ufnGetProductStandardCost |