Presentation is loading. Please wait.

Presentation is loading. Please wait.

E-R model for Exercise #1 Comments: 1. There is a lot of process, or data flow information in this description that will not be modeled in the E-R diagram,

Similar presentations


Presentation on theme: "E-R model for Exercise #1 Comments: 1. There is a lot of process, or data flow information in this description that will not be modeled in the E-R diagram,"— Presentation transcript:

1 E-R model for Exercise #1 Comments: 1. There is a lot of process, or data flow information in this description that will not be modeled in the E-R diagram, for example, filling out forms, reviewing forms, writing data on forms, doing tryouts. In E-R modeling, we want to know what are the main subjects (entities) of interest and what facts (attributes) do we want to maintain about them. Looking at the data in the Excel spreadsheet reinforces the idea that there are to subjects of major interest here: the teams, and their players. Each become an entity. Relevant attributes are then identified for each entity. Player name/DOB is used as the key (though it’s not ideal) 2. One question is whether “coach” should be an entity or an attribute of the entity TEAM. It would be possible to model coach as an entity, which would then have a 1-to-1 relationship with TEAM. This would be appropriate if we expect to maintain information about coaches (i.e., attributes of coach) or we expect to do analysis about coaches or coaches have relationships with other entities. Here, I’ve adopted the simpler approach of noting the name of the coach assigned to a team. TEAM PLAYER Is assigned Is assigned to name DOB height rating address name Coach Ranking Phone #

2 E-R model for Exercise #2 Comments: There is a unary relationship in which “TEAM plays TEAM” that results in a game. Because games are events of interest to the League, and there are data elements we want to keep for each game, we treat this unary relationship as an associative entity. The teams play different roles: home and visitor. TEAM PLAYER Is assigned Is assigned to name DOB height rating address name Coach Ranking Phone # Game Is home team Is visitor team Has home team Has visitor team Game number Visitor score Home score Date Time

3 E-R model for Exercise #3 Comments: Here we have another associative entity that arises from the relationship between a player and game. Look at the sample data to see that this model makes sense. E.G., There are two statistics for Game #1, but each statistic is for only one player. Each player has 5 statistics, one for each game. In this instance, the natural key for GAME STATISTIC is the combination of GAME#/NAME&DOB. TEAM PLAYER Is assigned Is assigned to name DOB height rating address name Coach Ranking Phone # Game Is home team Is visitor team Has home team Has visitor team Game number Visitor score Home score Date Time GAME STATISTIC points Foul% Fouls on Attendance Game number/Name&DOB Is for Has Is for


Download ppt "E-R model for Exercise #1 Comments: 1. There is a lot of process, or data flow information in this description that will not be modeled in the E-R diagram,"

Similar presentations


Ads by Google