Solved

ERD Relationiships

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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
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 how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now