Name: Digger Nick 2013-07-04 16:26
Got a mySQL question,
I'm trying to figure out the best way of doing this I have a table for time slots, and what I want is to have a groups of these slots with ids unique to the group.
Would it be better to use a junction table or would the way it is work just fine?
+------------+------------+---------+------------+
| Group Id | Slot id | Time | Date |
+------------+------------+---------+------------+
| 1 | 1 | 2 bongs | Nov 5 1605 |
+------------+------------+---------+------------+
| 1 | 2 | 3 bongs | Nov 5 1605 |
+------------+------------+---------+------------+
| 2 | 1 | 1 bongs | Nov 12 1605|
+------------+------------+---------+------------+
| 2 | 2 | 7 bongs | Nov 12 1605|
+------------+------------+---------+------------+
I'm trying to figure out the best way of doing this I have a table for time slots, and what I want is to have a groups of these slots with ids unique to the group.
Would it be better to use a junction table or would the way it is work just fine?
+------------+------------+---------+------------+
| Group Id | Slot id | Time | Date |
+------------+------------+---------+------------+
| 1 | 1 | 2 bongs | Nov 5 1605 |
+------------+------------+---------+------------+
| 1 | 2 | 3 bongs | Nov 5 1605 |
+------------+------------+---------+------------+
| 2 | 1 | 1 bongs | Nov 12 1605|
+------------+------------+---------+------------+
| 2 | 2 | 7 bongs | Nov 12 1605|
+------------+------------+---------+------------+