0% found this document useful (0 votes)
19 views13 pages

Database Documentation

The report outlines the implementation of a database system for recording and analyzing data from the 2018 World Cup in Russia, using MySQL. It details the structure of various tables including players, teams, matches, and injuries, along with their relationships and data types. The document emphasizes the importance of relational database design for effective information management in software engineering projects.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views13 pages

Database Documentation

The report outlines the implementation of a database system for recording and analyzing data from the 2018 World Cup in Russia, using MySQL. It details the structure of various tables including players, teams, matches, and injuries, along with their relationships and data types. The document emphasizes the importance of relational database design for effective information management in software engineering projects.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

POLYTECHNIC GRAN COLOMBIAN UNIVERSITY

Faculty of Engineering, Design and Innovation

Report on Implementation of Network Services for IPV4

DELIVERY OF THE SECOND PART OF TELECOMMUNICATIONS

Prior to obtaining the Title of:

SOFTWARE ENGINEER

Presented by:

Diego Alexander Pulido Robayo–CODE: 1621021828

BOGOTÁ - COLOMBIA

Año: 2019
TABLE OF CONTENTS

1. Introduction.
2. General Objectives.
3. Specification of the requirement.
4. Description of the tables.
5. Logical Model
6. Physical Model
conclusions
8. References
INTRODUCTION

In this project, it will be developed within the framework of databases in Systems Engineering. This will show the
development of information record through a database engine and manager with MySQL, in order to
that allows managing, analyzing, and using the information from the previously designed database.

GENERAL OBJECTIVES

Create and develop a database system that facilitates the recording of the results obtained during the
World Cup of Russia 2018
SPECIFICATION OF THE REQUIREMENT

Based on the results obtained in the 2018 World Cup in Russia, it is necessary to store the results and the
Information obtained day by day on the development of the contest.

It is desirable to track the players participating in each match, for each team, to keep a record.
from the position or positions they played in each match for each team and record the result of
meeting.

The goals scored by players and teams in the different matches must be recorded.
played, as well as the cards obtained per match, team, and player (red and yellow). They must
register the injuries presented by the players, teams, and matches, and the changes that were made
for each team to the players in the matches played.

The participating teams must be recorded by continent, and then organized into groups.

DESCRIPTION OF THE TABLES

Player Table

This table records the players' data.

FIELD DATA TYPE DESCRIPTION


Player_Id Int Primary key Field to store the
player identifier
Player_Name Varchar 45 Save the player's name
Player Description Varchar 45 Field that holds a brief
description of the player
Team_Id_Team Foreign Key Relate the team id of the
player
Position_Id_Position Foreign Key Relate the position ID in the
what does the player play
Team Table

This table records the data of the Team

FIELD DATA TYPE DESCRIPTION


Team_ID Primary Key Field that stores the identifier
unique of the team
Team_Name Varchar 45 Save the team name
Equipment Description Varchar 45 Save a brief description of the
team
Continent_Id_Continent Foreign Key Relate the continent ID of
team
Group_Id_Group Foreign Key Relate the group ID to
the team belongs
Party_Id_Party Foreign Key Relate the player party ID
for the team.

Group Table

This table records the data of the Group

FIELD DATA TYPE DESCRIPTION


Group_Id Primary Key Field that holds the identifier
only one of the group
Group_Name Varchar 20 Field that stores the name of the
group
Group Description Varchar 45 Save a brief description of the
group

Continent Table

This table records the data of the Continent

FIELD DATA TYPE DESCRIPTION


Continent_Id Int Primary key Field that stores the identifier
unique of the continent
Continent Name Varchar 45 Field that stores the name of the
continent
Description_Continent Varchar 45 Save a brief description of the
continent

Table Position Player


This table records the player's position data

FIELD DATA TYPE DESCRIPTION


Position Id Primary Key Field that stores the identifier
unique to the player's position
Name_Position Varchar 20 Field that stores the name of the
from the player's position
Position Description Varchar 45 Save a brief description of
the player's position

Match Table

This table records the data of the matches played

FIELD DATA TYPE DESCRIPTION


Match ID Int Primary Key Field that stores the identifier
unique of the party
Match_Date DATETIME Field that stores the name of the
from the player's position
Match Description Varchar 45 Keep a brief description of
the player's position
Player_Id_Player Foreign Key Relate the player id of the
match played
Player_Team_Team_Id Foreign Key Relate the team id of
player

Change Table

This table records the data of the party changes

FIELD DATA TYPE DESCRIPTION


Change_ID Primary Key Field that holds the identifier
unique of the change
Change Description Varchar 45 Save a brief description of
the position of the change made
Party_Id_Party Foreign Key Relate the party id to which
the change is made
Player_Id_Player Foreign Key Relate the player ID of the
change made
Player_Team_Id_Team Foreign Key Relate the team ID from
player to whom the change is made
Team_Id_Team Foreign Key Relate the team ID that has
changes made
Team_Continent_Continent_Id Int Foreign Key Relate the continent ID of the
team that makes the changes
Team_Group_ID_Group Int Foreign KeyRelate the group ID of the
team that makes the changes
Card Table

