| Physical name | SALE | S |
| Logical name | Sale | |
| Attributes | 9 | |
| Description | Fact table containing all sales info: - number of pieces - average price - revenue | |
| PK | Physical name | Datatype | FK Ref. | Description |
| PRODUCT_ID | INTEGER | PRODUCT.PRODUCT_ID [prod_sale] | ||
| STORE_ID | INTEGER | STORE.STORE_ID [store_sale] | ||
| YEAR_ID | SMALLINT | MONTH.YEAR_ID [mon_sale] | Year in the YYYY form. | |
| MONTH_ID | DECIMAL (6,0) | MONTH.MONTH_ID [mon_sale] | Month identification in the YYYYMM form. | |
| PCS | INTEGER | |||
| PRICE | DECIMAL (9,2) | Average price in the given period. | ||
| REVENUE | DECIMAL (9,2) | |||
| FLAG | SMALLINT | Internal flag. | ||
| REGION_ID | SMALLINT | REGION.REGION_ID [reg_sale] |
| Indexes | |||
| xsale_year | YEAR_ID | ||
| XPK_SALE | UNIQUE | PRODUCT_ID | |
| STORE_ID | |||
| YEAR_ID | |||
| MONTH_ID | |||
| xsale_store | STORE_ID | ||
| xsale_reg | REGION_ID | ||
| xsale_prod | PRODUCT_ID | ||
| References | Referenced by |
|
MONTH [mon_sale]
STORE [store_sale] PRODUCT [prod_sale] REGION [reg_sale] |