Professional Documents
Culture Documents
Diaz Llabres Aleix BD05 Task
Diaz Llabres Aleix BD05 Task
Exercise 1
● Insert a new record in the CITY table using the graphical tool offered
by Mysql Workbench. The data must be the following:
id: 7 name: Inca
Then we click the apply button at the bottom right corner on the result grid.
And we should get a pop-up that shows us the query it ran and that the information
has been successfully added to the DB.
● Insert a new record in the SCHOOL table using the graphical tool offered by
Mysql Workbench. The data must be the following:
id: 9
name: Pau Casesnoves manager: Antoni Garau city_id: 7
You must provide screenshots of the data insertion process and the moment
before applying the changes. Think about describing the captures.
Same procedure as before, we input the data on the table and click apply:
We should get this query, once we hit apply the data will be in the DB.
Exercise 2
Insert more records into the STUDENT table using SQL statements. In the
delivery of the task you must copy the sentences that you have used. The data
must be the following:
The data that does not appear should not be used in the statements.
VALUES
Modify some student names. Use the graphical tool to do this, submitting with the
task screenshots showing all the changes you have made. The names that you must
change are, student table:
First we change the data by double clicking the row we want to modify.
Then we’ll get the script, we hit apply again, and the changes will be made.
Exercise 4
Modify the SCHOOL record Named "Drago", using SQL statements, and
change its name to "Dracaena draco" and the manager to "Francisca". Do it
using a single SQL statement and copy it for the delivery of the task.
Exercise 5
Capitalize the names of students who are female. Do it using a single SQL
statement and copy it for the delivery of the task.
https://www.w3schools.com/mysql/mysql_ref_functions.asp
Exercise 6
Set the first of January, 2000 as birthdate for those students with a null value
in this field. Do it using a single SQL statement and copy it for the delivery of
the task.
Remove from the STUDENT table, those students with a null value in gender
field. Do it using only one SQL statement and copy it for the delivery of the
task.
Exercise 8
Eliminate those students who are not participants in any modality of the
Olympics. Do it using only one SQL statement and copy it for the delivery of
the task.
DELETE `STUDENT`
FROM `OLYMPICS`.`STUDENT`
Exercise 9
Change the name of students that contain the surname “Fernández” for the
same name joined to his dorsal (composed by school id and student id). For
example, "Castilla Fernandez, Luis" will change to " Castilla Fernandez, Luis -
603" because his school id is 6 and his student id is 03. Do it using only one
SQL statement and copy it for the delivery of the task.