dbo.prices
| Documentation | Products |
| Schema | dbo |
| Name | prices |
| Module | Products |
History of product prices. Each product can have multiple price types and multiple historical entries.
Columns
| Key | Name | Data type | Null | Attributes | References | Description | ||
|---|---|---|---|---|---|---|---|---|
| 1 | price_id | int | Identity | Row ID | ||||
| Row ID Identity |
||||||||
| 2 | product_id | int | dbo.products | Refs products | ||||
| Refs products References: dbo.products |
||||||||
| 3 | valid_friom | date | Price valid from date | |||||
| Price valid from date |
||||||||
| 4 | valid_to | date | Price valid to date or null when price still valid. There should be only one row per product_id, price_type with null valid_to. | |||||
| Price valid to date or null when price still valid. There should be only one row per product_id, price_type with null valid_to. |
||||||||
| 5 | price | decimal(18, 0) | Price in currency | |||||
| Price in currency |
||||||||
| 6 | currency | nchar(3) | dbo.dictionary | Price currency (e.g. USD, EUR, GBP) | ||||
| Price currency (e.g. USD, EUR, GBP) References: dbo.dictionary |
||||||||
| 7 | price_usd | decimal(18, 0) | Price in USD | |||||
| Price in USD |
||||||||
| 8 | price_type | nvarchar(50) | Code of price type | |||||
| Code of price type |
||||||||
Relations
| Foreign table | Primary table | Join | Title / Name / Description | |
|---|---|---|---|---|
| dbo.prices | dbo.dictionary | dbo.prices.currency = dbo.dictionary.val | User-defined relation Where dictionary = 'CUR' |
|
|
dbo.prices.currency = dbo.dictionary.val Name: User-defined relationWhere dictionary = 'CUR' |
||||
| dbo.prices | dbo.products | dbo.prices.product_id = dbo.products.product_id | User-defined relation |
|
|
dbo.prices.product_id = dbo.products.product_id Name: User-defined relation |
||||
Unique keys
| Key name | Columns | Description | |
|---|---|---|---|
| PK_prices | price_id | ||
Uses
| Name |
|---|
|
dbo.prices
|
Exported: 2019-02-04 23:17, Last imported: 2018-04-10 17:07
