krypru
krypru

Reputation: 1742

Properly entity-relationship model

A question: Is this part of diagram ok? Currently I don't see any redundancy. But my colleagues see it. Should I split entity called "Horse" into two entities? Does Horse entity have too many FKs? enter image description here

Upvotes: 1

Views: 64

Answers (2)

TommCatt
TommCatt

Reputation: 5636

There is no redundancy, although address and telephone are not attributes of any stud, so should not be in that table. What do your colleagues indicate as a redundancy?

The only other suggestion I would make would be for tightening up the data integrity. There can be three sexes of horse: M, F and G. Only M can be a stud. So if ID and Sex (Gender? Blegh! Show the horses a little more respect.) were to be combined into a unique index, then the column Sex can be added to the Stud table with a constraint that it must be the value 'M'. Then the combination of Stud_ID and Sex could be the FK to the Horses table. That way, the id of a horse that was F or G could ever be inserted into the Stud table. You would never have to check to make sure it didn't happen -- it can't happen.

Upvotes: 1

sadfiesch
sadfiesch

Reputation: 312

I can't see anything redundant but i would make a table for the telephone because a person could have more than one phone for example home phone and cell phone.

Upvotes: 1

Related Questions