简体   繁体   中英

Normalizing 1NF table to 3NF

I am learning Normalization in class. And I found this exercise in this article here

It asks to normalize the following table to 3NF.
在此处输入图片说明

This is how I did it. 在此处输入图片说明

I would like to know if the way I have organized the tables is correct or not.

I would like to know if the way I have organized the tables is correct or not.

No, it's not.

First, normalization through BCNF is based on functional dependencies. You haven't identified any functional dependencies.

Second, normalization never introduces new attributes that weren't in the relation you started with. You introduced the new attributes "sFirstName", "sLastName", "dateOfBirth", "tuteId", "tutorName", "bookId", and "bookName".

Finally, online exercises like the one you linked to aren't very useful. The author clearly expects you to derive all the functional dependencies from the small table provided, but you can't do that reliably unless the data are representative. For example, you can determine by inspection that Room->Date, but in the real world that doesn't make much sense.

Normalization is based on semantics--what does the data mean ? What does "Date" mean here? The data supports all these interpretations. (And more.)

  • The only date a room will be used. (Room->Date)
  • The first date a room will be used. (Room->Date)
  • The date a book was published (Book->Date)
  • The date a student signed up for a unit (StudentId, UnitId->Date)

Based solely on the data, you could claim that Grade->Date, but that makes no sense. Nonsense like that tells you the data isn't representative, and that you can normalize the table only by using information that the author didn't provide .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM