This might be a silly question but I was curious as to when designing a database when should one choose to have a separate table instead of just having an additional column? For instance, let's say I have a users table and if I want a functionality such as banning or verifying a user or any other small functionality such as when a user can choose to set their bio public or private etc, in cases like this would you have a simple boolean column in the user table that can turn on and off or would you have a separate table for each of this functionalities?
CodePudding user response:
This is a very fundamental question for relational database
, so I would suggest you pass through Database Normalization
It technique that is the process of structuring a relational database in accordance with a series of so-called normal forms in order to reduce data redundancy and improve data integrity.
Here is some article that you can use as a starting point database-normalization