1 / 3

E-R model for Exercise #1

name. DOB. Coach. Ranking. height. Is assigned. PLAYER. TEAM. name. rating. Is assigned to. Phone #. address. E-R model for Exercise #1. Comments:

fauve
Download Presentation

E-R model for Exercise #1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. name DOB Coach Ranking height Is assigned PLAYER TEAM name rating Is assigned to Phone # address 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.

  2. name DOB Coach Ranking height Is assigned PLAYER TEAM name rating Is assigned to Has visitor team Phone # Has home team address Is visitor team Is home team Visitor score Home score Game Date Time Game number 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.

  3. name DOB Coach Ranking height Is assigned PLAYER TEAM name rating Is assigned to Is for Phone # Has home team address Has visitor team Is home team Has Attendance Is visitor team points Home score Visitor score Foul% GAME STATISTIC Is for Has Game Fouls on Date Time Game number/Name&DOB Game number 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.

More Related