Hi All,
I have some concern regarding the ER Diagram. I have the following scenario: We need to keep all the information regarding the agent like Name, Address, Phone No and also his monthly salary, commission paid. Now I have created an entity Agent and defined attributes which are necessary and required.
My question is should I have a separate entity for maintaining the Agents Salary ? The reason why I am asking is like, the salary may change sometime say the agent might get an increment. Now because of that, if the agent salary is kept in the Agent Entity and I need to update the whole table when there is increase in the salary of the agent. I guess it is not a good practice to fire a query to update a single Attribute. Also if I have 100K records it will take a lot of time to update.
From the knowledge I have it is always good to have a separate Table for the attribute whose values keeps changing in my case it is "Salary".
So can you suggest me which is the correct way .. Keeping all attributes in one table or having a separate table when we have such scenario ?
I will really appreciate your reply and guidance.