Owner: Production 
Creation Date: 04/26/2006 
Located On: PRIMARY 
Data Size KB: 24 
Index Size KB: 16 
Rows: 395 
Description: Changes in the cost of a product over time. 


Name Data Type Length NULL Default IsIdentity IsGUID Description
    ProductID  int          Product identification number. Foreign key to Product.ProductID 
    StartDate  datetime          Product cost start date. 
    EndDate  datetime          Product cost end date. 
    StandardCost  money          Standard cost of the product. 
    ModifiedDate  datetime    (getdate())      Date and time the record was last updated. 
Total: 5 column(s)


Index Primary Unique Description
  PK_ProductCostHistory_ProductID_StartDate      Primary key (clustered) constraint 
Total: 1 index(es)

Check Constraints

Name Expression
  CK_ProductCostHistory_EndDate  ([EndDate]>=[StartDate] OR [EndDate] IS NULL) 
  CK_ProductCostHistory_StandardCost  ([StandardCost]>=(0.00)) 
Total: 2 constraint(s)

Referenced Tables

Table Foreign Key Primary Key or Unique Constraint
  Production.Product  FK_ProductCostHistory_Product_ProductID  PK_Product_ProductID 
Total: 1 table(s)

Objects that [Production].[ProductCostHistory] depends on

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

Objects that depend on [Production].[ProductCostHistory]

Object Name Owner Object Type Dep Level
  ufnGetProductStandardCost  dbo  Function 
Total: 1 object(s)


CREATE TABLE [ProductCostHistory] (
    [ProductID] [int] NOT NULL ,
    [StartDate] [datetime] NOT NULL ,
    [EndDate] [datetime] NULL ,
    [StandardCost] [money] NOT NULL ,
    [ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_ProductCostHistory_ModifiedDate] DEFAULT (getdate()),
    CONSTRAINT [PK_ProductCostHistory_ProductID_StartDate] PRIMARY KEY  CLUSTERED
    )  ON [PRIMARY] ,
    CONSTRAINT [FK_ProductCostHistory_Product_ProductID] FOREIGN KEY
    ) REFERENCES [Product] (
    CONSTRAINT [CK_ProductCostHistory_EndDate] CHECK ([EndDate]>=[StartDate] OR [EndDate] IS NULL),
    CONSTRAINT [CK_ProductCostHistory_StandardCost] CHECK ([StandardCost]>=(0.00))

See Also

List of tables