Hey im new to database design and having trouble trying to figure this one out. I have two tables Team and Fixtures. Team has rows of football teams and Fixture has 2 of those football teams in each row (home and away team). I want to link team id to home_team and away_team but it doesnt allow me to. Please tell me how i can solve this.
Here is an image of my tables/relationships
http://i49.tinypic.com/288qwpg.jpg
Because you need to reference two different teams (home and away) from the fixture table, you need to add the team table twice. If you only add it once, then both home and away must relate to the same team, which of course makes no sense.
The team from one table is joined to the home team id. And the team from the second team table is joined to the away team id.
In access, you can also rename the table – give it an alias. (Click on the table an hit F4. This brings up the properties – you can type in an alias.) For the table linked to home team, call it (say) “homeTeam” and similarly for awayTeam.
You can then drag the name column from both these tables, to see side-by-side the names of teams playing in each fixture.