I have 3 types of news items, articles
, videos
, pictures
. These are stored in 3 tables.
Around 30% of the time, users will view data from a single table, ie. /videos
.
The other 70% of the time, users will view a feed of all 3 together.
What would be best practice here in terms of table design?
- Keep tables separate and join for the feed.
- Denormalize the data and put everything in a posts table, with null fields for inapplicable data.
- Denormalize the data and put data that does not exist for all 3 tables into some sort of json meta column.
Or something else?
I have concerns that with option 1, 70% of queries will require a join.