This schema is cataloguing restaurant data.
Open_hours stores hours for each day of the week, referencing the days table for day of the week.
Special_hours is a table for any days in a calendar year when a restaurant may have modified hours
For tables like analytics, I'm unsure whether or not it needs its own primary key since its rows are directly dependent on the business_id.
I'm also not sure whether the junction table is necessary between attributes and attribute_params. Some attributes are simply boolean TRUE if they exist, such as "wheelchair_accessible"
But for values like "wifi" there may be a non-boolean parameter like "no," "free" or "paid"
What mistakes if any am I making with my composite keys / junctions? Am I missing any that should exist?
Should I create primary keys for tables like analytics or attribute_params?
Edit:
I believe I was missing a junction table between open_hours and days so I added that.