This table records the data of the cards obtained by the players, the team, and the matches.

FIELD DATA TYPE DESCRIPTION


Card ID Int Primary key Field that stores the identifier
unique of the card
Color Card Varchar 15 Field that stores the name of
the card
Card Description Varchar 45 Save a brief description of the
color of the card
Player_Id_Player Foreign Key Relate the player's ID that
he/she obtained the card
Player_Team_Team_Id Foreign Key Relate the team id of the
player who received the card
Party_Id_Party Relate the party ID that
obtained cards
Team_Team_Id Foreign Key Relates to the team ID that
obtained cards
Continent_Team_Continent_Id_Continent Int Foreign Key Relate the continent ID of
team that received cards
Team_Group_Id_Group Foreign Key Relate the group ID of the
team that received cards

Injury Table

This table records the injuries of the players, the team, the matches, and the groups.

FIELD DATA TYPE DESCRIPTION


Injury ID Int Primary Key Field that holds the identifier
unique to the injury
Injury Description Varchar 45 Save a brief description of
the injury
Player_Id_Player Foreign Key Relate the player's ID that
was injured
Player_Team_Id_Team Foreign Key Relate the team ID of the
player with an injury
Party_Id_Party Relate the party ID that
presented injuries
Team_Id_Team Foreign Key Relate the team ID that
sustained injuries
Continent_Team_Id_Continent Int Foreign Key Relate the continent id of
team that presented injuries
Group_Team_Id_Group Int Foreign KeyRelate the group Id of the
team that presented injuries
Goal Table

This table records the goals of the matches and the players.

FIELD DATA TYPE DESCRIPTION


Goal_ID Int Primary key Field that holds the identifier
unique of the goal
Goal_Date DATETIME Field that stores date and time
of the goal
Goal Description Varchar 45 Keep a brief description of the
goal
Player_Id_Player Foreign Key Relate the player's ID that
he scored the goal
Player_Team_Id_Team Foreign Key Relate the team ID of the
player who scored the goal
Party_Id_Party Foreign Key Relate the match ID in which
the goal was scored
LOGICAL MODEL
PHYSICAL MODEL

Below is the SQL code for the tables. The delivery includes a script named 'MerFisico'.

drop database if exists mundial;


create database world;

CREATE TABLE mundial.CONTINENTE (


Continent_Id INT NOT NULL primary key
Continent_Name VARCHAR(45) NOT NULL,
Continent Description
);

CREATE TABLE mundial.GRUPO (


Group_Id INT NOT NULL primary key,
Group_Name VARCHAR(45) NOT NULL
Group Description
);

CREATE TABLE mundial.POSICION_JUGADOR (


Id_Position INT NOT NULL primary key,
Position_Name VARCHAR(20) NOT NULL
Position Description
);

CREATE TABLE mundial.PLAYER (


Player_ID INT NOT NULL
Player_Name VARCHAR(45) NOT NULL
VARCHAR(45) NULL
TEAM_Id_Team INT NOT NULL
INT NOT NULL
PRIMARY KEY (Player_Id, TEAM_Team_Id),
CONSTRAINT FK_PLAYER_TEAM FOREIGN KEY (TEAM_Id_Team)
REFERENCES world.TEAM (Team_Id)
CONSTRAINT FK_PLAYER_POSITION_PLAYER FOREIGN KEY
PLAYER_POSITION_Id_Position
world.POSITION_PLAYER (Id_Position)
);

CREATE TABLE mundial.EQUIPO (


Team_Id INT NOT NULL,
Team_Name VARCHAR(45) NOT NULL
Equipment Description
CONTINENT_Id_Continent INT NOT NULL
GROUP_Id_Group INT NOT NULL,
PARTIDO_Id_Partido INT NOT NULL,
PRIMARY KEY (Id_Equipo, CONTINENTE_Id_Continente, GRUPO_Id_Grupo)
CONSTRAINT FK_EQUIPO_CONTINENTE FOREIGN KEY (CONTINENT_Id_Continent)
REFERENCES world.CONTINENT (Id_Continent),
CONSTRAINT FK_TEAM_GROUP FOREIGN KEY (GROUP_Id_Group)
REFERENCES world.GROUP (Id_Group),
CONSTRAINT FK_TEAM_MATCH FOREIGN KEY (MATCH_Id_Match)
REFERENCES world.GAME (Game_Id)
);

