I'm building a solution and I have a question.
All my data is currently stored in a unique table. Each row of data is associated with a type.
My question is, what's the best practice for defining a table structure: all data in an unique table with associated type or data stored in dedicated type table?
eg: how to store people and associated colors.
- all data in an unique table like
- data stored in table dedicated to color:
In my opinion, it's better to have everything in a single table to avoid complex queries, but I'm scared about query time with billions of rows.