Computer Science report, needs some grammar corrections.
Project Title: Enterprise Database Design
II Table of Contents III. Description of the Enterprise III-1 IV. Definition of the Environment IV-1 V. Enterprise Database Design…………………………………………………………V-1
Draft 3 II-1 7 October 2014
III. Description of the Enterprise
Enterprise Model Project
Soccer Tournament Database
Soccer is the most famous sport in the world, as it is played by 250 million players in over 200 countries, making it the world's most popular sport among all ages. However, the traditional way of following soccer news is through television or through the soccer teams websites. Moreover, when looking at the high numbers of people using their personal smartphones to access all kind of data, the idea of a mobile app that keeps track of all the games that have been played in the tournament would be perfect and efficient. However, it is a complicated game that consists of several factors, in which we need to break into entities and have them set and linked together accurately in order to build the app. Therefore, we need to describe all the factors that make up a soccer tournament.
First, we need to have a tournament or a title to win. The tournament should have a name, and a description, such as a league where teams play two legs (one at home and one away) in a season, or a cup tournament where teams play only once and advance. Also, the tournament should consist of at least two teams to play against each other, and a team of referees (main referee, two assistant line referees, and a fourth official).
Each team must have a coach, and at least 18 players, where 11 must play in the line up, and the remaining 7 players should be substitutes. Also, every team should have a name, origin, and a stadium name.
Teams’ game information should have,
1. Points (3 points for each win, 1 point for each draw, and 0 points for each lost).
2. Number of games played.
3. Number of games won.
4. Number of games lost.
5. Number of tied games.
6. Number of goals scored. (associate the player name, assistant name)
7. Number of goals received.
8. Number of yellow cards. (associate the player name)
9. Number of red cards. (associate the player name)
A player’s information should have,
1. Name.
2. Nationality.
3. Age.
4. Height.
5. Field position.
6. Player number
7. Goals this season.
8. Assists this season.
9. Yellow cards.
10. Red cards.
A referee should have,
1. Name.
2. Nationality
3. Age
4. Position (Main, right-line, left-line, and Fourth.)
The user should be able to open the application and choose a tournament, then choose to view the list of teams, fixtures, results, or standings.
The tournament page should have the name of the tournament and the description of whether it is a league or a cup.
The list of teams should show all the teams’ basic information on the list (described above). Moreover, the user can click on each team to view all the detailed information (described above).
The fixture page when clicked on should show all the games in the tournament, which should be detailed in terms of what teams are playing, date, location, and time.
The results page when clicked on should show all the games that have been played, and the details consist of both teams’ names, referees’ names, location of the game, first leg or second leg, and the scores.
The standings page should show a list of all the teams in the tournament, and it should show all the teams’ game information (listed above from 1 to 9).
The user should be able to click on any team listed on either, (1) Tournament page, (2) Fixtures page, (3) Results page, and (4) Standings page to view its detailed information and the whole squad (18 players, and a coach). From there, the user can click on any player, or coach to view his full information (described above). Also, from there the user can view all the relating information about the team as described above, and we might need to add a news feed somewhere in there late on.
Project Title: Description of the Enterprise
Finally, the application is live, meaning it updates automatically when the game is being played, and it also keeps track of all the games that are being played simultaneously.
Draft 3 III-4 7 October 2014
IV. Definition of the Environment
Soccer Mobile Application -- Application Form
Tournament input data:
· Tournament name
· Tournament type
· Tournament description
· Tournament teams
Team input data:
· Name of the team
· Origin of the team
· Stadium of the team
· Names of all the players
· Name of the coach
Player input data:
· Name
· Nationality
· Age
· Height
· Field position
· Player number
Referee input data:
· Name
· Nationality
· Age
· Position
Match input data:
· Names of the two teams
· Names of the referees
· Score of the match
· Names of players who scored
· Names of players who assisted
· Names of players with yellow cards
· Names of players with red cards
Some potential assumptions can be listed as follows,
Figure 1 Some assumptions for soccer tournaments.
1. Tournaments can only be in two types, a league in which all the teams are from the same country, or a cup with a list of teams from across the world.
2. In a league, teams cannot play with each other more than twice.
3. In a cup, teams can play up to 3 matches.
4. Teams earn points by either winning or tying. After a win 3 points get added to the team’s total points. After a tie, one point gets added to the total points.
5. The winner team of a league is the team with the highest points.
6. If two teams have the same points by the end of the league, then we look at which team scored more than the other during this competition and make it the winner.
7. A player can score or assist
8. A player can be booked with yellow or red cards.
9. During a match each team can substitute up to 3 substitutions.
10. If a player gets a red card, then he will be banned from playing the next match.
11. Two yellow cards equal to one red card in a single match. Therefore, if a player gets two yellow cards in a single match, then he will be eliminated from the next match.
12. If a player gets 4 accumulative yellow cards on different matches, then he will be banned from playing the next one.
13. Normal matches consist of 90 minutes divided into two halves.
14. If two teams draw on the semi final or the final match is extended to 120 minutes.
Table 1. User-oriented data dictionary.
|
Datum |
Information Definition |
|
age |
Age comes in the form of a two digit numbers. i.e. 22 |
|
field_position |
Field position can be: Goalkeeper, Defender, Midfielder, or Striker. |
|
height |
Height of a player comes in the form of centimeters <number> and <”cm”>: Example: 176 cm. |
|
name_of_coach |
The coach’s name in the form of <first> and <last>. Example, “Carlo Ancelotti” |
|
name_of_team |
The name of the team comes in the form of a string, which can contain spaces or dots. Example: ‘Real Madrid”, or “F.C Barcelona.” |
|
name_of_referee |
The name of a referee in the form of: <first>, <last>. Example, John Osaka |
|
name_of_player |
The player’s name comes in the form of: <first alphabet of the first name followed by a dot>, and <last>. Example: Cristiano Ronaldo would be C.Ronaldo |
|
Name_of_assistant/scorer redCard/yellowCard |
Refer to name_of_player |
|
nationality |
Nationality come in the form of <country name>. Example, “Brazil” |
|
origin_of_team |
Refer to nationality |
|
Player_number |
The player number can be from 0 to 99. |
|
stadium_name |
The Stadium name is in the form of a string. Example, “Old Trafford” |
|
score |
Score is in this form: Home: Real Madrid Home Score: 4 Visitor: Barcelona Visitor Score: 2 |
|
tournament_description
|
The description can be in one sentence, as follows: “this tournament is Spanish league” or “this tournament is a friendly cup.” |
|
tournament_name |
The name can be any string: Example, “La Liga”, or “ Uefa Champions League” |
|
tournament_teams |
Refer to name_of_team. Follow each name by either home, or visitor. Then, separate teams with commas. |
|
tournament_type |
The type can be either a “cup” or a “league” |
Table 2. Mapping of data to forms and transactions.
|
Datum |
Form or screen |
||||
|
|
Tournament input data |
Team input data |
Player input data |
Referee input data |
Match input data |
|
age |
|
|
X |
|
|
|
field_position |
|
|
X |
|
|
|
height |
|
|
X |
|
|
|
name_of_coach |
|
X |
|
|
|
|
name_of_team |
X |
X |
|
|
X |
|
name_of_referee |
|
|
|
X |
X |
|
name_of_player |
|
X |
X |
|
|
|
Name_of_assistant /scorer redCard/yellowCard |
|
|
|
|
X |
|
nationality |
|
|
X |
X |
|
|
origin_of_team |
|
X |
|
|
|
|
Player_number |
|
X |
X |
|
|
|
stadium_name |
|
X |
|
|
|
|
score |
|
|
|
|
X |
|
tournament_name |
X |
|
|
|
|
|
tournament_teams |
X |
|
|
|
|
|
tournament_type |
X |
|
|
|
|
Project Title: Definition of the Environment
Draft 3 IV-6 7 October 2014
V. Enterprise Database Design
V.1.1. List of all entities and their associated attributes.
· Tournament
Attributes:
· Tournament_Name
· Tournament_type
· Tournament_Discreption
· Team
Attributes:
· Name_of_team
· Origin_of_team
· Stadium_name
· Player
Attributes:
· Name_of_Player
· Nationality
· Age
· Height
· Player_number
· Field_position
· Referee
Attributes:
· Name_of_referee
· Age
· Position
· Nationality
· Goal
Attributes:
· Name_of_player
· Team_scored
· Team_received
· Name_of_assistant
· Match
Attributes:
· Name_of_home_team
· Name_of_visitor_team
· Score_of_home_team
· Score_of_visitor_team
· Yellow_Card
Attributes:
· Name_of_player
· Player_team
· Red_Card
Attributes:
· Name_of_player
· Player_team
V.1.2. List of relationships and attributes.
Torunamen: (T_name, T_type, T_description)
Team: (name_of_team, origin_of_team, stadium_name)
Relation Set:
Tournament_teams (T_name, name_of_teams)
-------------------------------------------------------------------------------------------------------------------
Player: (name_of_player, age, field_position, height, player_number, nationality)
Team: (name_of_team, origin_of_team, stadium_name)
Goal: (Name_of_player, Team_scored, Team_received, Name_of_assistant)
Relation Set:
Player_goals (player_number, name_of_team, goal_scored)
-------------------------------------------------------------------------------------------------------------------
Team: (name_of_team, origin_of_team, stadium_name)
Goal: (Name_of_player, Team_scored, Team_received, Name_of_assistant)
Match: (Name_of_home_team Name_of_visitor_team Score_of_home_team Score_of_visitor_team)
Yellow_cards: (Name_of_player, player_team)
Red_cards: (Name_of_player, player_team)
Relation Set:
teams_stats (name_of_team, num_of_matches, num_of_wins, num_of_losts, num_of_points, num_of_goals, num_of_yellows, num_of_reds)
------------------------------------------------------------------------------------------------------------------
Goal: (Name_of_player, Team_scored, Team_received, Name_of_assistant)
Yellow_cards: (Name_of_player, player_team)
Red_cards: (Name_of_player, player_team)
Relation Set:
Player_stats: ( name_of_player, num_of_goals, num_of_assists, num_of_yellows, num_of_reds)
V.1.3. Entity-relationship diagram of the enterprise
PK: thick underline
CK: dotted underline
Player
name_of_player
age
field_position height player_number nationality
Match
Name_of_home_team Name_of_visitor_team Score_of_home_team Score_of_visitor_team
Referee
name_of_referee
age
position
nationality
Red_cards
Name_of_player Player_team
Yellow_cards
Name_of_player Player_team
Goal
Name_of_player Team_scored
Team_received
Name_of_assistant
Team
name_of_team
origin_of_team stadium_name
Torunamet
T_name T_type T_Discription
· Tournament can have two or more teams
· Tournament has * matches
· Team can belong to 0 or more tournament
· Team has 0 or many match
· Match has * teams
· Match has * players
· Match has 1 tournament
· Player has * matches
· Match has * referees
· Referee has * matches
· Team has * players
· Player has 1 team
· Player has 0 or * yellow_cards
· Player has 0 or * Red_cards
· Yellow/red have 0 or * players
· Player has 0 or * goals
· Goals has 0 or * players
· Match has 0 or * goals
V.2. Conceptual model of the enterprise.
Torunamen: (T_name, T_type, T_description)
PK: T_name
CK: T_type
Team: (name_of_team, origin_of_team, stadium_name)
PK: name_of_team
CK: origin_of_team
Player: (name_of_player, age, field_position, height, player_number, nationality)
PK: name_of_player
CK: player_number, nationality
Referee: (name_of_referee, age, position, nationality)
PK: name_of_referee
CK: position
Goal: (Name_of_player, Team_scored, Team_received, Name_of_assistant)
PK: Name_of_player, Team_scored
CK: Name_of_assistant
Match: (Name_of_home_team Name_of_visitor_team Score_of_home_team Score_of_visitor_team)
FK: Name_of_home_team Name_of_visitor_team (Source: Team)
Yellow_cards: (Name_of_player, player_team) & Red_cards: (Name_of_player, player_team)
PK: Name_of_player, player_team
V.3. Table dictionary
Table 3. Table Dictionary.
|
Table |
Attributes |
Informal definition |
|
Torunamen |
Tournament Team Referee |
A tournament consists of tournament name, type and description. Also, teams, and referees. |
|
Match_stats |
Team Referee player Goals Red/yellow cards match |
A match consists of two teams, a team of refrees, goals, and cards. |
|
Player_stats |
Player Team Red/yellow cards Goal |
A player has a team, number of cards, and number of goals scored and assisted. |
|
Team_stats |
Match Tournament Red/yellow cards goal |
A team has number of matches played in a tournament, number of goals scored and received, number of received red/yellow cards. |
V.4. Attribute dictionary
Table 4. Attribute Dictionary
Draft 3 V-9 7 October 2014