Physical name  SALE  S
Logical nameSale
Attributes9
DescriptionFact table containing all sales info:
- number of pieces
- average price
- revenue

PKPhysical nameDatatypeFK Ref.Description
PRODUCT_IDINTEGERPRODUCT.PRODUCT_ID [prod_sale] 
STORE_IDINTEGERSTORE.STORE_ID [store_sale] 
YEAR_IDSMALLINTMONTH.YEAR_ID [mon_sale]Year in the YYYY form.
MONTH_IDDECIMAL (6,0)MONTH.MONTH_ID [mon_sale]Month identification in the YYYYMM form.
 PCSINTEGER  
 PRICEDECIMAL (9,2) Average price in the given period.
 REVENUEDECIMAL (9,2)  
 FLAGSMALLINT Internal flag.
 REGION_IDSMALLINTREGION.REGION_ID [reg_sale] 

Indexes
xsale_year YEAR_ID 
XPK_SALEUNIQUE  PRODUCT_ID 
STORE_ID 
YEAR_ID 
MONTH_ID 
xsale_store STORE_ID 
xsale_reg REGION_ID 
xsale_prod PRODUCT_ID 

ReferencesReferenced by
MONTH [mon_sale]
STORE [store_sale]
PRODUCT [prod_sale]
REGION [reg_sale]