AdventureWorks
Production.ProductModel Table
Description
Product model classification.
Properties
Creation Date08/01/2010 08:40
File GroupPRIMARY
Text File GroupPRIMARY
System Object
Published for Replication
Rows128
Data Space Used144.00 KB
Index Space Used48.00 KB
Columns
 Column NameDescriptionDatatypeLengthAllow NullsDefaultFormula
Primary Key ProductModelIDPrimary key for ProductModel records.int4   
 NameProduct model description.dbo.Name50   
 CatalogDescriptionDetailed product catalog information in xml format.Production.ProductDescriptionSchemaCollection16  
 InstructionsManufacturing instructions in xml format.Production.ManuInstructionsSchemaCollection16  
 rowguidROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.uniqueidentifier16 
(newid())
 
 ModifiedDateDate and time the record was last updated.datetime4 
(getdate())
 
Indexes
IndexDescriptionPrimaryUnique
AK_ProductModel_NameUnique nonclustered index. 
AK_ProductModel_rowguidUnique nonclustered index. Used to support replication samples. 
PK_ProductModel_ProductModelIDPrimary key (clustered) constraint
Relationships
RelationshipDescription
FK_Product_ProductModel_ProductModelIDForeign key constraint referencing ProductModel.ProductModelID.
FK_ProductModelIllustration_ProductModel_ProductModelIDForeign key constraint referencing ProductModel.ProductModelID.
FK_ProductModelProductDescriptionCulture_ProductModel_ProductModelIDForeign key constraint referencing ProductModel.ProductModelID.
Objects that depend on Production.ProductModel
 Database ObjectObject TypeDescriptionDep Level
