Workshop
The quiz and exercises are provided to help you solidify your understanding of the material covered today. Try to understand the quiz and exercise answers before continuing to tomorrow's lesson.
Quiz
True or False: You must normalize a database so that it can be built.
True or False: There are more than three normal forms of a database.
Quiz Answers
False. However, a database that is not normalized will not usually work efficiently, and the data will not be easy to manage.
True. There are many more (in fact nine), though only the most important three are covered in this lesson.
Exercises
A collection of music CDs is to be represented by a table cds, and the table contains information that models the artist's name, the title of the CD, and the tracks on the CD. Imagine that the table currently has the columns artist, title, name_track1, name_track2, and so on up to name_track20. Which column or columns would you move to another table to normalize to First Normal Form?
In the preceding example, which column would you move to another table to normalize to Second Normal Form?
In the preceding example, which column would you move to another table to normalize to Third Normal Form?
Answers to Exercises
To achieve First Normal Form, you would move name_track1, name_track2, and so on up to name_track20 to another table. These are multiple instances of effectively the same column.
To achieve Second Normal Form, you would move artist to another table. Because (typically) an artist will record several albums, it would appear multiple times.
The table is already in Third Normal Form because no columns in the table depend on other columns.