Recap.md
Database design
Identify:
What are the relationships between the tables.

Basic queries & aggregate functions
Data: https://github.com/nicklasdean/data/blob/main/drone-racing.sql
A) Fetch all pilots with more than 2500 ranking points
7 rows returned
B) Fetch all pilots and the weight of their drone from highest to lowest
10 rows returned: 250 highest, 235 lowest
C) Fetch how many pilots are from each country
Japan 3, Spain 2, Rest of world 1
D) Fetch the average ranking points by country. Sort by country name.
India highest, UAE lowest
Subqueries
A) Fetch all drones with a higher than average battery capacity
4 rows returned
B) Fetch all tracks that have hosted races with a price pool greater than 70.000
3 rows returned
Window Functions
A) Fetch all data about tracks and the average altitude meters
B) Fetch all data about pilots and the average ranking_points per. country.
C) Rank pilots by their total ranking points
D) Rank tracks by difficulty rating
Exercises: Normalisation
Exercise A)
1
Alice
#Travel, #Adventure
2
Bob
#Coding, #Tech, #AI
Identify the issues that make the table unnormalized.
What are the issues with the tables current form?
Transform the table into 1NF.
How does this solve the issues?
Exercise B)
M101
Lionel Messi
Forward
Paris Saint-Germain
2024-03-15
Parc des Princes
M101
Gianluigi Donnarumma
Goalkeeper
Paris Saint-Germain
2024-03-15
Parc des Princes
M102
Erling Haaland
Forward
Manchester City
2024-03-20
Etihad Stadium
M102
Kevin De Bruyne
Midfielder
Manchester City
2024-03-20
Etihad Stadium
M103
Lionel Messi
Forward
Paris Saint-Germain
2024-03-25
Old Trafford
Identify the issues that make the table unnormalized.
What are the issues with the tables current form?
Identify partial/transitive dependencies.
Transform the data to 3NF
How does this solve the issues?
Exercise C)
Identify the issues that make the table unnormalized.
What are the issues with the tables current form?
Identify natural primary keys.
Identify partial/transitive dependencies.
Transform the data to 3NF
How does this solve the issues?
Last updated