Production.BillOfMaterials tableProduction.BillOfMaterialsTableItems required to make bicycles and bicycle subassemblies. It identifies the heirarchical relationship between a parent product and its components.2
iduSalesOrderDetail triggeriduSalesOrderDetailTriggerAFTER INSERT, DELETE, UPDATE trigger that inserts a row in the TransactionHistory table, updates ModifiedDate in SalesOrderDetail and updates the SalesOrderHeader.SubTotal column.4
iPurchaseOrderDetail triggeriPurchaseOrderDetailTriggerAFTER INSERT trigger that inserts a row in the TransactionHistory table and updates the PurchaseOrderHeader.SubTotal column.3
iWorkOrder triggeriWorkOrderTriggerAFTER INSERT trigger that inserts a row in the TransactionHistory table.3
Production.Product tableProduction.ProductTableProducts sold or used in the manfacturing of sold products.1
Production.ProductCostHistory tableProduction.ProductCostHistoryTableChanges in the cost of a product over time.2
Production.ProductDocument tableProduction.ProductDocumentTableCross-reference table mapping products to related product documents.2
Production.ProductInventory tableProduction.ProductInventoryTableProduct inventory information.2
Production.ProductListPriceHistory tableProduction.ProductListPriceHistoryTableChanges in the list price of a product over time.2
Production.ProductModelIllustration tableProduction.ProductModelIllustrationTableCross-reference table mapping product models and illustrations.1
Production.ProductModelProductDescriptionCulture tableProduction.ProductModelProductDescriptionCultureTableCross-reference table mapping product descriptions and the language the description is written in.1
Production.ProductProductPhoto tableProduction.ProductProductPhotoTableCross-reference table mapping products and product photos.2
Production.ProductReview tableProduction.ProductReviewTableCustomer reviews of products they have purchased.2
Purchasing.ProductVendor tablePurchasing.ProductVendorTableCross-reference table mapping vendors with the products they supply.2
Purchasing.PurchaseOrderDetail tablePurchasing.PurchaseOrderDetailTableIndividual products associated with a specific purchase order. See PurchaseOrderHeader.2
Sales.SalesOrderDetail tableSales.SalesOrderDetailTableIndividual products associated with a specific sales order. See SalesOrderHeader.3
Sales.ShoppingCartItem tableSales.ShoppingCartItemTableContains online customer orders until the order is submitted or cancelled.2
Sales.SpecialOfferProduct tableSales.SpecialOfferProductTableCross-reference table mapping products to special offer discounts.2
Production.TransactionHistory tableProduction.TransactionHistoryTableRecord of each purchase order, sales order, or work order transaction year to date.2
dbo.ufnGetProductDealerPrice functiondbo.ufnGetProductDealerPriceUser Defined FunctionScalar function returning the dealer price for a given product on a particular order date.2
dbo.ufnGetProductListPrice functiondbo.ufnGetProductListPriceUser Defined FunctionScalar function returning the list price for a given product on a particular order date.2
dbo.ufnGetProductStandardCost functiondbo.ufnGetProductStandardCostUser Defined FunctionScalar function returning the standard cost for a given product on a particular order date.2
dbo.ufnGetStock functiondbo.ufnGetStockUser Defined FunctionScalar function returning the quantity of inventory in LocationID 6 (Miscellaneous Storage)for a specified ProductID.3
uPurchaseOrderDetail triggeruPurchaseOrderDetailTriggerAFTER UPDATE trigger that inserts a row in the TransactionHistory table, updates ModifiedDate in PurchaseOrderDetail and updates the PurchaseOrderHeader.SubTotal column.3
dbo.uspGetBillOfMaterials proceduredbo.uspGetBillOfMaterialsStored ProcedureDescription for uspGetBillOfMaterials in TSQLStored procedure using a recursive query to return a multi-level bill of material for the specified ProductID.2
dbo.uspGetWhereUsedProductID proceduredbo.uspGetWhereUsedProductIDStored ProcedureStored procedure using a recursive query to return all components or assemblies that directly or indirectly use the specified ProductID.2
uWorkOrder triggeruWorkOrderTriggerAFTER UPDATE trigger that inserts a row in the TransactionHistory table, updates ModifiedDate in the WorkOrder table.3
Production.vProductAndDescription viewProduction.vProductAndDescriptionViewProduct names and descriptions. Product descriptions are provided in multiple languages.1
Production.vProductModelCatalogDescription viewProduction.vProductModelCatalogDescriptionViewDisplays the content from each element in the xml column CatalogDescription for each product in the Production.ProductModel table that has catalog data.1
Production.vProductModelInstructions viewProduction.vProductModelInstructionsViewDisplays the content from each element in the xml column Instructions for each product in the Production.ProductModel table that has manufacturing instructions.1
Production.WorkOrder tableProduction.WorkOrderTableManufacturing work orders.2
Production.WorkOrderRouting tableProduction.WorkOrderRoutingTableWork order details.3
Objects that Production.ProductModel depends on
 Database ObjectObject TypeDescriptionDep Level
dbo.Name datatypedbo.NameUser Defined Data Type 1
SQL
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
CREATE TABLE [Production].[ProductModel](
	[ProductModelID] [int] IDENTITY(1,1) NOT NULL,
	[Name] [dbo].[Name] NOT NULL,
	[CatalogDescription] [xml](CONTENT [Production].[ProductDescriptionSchemaCollection]) NULL,
	[Instructions] [xml](CONTENT [Production].[ManuInstructionsSchemaCollection]) NULL,
	[rowguid] [uniqueidentifier] ROWGUIDCOL  NOT NULL,
	[ModifiedDate] [datetime] NOT NULL,
 CONSTRAINT [PK_ProductModel_ProductModelID] PRIMARY KEY CLUSTERED 
(
	[ProductModelID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

ALTER TABLE [Production].[ProductModel] ADD  CONSTRAINT [DF_ProductModel_rowguid]  DEFAULT (newid()) FOR [rowguid]
ALTER TABLE [Production].[ProductModel] ADD  CONSTRAINT [DF_ProductModel_ModifiedDate]  DEFAULT (getdate()) FOR [ModifiedDate]
See Also

Related Objects

Production Schema
AdventureWorks Database

 

 


© 2012 All Rights Reserved.

Send comments on this topic.