3.3. 2nd Normal Form¶
All data must depend on the Primary Key
All attributes (non-key columns) dependent on the key (PK)
3.3.1. Problem¶
id (PK) |
firstname |
lastname |
year |
mission |
---|---|---|---|---|
1 |
Melissa |
Lewis |
2035 |
Ares3 |
2 |
Mark |
Watney |
2035 |
Ares3 |
3 |
Rick |
Martinez |
2035 |
Ares3 |
3.3.2. Solution¶
id (PK) |
firstname |
lastname |
---|---|---|
1 |
Melissa |
Lewis |
2 |
Mark |
Watney |
3 |
Rick |
Martinez |
id (PK) |
year |
mission |
---|---|---|
1 |
2031 |
Ares1 |
2 |
2033 |
Ares2 |
3 |
2035 |
Ares3 |
id (PK) |
astronaut_id (FK) |
mission_id (FK) |
---|---|---|
1 |
1 |
3 |
1 |
2 |
3 |
1 |
3 |
3 |

Figure 3.10. All data must depend on the Primary Key. Image credit: 1¶
3.3.3. Recap¶

Figure 3.11. If all data depend on the Primary Key the database achieved 2nd Normal Form.¶
3.3.4. References¶
- 1
Lowgren, Jesper. Database Normalization 1NF 2NF 3NF. Year: 2021. Retrieved: 2022-02-05. URL: https://www.youtube.com/watch?v=SK4H5tTT6-M