The ER diagram was cerated using https://databasediagram.com/app
Code for the ER diagram
d_date
-
d_date_id int PK
date date
day_of_week int
week int
month int
quarter int
year int
d_store
-
d_store_id int PK
store_type varchar(5)
assortment varchar(5)
competition_distance int
competition_since_year int
b_holidays
-
b_holiday_id int PK
school_holiday boolean
statee_holiday boolean
date_id int FK > d_date.d_date_id
store_id int FK >d_store.d_store_id
d_promotion
-
d_promotion_id int PK
promotion boolean
d_state
-
d_state_id int PK
open_state boolean
f_sales
-
sales_id int PK
sales int
customers int
promotion boolean
state_id int FK > d_state.d_state_id
promotion_id int FK > d_promotion.d_promotion_id
date_id int FK > d_date.d_date_id
store_id int FK > d_store.d_store_id