"Models" for Relational Tables.

  • Thread starter Thread starter WWGD
  • Start date Start date
  • Tags Tags
    Models
AI Thread Summary
The discussion revolves around the structure of a relational table for managing team games, specifically the TEAM table with attributes TeamID, TeamName, TeamColor, Game, and DatePlayed. It is established that TeamID, TeamName, and TeamColor are fixed values, while Game and DatePlayed are variable. The conversation highlights the inadequacies of the current table design, suggesting a more effective relational database structure that separates team information and game details into distinct tables. This proposed structure would use foreign keys to link games to teams, allowing for unlimited teams and games without redundancy. The conversation also raises the question of whether there are limits on the number of games played, noting that if teams are only to play each other once, this would impose restrictions. However, without specific constraints on the number of teams or games, the conclusion is that there are no inherent limits on the number of games that can be played, as long as the integrity of the data is maintained.
WWGD
Science Advisor
Homework Helper
Messages
7,679
Reaction score
12,435
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 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 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 Silicon Waffle
In my discussions elsewhere, I've noticed a lot of disagreement regarding AI. A question that comes up is, "Is AI hype?" Unfortunately, when this question is asked, the one asking, as far as I can tell, may mean one of three things which can lead to lots of confusion. I'll list them out now for clarity. 1. Can AI do everything a human can do and how close are we to that? 2. Are corporations and governments using the promise of AI to gain more power for themselves? 3. Are AI and transhumans...
Sorry if 'Profile Badge' is not the correct term. I have an MS 365 subscription and I've noticed on my Word documents the small circle with my initials in it is sometimes different in colour document to document (it's the circle at the top right of the doc, that, when you hover over it it tells you you're signed in; if you click on it you get a bit more info). Last night I had four docs with a red circle, one with blue. When I closed the blue and opened it again it was red. Today I have 3...
Back
Top