Solved

ERD Relationiships

Posted on 2007-04-05
3
414 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

860 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