2022-10-27 09:07:55 +02:00
\documentclass { report}
2022-11-03 21:41:45 +01:00
\usepackage { graphicx}
2022-11-17 09:23:21 +01:00
\usepackage { hyperref}
2022-10-27 09:07:55 +02:00
\begin { document}
2022-11-03 21:41:45 +01:00
\chapter { Task 1 - Textual description of a database}
2022-10-27 09:57:29 +02:00
\section { Aim}
Football manager database in order to be able to simulate football manager game. \\
It needs to reflect realistically status, description, attributes of entities connected with football in order to ensure better simulation. \\
2022-11-03 20:22:29 +01:00
2022-10-27 09:57:29 +02:00
2022-11-17 09:23:21 +01:00
\section { Objects} \label { Objects Section}
2022-11-16 14:50:06 +01:00
We have chosen to make 6 entities \\
2022-10-27 09:57:29 +02:00
\begin { itemize}
2022-11-16 14:50:06 +01:00
\item Player - Football players who are involved in matches, are signed to clubs, are coached by specific manager, they are the most important entity in the database as they are base for the whole database to function properly. Their behavior needs to be simulated not only during games but also after and before games.\\
skill value, position, reputation, contract status (is player loaned out from another club for example or maybe they do not have a club at all), injury status, age, wages, transfer value,
\item Club - budget (for wages, transfers), players assigned to club, manager assigned to club, competitions the club is taking part in, training ground quality, reputation, country of origin,
\item Match - Clubs taking part in (from which we derivate manager and players), score, statistics (like shots on target), attendance, weather, duration (90 minutes or extended time), date, referee name
\item Manager - skill value, reputation, age, wages
\item Competition - list of matches, prize, country, reputation (importance of the tournament)\\
(not tournament because tournament usually refers to like cup competitions not league ones)
\item Stadium - venue assigned to a club where certain competitions and matches take place, hold information about maximum capacity, stadium reputation, location, year it was build, value of stadium, ticket price,
2022-10-27 09:57:29 +02:00
\end { itemize}
\section { Requirements concerning data}
2022-11-16 14:50:06 +01:00
Players and Manager skill is between 1 and 10 \\
2022-10-27 09:57:29 +02:00
Positions are restricted to Goalkeeper, Defender, Midfield and Attacker \\
2022-11-16 14:50:06 +01:00
Reputations ( for player, manager, club and match) are restricted between 1 and 5 (as in stars with 1 between each step) \\
2022-10-27 09:57:29 +02:00
Quality of facilities are restricted between 1 and 5 \\
Competition should have at least one match \\
Weather restricted to Sunny, Rainy, Snowy, \\
2022-11-16 14:50:06 +01:00
Contract can be active or expired \\
2022-10-27 09:57:29 +02:00
2022-11-03 20:22:29 +01:00
\section { Business Activities}
Activities we would like to cover are, players exchanged between clubs, player signed to club, player released from club (end of contract for example)
\\
2022-11-16 14:50:06 +01:00
clubs taking part in matches, clubs hiring players and manager, clubs taking part in competition,
2022-11-03 20:22:29 +01:00
players playing in matches \\
2022-11-16 14:50:06 +01:00
manager exchanged between clubs, manager signed to club, manager released from club, \\
Competition organizing matches \\
Stadium ticket price being raised by club \\
Get Competition schedule from list of matches
2022-11-03 20:22:29 +01:00
2022-11-03 21:41:45 +01:00
\chapter { Task 2 - ERD - Entity Relationship Diagram}
\begin { figure} [htpb]
\centering
\includegraphics [width=0.8\textwidth] { erd.pdf}
\caption { ERD}
\label { fig:tikzpgf}
\end { figure}
2022-10-27 09:57:29 +02:00
2022-11-16 14:50:06 +01:00
\section { Description}
\subsection { Relationship description}
\paragraph { Stadium $ \rightarrow $ Competion}
Stadium can belong to many Competitions.
\paragraph { Competion $ \rightarrow $ Stadium}
Competitions take part in specific Stadiums.
\paragraph { Competion $ \rightarrow $ Match}
Competition is composed of many Matches.
\paragraph { Match $ \rightarrow $ Competion}
Match takes part within specific Competition.
\paragraph { Competion $ \rightarrow $ Club}
Competition consists of many clubs.
\paragraph { Club $ \rightarrow $ Competion}
Club takes part if one or none Competition at a time.
\paragraph { Club $ \rightarrow $ Stadium}
Club has Stadium.
\paragraph { Stadium $ \rightarrow $ Club}
Stadium may belong to a Club.
\paragraph { Manager $ \rightarrow $ Club}
Manager works in one Club.
\paragraph { Club $ \rightarrow $ Manager}
Club employs one Manager.
\paragraph { Club $ \rightarrow $ Player}
Club may employ many Players.
\paragraph { Player $ \rightarrow $ Club}
Player may be contracted to a (one) Club.
\paragraph { Match $ \rightarrow $ Club}
Match is played between two Clubs.
\paragraph { Club $ \rightarrow $ Match}
Club may take part in many Matches.
2022-11-17 09:23:21 +01:00
\subsection { Entities and attributes description}
2022-11-16 14:50:06 +01:00
\paragraph { Stadium}
2022-11-17 09:23:21 +01:00
Stadium entity represents Stadium object from \hyperref [Objects Section] { Objects Section}
2022-11-16 14:50:06 +01:00
\begin { itemize}
\item capacity - maximum number of fans that can attend Match
\item reputation - how popular it is
\item location - where is it located
\item build year - when it was build
\item value - how much is it worth
\item ticket price - price to enter a Stadium per person
\end { itemize}
\paragraph { Competition}
2022-11-17 09:23:21 +01:00
Competition entity represents Competition object from \hyperref [Objects Section] { Objects Section}
2022-11-16 14:50:06 +01:00
\begin { itemize}
\item prize - Sum of money received by winning Club
\item country - Where the Competition is taking place
\item reputation - how popular it is
\end { itemize}
\paragraph { Manager}
2022-11-17 09:23:21 +01:00
Manager entity represents Manager object from \hyperref [Objects Section] { Objects Section}
2022-11-16 14:50:06 +01:00
\begin { itemize}
\item skill - how good the Manager is at managing Club
\item reputation - how popular Manager is
\item age - how old the Manager is
\item wage - how much is the Manager paid monthly
\end { itemize}
\paragraph { Club}
2022-11-17 09:23:21 +01:00
Club entity represents Club object from \hyperref [Objects Section] { Objects Section}
2022-11-16 14:50:06 +01:00
\begin { itemize}
\item budget - amount of money it can spend yearly
\item training ground quality - how good training grounds are
\item reputation - how popular it is
\item country of origin - where it was created
\end { itemize}
\paragraph { Match}
2022-11-17 09:23:21 +01:00
Match entity represents Match object from \hyperref [Objects Section] { Objects Section}
2022-11-16 14:50:06 +01:00
\begin { itemize}
\item score - current Match score
\item rating - how enjoyable was the game
\item attendance - how many people came
\item weather - weather condition during the match
\item duration - duration of the game
\item date - when the game took place
\item referee name - who refereed the game
\end { itemize}
\paragraph { Player}
2022-11-17 09:23:21 +01:00
Player entity represents Player object from \hyperref [Objects Section] { Objects Section}
2022-11-16 14:50:06 +01:00
\begin { itemize}
\item skill - how good the Player is
\item position - position the Player is the best at
\item reputation - how popular Player is
\item contract status - whether the Player has active contract with a Club or is it expired
\item injuries - days until healed (0 if no injuries present)
\item age - how old the Player is
\item wages - how much the Player is paid monthly
\item transfer value - how much the Player is worth
\end { itemize}
2022-11-23 12:46:46 +01:00
\subsection { Relational diagram}
\paragraph { Description}
A relational diagram was generated using SQL developer. The most notable aspects of it are:\\
- Entities remain the same as in the logical diagram, they are now described with higher details written by the generation.\\
- Most of the relations remained visually the same aside from three, those are:\\
- STADIUM:COMPETITION-takes\_ place\_ in along with CLUB:MATCH-takes\_ part\_ in have been separated into a relational block based on the fact that those are N:M relations\\
- MANAGER:CLUB-works was disjoined into two relations due to the original relation being 1:1 with identity
2022-11-16 14:50:06 +01:00
2022-10-27 09:57:29 +02:00
2022-10-27 09:07:55 +02:00
\end { document}