| Owner: | Production |
| Creation Date: | 04/26/2006 |
| Located On: | PRIMARY |
| Data Size KB: | 24 |
| Index Size KB: | 16 |
| Rows: | 395 |
| Description: | Changes in the list price of a product over time. |
| Name | Data Type | Length | NULL | Default | IsIdentity | IsGUID | Description | ||
| ProductID | int | 4 | Product identification number. Foreign key to Product.ProductID | ||||||
| StartDate | datetime | 8 | List price start date. | ||||||
| EndDate | datetime | 8 | List price end date | ||||||
| ListPrice | money | 8 | Product list price. | ||||||
| ModifiedDate | datetime | 8 | (getdate()) | Date and time the record was last updated. |
| Index | Primary | Unique | Description | |
| PK_ProductListPriceHistory_ProductID_StartDate | Primary key (clustered) constraint |
| Name | Expression | |
| CK_ProductListPriceHistory_EndDate | ([EndDate]>=[StartDate] OR [EndDate] IS NULL) | |
| CK_ProductListPriceHistory_ListPrice | ([ListPrice]>(0.00)) |
| Table | Foreign Key | Primary Key or Unique Constraint | |
| Production.Product | FK_ProductListPriceHistory_Product_ProductID | PK_Product_ProductID |
Objects that [Production].[ProductListPriceHistory] depends on
| Object Name | Owner | Object Type | Dep Level | |
| Flag | dbo | User Defined type | 1 | |
| Name | dbo | User Defined type | 1 | |
| ProductCategory | Production | Table | 2 | |
| ProductModel | Production | Table | 2 | |
| UnitMeasure | Production | Table | 2 | |
| ProductSubcategory | Production | Table | 3 | |
| Product | Production | Table | 4 |
Objects that depend on [Production].[ProductListPriceHistory]
| Object Name | Owner | Object Type | Dep Level | |
| ufnGetProductDealerPrice | dbo | Function | 1 | |
| ufnGetProductListPrice | dbo | Function | 1 |
CREATE TABLE [ProductListPriceHistory] (
[ProductID] [int] NOT NULL ,
[StartDate] [datetime] NOT NULL ,
[EndDate] [datetime] NULL ,
[ListPrice] [money] NOT NULL ,
[ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_ProductListPriceHistory_ModifiedDate] DEFAULT (getdate()),
CONSTRAINT [PK_ProductListPriceHistory_ProductID_StartDate] PRIMARY KEY CLUSTERED
(
[ProductID],
[StartDate]
) ON [PRIMARY] ,
CONSTRAINT [FK_ProductListPriceHistory_Product_ProductID] FOREIGN KEY
(
[ProductID]
) REFERENCES [Product] (
[ProductID]
),
CONSTRAINT [CK_ProductListPriceHistory_EndDate] CHECK ([EndDate]>=[StartDate] OR [EndDate] IS NULL),
CONSTRAINT [CK_ProductListPriceHistory_ListPrice] CHECK ([ListPrice]>(0.00))
) ON [PRIMARY]
GO
See Also
List of tables