Reputation: 308
What is the proper way to give user to use custom attributes ?
As an example
Consider that,
There is a web application, using the frontend user interface admin user need to be able to add custom attributes to the Employee later. Which means not only for specific employee record but also for all employees.
Initially, There is an employee table which has following fields,
| Employee |
|----------|
| ID |
| Name |
| Email |
Later, system admin want to add few custom fields (attribute) to Employee table such as Nationality, Mobile Number, Address.
Is it good idea to alter the table and add new column to it ? or Is there any proper way to do this.
Currently, I am working on the ER diagram of database and hope to use Postgresql or MySQL to implement it.
Thanks !
Upvotes: 0
Views: 1427
Reputation: 1269583
There are multiple approaches to do what you want:
How do you choose among these? It depends on factors that you have not discussed in the question. These include:
There may be more considerations, and there may be more possible solutions. The point is that there is no generic right answer. Different solutions have different strengths and weaknesses.
Upvotes: 2