A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Table Relationship Question



 
 
Thread Tools Display Modes
  #1  
Old February 24th, 2009, 01:49 AM posted to microsoft.public.access.tablesdbdesign
dvlander
external usenet poster
 
Posts: 16
Default Table Relationship Question

I am in the preliminary stages of building a database to analyze the
performance of basketball teams in a league.

I have a table called "Teams". I am anticipating another table called
"ScheduledGames". My quandary is as follows: The "ScheduledGames" table
will have fields for "Visiting Team" and "Home Team" and both will be
populated from data in the "Teams" table. However, I cannot link both of
these fields to the TeamID field in "Teams", can I? Is there another simple
solution? The design is so important, I'd really like to get this right.

I really appreciate the advice.

Dale

Thanks,

Dale
  #2  
Old February 24th, 2009, 03:00 AM posted to microsoft.public.access.tablesdbdesign
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Table Relationship Question

You can join two (or more) fields from the same table to copies of another
table. You could also remove the teams from the Game table and just store the
date, time, location,... and then create a Game/Team table with fields like:

tblGamesTeams
===============
GameTeamID autonumber primary key
GameID links to tblGames.GameID
TeamID links to tblTeams.TeamID
HomeAway stores H or A
Score
--
Duane Hookom
Microsoft Access MVP


"dvlander" wrote:

I am in the preliminary stages of building a database to analyze the
performance of basketball teams in a league.

I have a table called "Teams". I am anticipating another table called
"ScheduledGames". My quandary is as follows: The "ScheduledGames" table
will have fields for "Visiting Team" and "Home Team" and both will be
populated from data in the "Teams" table. However, I cannot link both of
these fields to the TeamID field in "Teams", can I? Is there another simple
solution? The design is so important, I'd really like to get this right.

I really appreciate the advice.

Dale

Thanks,

Dale

  #3  
Old February 24th, 2009, 03:30 PM posted to microsoft.public.access.tablesdbdesign
dvlander
external usenet poster
 
Posts: 16
Default Table Relationship Question

Duane:

Really appreciate your advice. In your experience, which of the two
scenarios would you say is the most efficient in the long run?

Sincerely,

Dale

"Duane Hookom" wrote:

You can join two (or more) fields from the same table to copies of another
table. You could also remove the teams from the Game table and just store the
date, time, location,... and then create a Game/Team table with fields like:

tblGamesTeams
===============
GameTeamID autonumber primary key
GameID links to tblGames.GameID
TeamID links to tblTeams.TeamID
HomeAway stores H or A
Score
--
Duane Hookom
Microsoft Access MVP


"dvlander" wrote:

I am in the preliminary stages of building a database to analyze the
performance of basketball teams in a league.

I have a table called "Teams". I am anticipating another table called
"ScheduledGames". My quandary is as follows: The "ScheduledGames" table
will have fields for "Visiting Team" and "Home Team" and both will be
populated from data in the "Teams" table. However, I cannot link both of
these fields to the TeamID field in "Teams", can I? Is there another simple
solution? The design is so important, I'd really like to get this right.

I really appreciate the advice.

Dale

Thanks,

Dale

  #4  
Old February 24th, 2009, 04:02 PM posted to microsoft.public.access.tablesdbdesign
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Table Relationship Question

The tblGamesTeams approach creates greater flexibility. However, for
basketball, you can generally assume there will be only 2 teams unlike a
track or swim meet which could be 2, 3, ...or many more.

If you want to store additional Game/Team attributes such as lockerroom,
attendant,... then I would definitely go with the more normalized structure.

I think I would go with tblGamesTeams.
--
Duane Hookom
Microsoft Access MVP


"dvlander" wrote:

Duane:

Really appreciate your advice. In your experience, which of the two
scenarios would you say is the most efficient in the long run?

Sincerely,

Dale

"Duane Hookom" wrote:

You can join two (or more) fields from the same table to copies of another
table. You could also remove the teams from the Game table and just store the
date, time, location,... and then create a Game/Team table with fields like:

tblGamesTeams
===============
GameTeamID autonumber primary key
GameID links to tblGames.GameID
TeamID links to tblTeams.TeamID
HomeAway stores H or A
Score
--
Duane Hookom
Microsoft Access MVP


"dvlander" wrote:

I am in the preliminary stages of building a database to analyze the
performance of basketball teams in a league.

