Solved

ERD Relationiships

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

813 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

11 Experts available now in Live!

Get 1:1 Help Now