Students: David Israel Martínez De la Rosa and
Benjamin Rangel Palma
Matrícula:440249408
Career: Engineering in software development and networks
Course: Relational Databases
Profesor(a):Efren Juárez Castillo
Activity 5: Integrative project stage 3
En este proyecto integrador se llevará a cabo la utilización
and introduction of the Structured Query Language program
(SQL) as well as the creation and structure of a database
data
Installation of
DBMS
In this first stage, we have worked using the current diagram of the
database to give a focus to the work of learning to use
these tools provided by MySQL about workbench and thus to
continuation in the next part give a greater focus to the management of the
implementation of the models.
Stage 2: Introduction
Starting with the changes in this stage 2, the new diagram, the main
The idea was to make changes aimed at carrying and managing the data.
at a slightly simpler level such as the address so that it does not
there is some confusion in the filling, the attribute was separated and created
some others. Also in the name
de los identificadores y las llaves primarias se llevó un cambio en la
definition of these.
Diagram
Creation of the database structure.
1.-First instructions for creating the database
2.-Creation of the database tables.
3.-Confirmation and verification of the process
Filling the database.
1.-Script to enter data into the tables
4.-Confirmation and verification of data with query
simple
List of instructions:
• DROP DATABASE IF EXISTS - checks if it exists
a database with that name and deletes it
to be able to create a new one.
• CREATE DATABASE - We create a database.
• CHARACTER SET utf8mb4 - we define the
encoding of the characters that we will be
using.
• USE - in order to use the database that
we just created.
• CREATE TABLE - to be able to create a table
new within the database.
• INSERT INTO - to insert values into the tables.
• DESCRIBE - to describe a certain table.
• SHOW TABLES - to show all tables
created.
• SELECT * FROM - simple query to bring
all the data from a certain table without
conditions.
Stage 3. Generation of queries, stored procedures, and views
3.1 Query Generation
• Resume the database created in the previous stage of the project
and perform the following queries using your work environment
Workbench:
a) List of names and surnames of all students.
b)List of teachers along with the name of the department to which
they are linked. The list must return four columns: name, first
last name, second last name and name of the department
c)List of teachers who do not teach any subjects. The list
Must return name, surname, and gender.
d)Return the total number of students.
e) List of all subjects for a particular student.
f) List of subjects with the name and surname of the professor who teaches them
shares
g)List of students, first and last name of a particular subject.
3.2 Generation of stored procedures
•Resume queries e) and g) and carry them out using a procedure.
stored, entering the student and subject as parameters of
entry respectively
3.3 View Generation
•Resumes the query a) and creates a view that yields the same result.
Conclusion
As we could observe in this integrative project, we were making progress.
from the most basic concepts of SQL and specifically MySQL
until somewhat more intense themes; Having a good database and the
Knowing the language is quite a challenge, which is why good salaries are understood.
of database administrators and also the fact that
Many times they fail in companies, I can conclude that it was learned.
a lot in this integrative project due to so much practice that was required and
It was very useful as a starting point in the databases.
References:
- Cabello, M. V. N. (2010). Introducción a las bases de datos relacionales.
Vision Books.
- Celma Giménez, M., Casamayor Ródenas, J. C., & Mota Herranz, L. (2003).
Relational databases.
Santillán, L. A. C., Ginestà, M. G., & Mora, Ó. P. (2014). Databases in
MySQL. Open University of Catalonia.