Take the 2-minute tour ×
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. It's 100% free, no registration required.

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
add comment

1 Answer 1

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  
+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
add comment

Your Answer

 
discard

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.