February 2024
Beginner
352 pages
8h 16m
English
Our final exercise is going to cover the concept of relations in SQL. In technical terms every table is a relation, but we’re going to be more specific and talk about tables that are connected to other tables in various ways.
A “relation” in SQL is a method of using id columns in tables to associate one table to another through a “one-to-many” or “many-to-many” relationship. In our ECB data we have a rate for each country and a currency that rate applies to. We can say the following about this relationship between rate and currency:
“A Rate has one Currency, and a Currency has many Rate.”
In our 2NF version of the ECB data, the first part is modeled by placing a currency_id in the rate table so ...
Read now
Unlock full access