I am currently keeping track of which users download which item from the object1 table so my table looks something like this:
download_id | user_id | object1_id | timestamp |
---|---|---|---|
1 | 2 | 5 | 2024-06-27 06:56:24 |
2 | 2 | 3 | 2024-06-27 07:02:33 |
I am now adding a new table lets call it object2, shall I add in a new column to the downloads table so it looks like:
| download_id | user_id | object1_id| object2_id | timestamp |
| ——– | ——– | ——– |——– |——– |
| 1 | 2 | 5 | null |2024-06-27 06:56:24 |
| 2 | 2 | 3 | null |2024-06-27 07:02:33 |
| 3 | 1 | null | 3 |2024-06-27 06:56:24 |
| 4 | 2 | null | 2 |2024-06-27 07:02:33 |
or should I create two separate downloads tables for each.
Few things to note, I will not need more object tables so the issue of scaling and needing more columns/downloads tables isn’t something I am thinking about. These aren’t necessarily going to be viewed, at least not yet. Using them more for security purposes, a precaution if you will. IF we need to look at them we can. Is there a benefits to doing it one way over the other or am I simply overthinking this.