CREATE TABLE mundial.PARTIDO (


Party_ID INT NOT NULL primary key
Match_Date DATETIME NOT NULL,
Match Description
PLAYER_Id_Player INT NOT NULL,
PLAYER_TEAM_Team_Id INT NOT NULL,
CONSTRAINT FK_PARTIDO_JUGADOR FOREIGN KEY (JUGADOR_Id_Jugador ,
PLAYER_TEAM_Team_Id
world.PLAYER (Player_Id, TEAM_Id)
);

CREATE TABLE mundial.GOL (


Id_Gol INT NOT NULL primary key,
DATE TIME NULL
Goal Description
PLAYER_Id_Player INT NOT NULL,
PLAYER_TEAM_Team_Id INT NOT NULL
MATCH_Id_Match INT NOT NULL,
CONSTRAINT FK_GOL_JUGADOR FOREIGN KEY (PLAYER_Id_Player ,
PLAYER_TEAM_Id_Team
REFERENCES world.PLAYER (Id_Player, TEAM_Id_Team)
CONSTRAINT FK_GOL_PARTIDO FOREIGN KEY (PARTIDO_Id_Partido)
REFERENCES world.MATCH (Match_Id)
);

CREATE TABLE mundial.LESION (


Id_Lesion INT NOT NULL primary key,
Lesion Description
PLAYER_Id_Player INT NOT NULL,
PLAYER_TEAM_Team_Id INT NOT NULL,
PARTY_Id_Party INT NOT NULL,
EQUIPO_Id_Equipo INT NOT NULL,
CONTINENT_TEAM_Id_Continent INT NOT NULL
GROUP_TEAM_Id_Group INT NOT NULL
CONSTRAINT FK_LESION_JUGADOR FOREIGN KEY (PLAYER_Id_Player ,
PLAYER_TEAM_Team_Id
REFERENCES world.PLAYER (Player_Id, TEAM_Id_Team)
CONSTRAINT FK_LESION_PARTIDO FOREIGN KEY (PARTIDO_Id_Partido)
REFERENCES world.MATCH (Id_Match),
CONSTRAINT FK_LESION_EQUIPO FOREIGN KEY (EQUIPO_Id_Equipo ,
TEAM_CONTINENT_Id_Continent, TEAM_GROUP_Id_Group
world.EQUIPO
);

CREATE TABLE mundial.TARJETA (


Card_ID INT NOT NULL primary key,
Card_Color
Card Description
PLAYER_Id_Player INT NOT NULL,
PLAYER_TEAM_Team_Id INT NOT NULL,
PARTY_Id_Party INT NOT NULL,
EQUIPO_Team_Id INT NOT NULL,
CONTINENT_TEAM_Id_Continent INT NOT NULL
GROUP_TEAM_Group_Id INT NOT NULL
CONSTRAINT FK_TARJETA_JUGADOR FOREIGN KEY (PLAYER_Id_Player ,
PLAYER_TEAM_Team_Id
world.JOINT_PLAYER (Player_Id, TEAM_Id_Team)
CONSTRAINT FK_TARJETA_PARTIDO FOREIGN KEY (PARTIDO_Id_Partido)
REFERENCES mundial.MATCH (Id_Match),
CONSTRAINT FK_TARJETA_EQUIPO FOREIGN KEY (EQUIPO_Id_Equipo ,
TEAM_CONTINENT_Continent_Id, TEAM_GROUP_Group_Id
REFERENCES world.TEAM (Id_Team, CONTINENT_Id_Continent, GROUP_Id_Group)
);

CREATE TABLE mundial.CAMBIO (


Change_ID INT NOT NULL
Change_Description
PARTIDO_Id_Partido INT NOT NULL
PLAYER_Id_Player INT NOT NULL,
PLAYER_TEAM_Team_Id INT NOT NULL
EQUIPO_Id_Equipo INT NOT NULL,
CONTINENT_TEAM_Continent_Id INT NOT NULL
INT NOT NULL
PRIMARY KEY (Id_Change, PARTY_Id_Party, PLAYER_Id_Player,
PLAYER_TEAM_Team_Id)
CONSTRAINT FK_CAMBIO_PARTIDO FOREIGN KEY (PARTIDO_Id_Partido)
REFERENCES world.MATCH (Match_Id)
CONSTRAINT FK_CAMBIO_JUGADOR FOREIGN KEY (PLAYER_Id_Player ,
PLAYER_TEAM_Team_Id
WORLD REFERENCES.PLAYER (Player_Id, TEAM_Team_Id)
CONSTRAINT FK_CAMBIO_EQUIPO FOREIGN KEY (EQUIPO_Id_Equipo ,
TEAM_CONTINENT_Id_Continent
world
);

CONCLUSIONS

As can be seen, it is important to create relational database designs based on what


established requirements, as the functioning of an information system depends greatly on it.
based on the business and the core of the applications. Therefore, it must first be considered the management and the
information management.

There are many relational database managers that allow for the recording and manipulation of
The information must be tailored to the needs that businesses and projects require.

REFERENCES

The provided link is not a text to be translated.

Unable to access external links for translation.

Unable to translate content from external links.

Model-ER-and-ERE Book Elmasri, R.; Navathe, S.B. Fundamentals of Database Systems. 3rd ed. Addison-
Wesley, (Chapters 3 and 4) [MPM 1999] De Miguel, A.; Piattini, M.; Marcos, E. Design of relational databases.
Ra-Ma. (Chapter 2)

MySQL 5 Book (VERSIONS 5.1 5.6) - DEVELOPER REFERENCE GUIDE

You might also like