Solved

ERD Relationiships

Posted on 2007-04-05
3
415 Views
Last Modified: 2010-05-18
Can someone please verify if i have the ERD correct - Any suggestions or opinons are greatly appreciated.

1.     The five entities identified are SoccerGame, Field, Team, Player, Referee, SoccerGameRule.
2.     Here are the relationships:
Each SoccerGame is played on one and only one Field; each Field hosts zero, one or more SoccerGame.
Each Field has zero, one or more FieldFeature; each FieldFeature is part of one and only one Field.
Each Attribute can participate in zero, one or more FieldFeature; each FieldFeature has one and only one Field.
Each Team has eleven and only eleven players; each Player is part of one and only one Team.
Each SoccerGame has one and only one Referree; each Referree arbiters zero, one or more SoccerGames.
Each SoccerGame has one and only one (Home) Team; each (Home) Team is part of zero, one or more SoccerGames.
Each SoccerGame has one and only one (Away) Team; each (Away)Team is part of zero, one or more SoccerGames.
3.     Further define relationships with cardinalities – Interesting to note is that a team can have exactly 11 players, and soccer game can have exactly two playing teams and one referee.
4.     select Primary Keys – see selected Primary Keys on the Figure 1 below. They are self-explanatory.
5.     determine Foreign Keys – see selected Foreign Keys on the Figure 1 below. . They are self-explanatory.

 

 



0
Comment
Question by:shoris
3 Comments
 
LVL 11

Accepted Solution

by:
dready earned 500 total points
ID: 18861423
I'm not sure about these 2:
Each Field has zero, one or more FieldFeature; each FieldFeature is part of one and only one Field.
Each Attribute can participate in zero, one or more FieldFeature; each FieldFeature has one and only one Field.

Depends on what is in the FieldFeature table and the Attribute table. Also, thes tables are not mentioned under 1.

Furthermore: A team normally has 16 players, 11 on the field plus 5 extra players, that can play part of the game. And there are 3 referees, one on the field and 2 on the sideline.

0
 

Author Comment

by:shoris
ID: 18861434
Good points Dready.. I am not a soccer player but a friend of mine had me compile this.. :) I am going to have further look into your suggestions.. Good points.. thanks so much for replying so fast
0
 
LVL 6

Expert Comment

by:twintai
ID: 18861569
This is an interesting question. It's been a while since I have seen a conceptual question.

In any event, by my understanding your going to need about 7-8 entities. Note the following points.

1) For the SoccerGame: You would need an associative entity between SoccerGame and Team because you don't want to put the Home team and away team in one record where someone could mistakenly put a team as home and away. Call the associative entity "GameTeams" or something. It will look as follows:

GAMETEAMS
---------------
Autonumber
SoccerGamePK (FK)(PK)
TeamPK (FK)(PK)
HomeAway(PK)

With the above, you would be able to enter the same team as home as away. Of course, GAMETEAMS autonumber will have to be a foreign key in SoccerGame

2) As dready noted, the "Each Field has zero, one or more FieldFeature..." and "Each Attribute can participate in zero, one or more FieldFeature..." if off. With this, you would need to add two more entities, FieldFeature & Attributes


I didn't see the figure you were referring to but the final breakdown as I see it is as follows:

SOCCERGAME
-----------------
Autonum (PK)
FieldPK (FK)
GameTeamsAutoNum (FK)
RefereePK (FK)

GAMETEAMS
---------------
Autonumber
SoccerGamePK (FK)(PK)
TeamPK (FK)(PK)
HomeAway(PK)

TEAM
-------
Autonum (PK)

TEAMPLAYERS
-----------------
Autonum
TeamPK (FK)
PlayerPK (FK)

PLAYER
---------
Autonum (PK)

FIELD
-------
Autonum (PK)
FieldFeaturePK (FK)

FIELDFEATURE
------------------
Autonum (PK)
AttributePK (FK)

ATTRIBUTE
-------------
Autonum (PK)


0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question