I have a table called "Teams". I am anticipating another table called
"ScheduledGames". My quandary is as follows: The "ScheduledGames" table
will have fields for "Visiting Team" and "Home Team" and both will be
populated from data in the "Teams" table. However, I cannot link both of
these fields to the TeamID field in "Teams", can I? Is there another simple
solution? The design is so important, I'd really like to get this right.

I really appreciate the advice.

Dale

Thanks,

Dale

  #5  
Old February 24th, 2009, 05:07 PM posted to microsoft.public.access.tablesdbdesign
dvlander
external usenet poster
 
Posts: 16
Default Table Relationship Question

Duane:

Thanks - the tblGamesTeams structure that you have below does not show a
field for the opponent. The reason that is important is because an
evaluation of a team's performance would certainly depend on the opponent. A
10-point win over UCLA is drastically different than a 10-point win over
Podunk State.

Does this additional information change your recommendation at all?

Sincerely,

Dale

"Duane Hookom" wrote:

The tblGamesTeams approach creates greater flexibility. However, for
basketball, you can generally assume there will be only 2 teams unlike a
track or swim meet which could be 2, 3, ...or many more.

If you want to store additional Game/Team attributes such as lockerroom,
attendant,... then I would definitely go with the more normalized structure.

I think I would go with tblGamesTeams.
--
Duane Hookom
Microsoft Access MVP


"dvlander" wrote:

Duane:

Really appreciate your advice. In your experience, which of the two
scenarios would you say is the most efficient in the long run?

Sincerely,

Dale

"Duane Hookom" wrote:

You can join two (or more) fields from the same table to copies of another
table. You could also remove the teams from the Game table and just store the
date, time, location,... and then create a Game/Team table with fields like:

tblGamesTeams
===============
GameTeamID autonumber primary key
GameID links to tblGames.GameID
TeamID links to tblTeams.TeamID
HomeAway stores H or A
Score
--
Duane Hookom
Microsoft Access MVP


"dvlander" wrote:

I am in the preliminary stages of building a database to analyze the
performance of basketball teams in a league.

I have a table called "Teams". I am anticipating another table called
"ScheduledGames". My quandary is as follows: The "ScheduledGames" table
will have fields for "Visiting Team" and "Home Team" and both will be
populated from data in the "Teams" table. However, I cannot link both of
these fields to the TeamID field in "Teams", can I? Is there another simple
solution? The design is so important, I'd really like to get this right.

I really appreciate the advice.

Dale

Thanks,

Dale

  #6  
Old February 25th, 2009, 02:32 AM posted to microsoft.public.access.tablesdbdesign
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Table Relationship Question

The opponents will have the same GameID values.

--
Duane Hookom
Microsoft Access MVP


"dvlander" wrote:

Duane:

Thanks - the tblGamesTeams structure that you have below does not show a
field for the opponent. The reason that is important is because an
evaluation of a team's performance would certainly depend on the opponent. A
10-point win over UCLA is drastically different than a 10-point win over
Podunk State.

Does this additional information change your recommendation at all?

Sincerely,

Dale

"Duane Hookom" wrote:

The tblGamesTeams approach creates greater flexibility. However, for
basketball, you can generally assume there will be only 2 teams unlike a
track or swim meet which could be 2, 3, ...or many more.

If you want to store additional Game/Team attributes such as lockerroom,
attendant,... then I would definitely go with the more normalized structure.

I think I would go with tblGamesTeams.
--
Duane Hookom
Microsoft Access MVP


"dvlander" wrote:

Duane:

Really appreciate your advice. In your experience, which of the two
scenarios would you say is the most efficient in the long run?

Sincerely,

Dale

"Duane Hookom" wrote:

You can join two (or more) fields from the same table to copies of another
table. You could also remove the teams from the Game table and just store the
date, time, location,... and then create a Game/Team table with fields like:

tblGamesTeams
===============
GameTeamID autonumber primary key
GameID links to tblGames.GameID
TeamID links to tblTeams.TeamID
HomeAway stores H or A
Score
--
Duane Hookom
Microsoft Access MVP


"dvlander" wrote:

I am in the preliminary stages of building a database to analyze the
performance of basketball teams in a league.

I have a table called "Teams". I am anticipating another table called
"ScheduledGames". My quandary is as follows: The "ScheduledGames" table
will have fields for "Visiting Team" and "Home Team" and both will be
populated from data in the "Teams" table. However, I cannot link both of
these fields to the TeamID field in "Teams", can I? Is there another simple
solution? The design is so important, I'd really like to get this right.

I really appreciate the advice.

Dale

Thanks,

Dale

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:01 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.