Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using DBdesigner Fork for generating ER diagram.

I have the 'Company' as an entity for which can I place the attribute of 'idShares', despite of having the foreign key of Shares Entity in the Company entity.

As, it can fetch the Share entity attributes automatically from the foreign key. So, Can I place the attribute in the Entity, when the foreign key is also already present?

share|improve this question

If I saw that, I might expect that there are situations where the automatic attribute and the separate but seemingly identical attribute might actually be different, and this would be confusing. If the foreign key that is used to automatically get the attribute is already present on the entity, I am not sure it's necessary to add that same attribute on the entity - it seems like it would be redundant and could lead to confusion.

share|improve this answer
+1. The one exception that I can think of off-hand is if you have a default on the reference table and the option to override the default on the Company table. It might be possible to design the table structure better in an effort to avoid this scenario, but in the hierarchy of database evils, it's pretty far down the list. – Kevin Feasel Nov 26 '12 at 16:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.