First thing that comes to mind:
Three static tables joined by a "records" table:
Shops:
| id | Name |
~~~~~~~~~~~~~
| 1 | A |
-------------
| 2 | B |
-------------
| 3 | C |
-------------
...and so on...
Timeframes (day / time-frame combos):
| id | Day | StartTime | EndTime|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 1 | Mon | 2:00pm | 3:00pm |
---------------------------------
| 2 | Mon | 7:00pm | 8:00pm |
---------------------------------
| 3 | Sun | 2:00pm | 3:00pm |
---------------------------------
... and so on...
Categories:
| id | Name |
~~~~~~~~~~~~~~~~~
| 1 | Alcohol |
-----------------
| 2 | Clothing |
-----------------
| 3 | Groceries|
-----------------
... and so on...
Then comes your Records table:
| id | Shops_ids | Timeframe_ids | Category_ids |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Inside this table, you store arrays (possible in PostreSLQ). This keeps you from having so many almost-duplicate rows.
For example: "Store A and B are both offering deals on categories 2 and 3 on Monday and Sunday from 2pm to 3pm" could be stored as:
| id | Shops_ids | Timeframe_ids | Category_ids |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 1 | [1,2] | [2,3] | [1,3] |
-------------------------------------------------
However, the point of a relational database is that the data on the back end can be complex and computers are really good at finding data quickly.
So, if I were you, I would just create the Records table with individual values, you could index the columns you are most likely to search, which would be really hard to do with array values. The Records table will be large and messy, but much easier to query.
Example
1.) Shop A gives a deal on categories 1 and 3 from 4pm to 5pm on Monday through Friday
2.) Shop B gives a deal on categories 1 and 3 from 1pm to 6pm on Thursday and Saturday
Given: Shops and Categories are already in their respective tables.
Let's adjust our definition of 'Day' to accommodate the following:
M = Monday
T = Tuesday
W = Wednesday
H = Thursday
A = Saturday
U = Sunday
(This string could be generated from a series of checkboxes on a form to keep formatting)
TimeFrames
| id | Day | StartTime | EndTime|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 1 | M | 2:00pm | 3:00pm |
----------------------------------
| 2 | M | 7:00pm | 8:00pm |
----------------------------------
| 3 | FAU | 2:00pm | 3:00pm | *(Friday, Sat, Sunday)
----------------------------------
| 4 | MTWHF| 4:00pm | 5:00pm | *Shop A's sale.
----------------------------------
| 5 | HA | 1:00pm | 6:00pm | *Shop B's sale.
----------------------------------
Records
| id | Shops_ids | Timeframe_ids | Category_ids |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 1 | [1,2] | [2,3] | [1,3] |
-------------------------------------------------
| 2 | 1 | 4 | [1,3] | *Shop A's sale
-------------------------------------------------
| 3 | 2 | 5 | [1,3] | *Shop B's sale
-------------------------------------------------
Hope that helps.