Data Normalization Mult joins to one table
Posted on 2011-09-26
Good morning Experts.
I was looking at a simple'ish database today and came across a problem with trying to join one table to another multiple times. For this example, I was thinking of a Stat's program for a football team.
Table 1 is a "roster"
(this can be more complicated, but gives you an idea)
Table two would contain the "Plays" that the teams ran, lets say I want to list that one of the players passed the ball to another
play_PassBy (FK connected to roster table)
play_catchBy(FK Connected to roster table)
play_runby (FK Conneted to roster table)
I would not be able to join each of the passby/catchby/runby back to the same roster table, can I?
Some plays will have values in the catchby and runby, so most joins will either show one value or another - how would you write a query to get around this?
Thank you - I hope my example gives you the details you need to figure out what I'm talking about! :)