r/DatabaseHelp • u/GreenFosh • Dec 06 '15
ER-Model check:)
I need to create an ER model for horseracing. A horse will have an owner, trainer, stable and parent racehorse. I also need to add which races and racecourses the horse has run at, the placement in the race and what jockey rode the horse. I have come up with the following diagram: http://imgur.com/wzYuaJg Is this correct and are the relationships correct? I know the relationships are many to one, but whats the difference between the dotted and non dotted lines? thanks, any help is greatly appreciated:)!
2
Upvotes
View all comments
Show parent comment
5
u/wolf2600 Dec 06 '15
I was thinking about the Jockey thing.... It could be considered to be part of the PK, but you also could make it just an FK in RaceData. The Horse and the Race are the two main identifying values in a race. You're not going to have the same Horse and Race but with two different jockeys, so to identify a specific competitor in a specific race, the jockey value isn't needed to create a unique record. He's kind of like an add-on piece of information.