"Models" for Relational Tables.

  • Thread starter Thread starter WWGD
  • Start date Start date
  • Tags Tags
    Models
Click For Summary

Discussion Overview

The discussion revolves around the organization and limitations of relational tables, specifically focusing on a table structure for teams and games. Participants explore the implications of relational database design and the constraints on the number of games that can be played while maintaining the properties of relational tables.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant presents a relational table structure and questions how many games can be played while preserving relational properties, noting that TeamID, TeamName, and TeamColor are fixed, while Game and DatePlayed are variable.
  • Another participant suggests an alternative organization of the data, proposing separate tables for teams and games, which they argue would be more reasonable and impose no restrictions on the number of teams or games.
  • A third participant expresses confusion about the original question, questioning why there would be any limit on the number of games played without specific constraints on the teams or games.
  • Another participant speculates that the goal may be to avoid inconsistency in the data, suggesting that once a team is selected, its attributes are determined, but the game and date can vary, raising uncertainty about the role of candidate keys in this context.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the original question regarding the limitations on the number of games played. Multiple competing views are presented regarding the organization of relational tables and the implications of candidate keys.

Contextual Notes

There are unresolved assumptions about the specific constraints on the number of teams and games, as well as the definitions of candidate keys in this context. The discussion reflects varying interpretations of relational database design principles.

WWGD
Science Advisor
Homework Helper
Messages
7,806
Reaction score
13,120
Hi again, say we are given the relational table:

TEAM(TeamID, TeamName, TeamColor, Game, DatePlayed).

Question is: how many games can we play, meaning, while preserving the properties of relational tables?

This is what I have.We know
We know TeamID, TeamName andTeamColor are fixed in any row , while Game and DatePlayed are variable. All tables will be of this type 1 N1 C1 G_11 D_11

2 N2 C2 G_21 D_21

........

1 N1 C1 G_{1j} D_ {1j}

......

Now, while this is not stated, I would assume either of TeamID, TeamName are candidate keys; two teams
may have the same color. Obviously, we have at least two teams.
 
  • Like
Likes   Reactions: Silicon Waffle
Computer science news on Phys.org
I know this doesn't answer your question, but that seems like a very awkward way to organize things. It would be way more reasonable in a relational db to have a team table with one entry per team

team ID, team #, team color

and then have each game in a different table with foreign keys into the team table

game #, play date, team 1 ID, team 2 ID

This is a well organized relational structure and imposes no restrictions on the number of teams or the number of games.
 
  • Like
Likes   Reactions: Silicon Waffle and WWGD
Yes, good point, but I am trying to help someone ( for free, or I would have been fired) with some questions from a book.
 
Well, I don't really understand the question then. Why would there be any limit on the number of games played? If there is a specific set of teams and each should only play the other once, then that does put a restriction on the number of games, but I see no specification for that or for a specific number of teams, so there's no answer there.
 
All I can think is you want to avoid inconsistency: Once a team is selected, the TeamID, TeamName, TeamColor, are determined. But your free to choose a game and a date, so that, e.g., every game played by a fixed team must be played in a fixed date, I think. Maybe we need to use the fact that both TeamID and TeamName are candidate keys, but I am not sure.
 
  • Like
Likes   Reactions: Silicon Waffle

Similar threads

  • · Replies 32 ·
2
Replies
32
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 26 ·
Replies
26
Views
6K
  • · Replies 5 ·
Replies
5
Views
10K
  • · Replies 38 ·
2
Replies
38
Views
9K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 7 ·
Replies
7
Views
3K