L
L
Lexxtor2014-09-04 23:34:38
Database design
Lexxtor, 2014-09-04 23:34:38

How to store store opening hours and determine which ones are open?

The database has a table for stores.
It is necessary to do as in 2GIS:
The graph is displayed in a convenient form.
You can apply the "open" filter - only open stores are displayed.
So far, the option with the period table comes to mind:

store_id
week_day
time_open
time_close

but this is obtained for each store 14 entries, if there is 1 break during the day and the opening hours are not the same every day.
Maybe some other way?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question