Sample Exam Questions
※This sample exam is different from those that appear in the actual OSS-DB Exam.
2024/05/25
Table normalization eliminates data duplication and is very important for reducing capacity and improving maintainability. The key points of normalization are to separate repeated columns with the same purpose within a table and to separate parts with dependencies within the columns of a table.
Columns with the same purpose, for example, are the combinations of items and quantities in the example table, which are repeated in a format such as Item 1, Qty 1, Item 2, Qty 2, and so on. This results in a table structure that extends horizontally, and it can be organized in the first normal form. Specifically, you create a sales detail table and store items and quantities in it. In the data of Yodobashi for 2/1, one row is created in the sales table and three rows of data are created in the sales detail table. You can link these data by creating a common key column, such as a sales number, in both tables.
Column dependency means that a value in one column uniquely determines a value in another column. It is classified into the second normal form, the third normal form, etc., depending on its dependency. In the sales table of this example, if the customer name is determined, the customer location is also determined uniquely, so you create a customer table that stores the customer name and the customer location, and the sales table stores only the customer name, then the customer table is referenced for the location. This is the second normal form.
When it comes to eliminating duplication, it might seem like it is about avoiding repetition of the same values in fields such as date, customer name, customer location, item, etc. However, the key factor is whether there is a dependency between the items. Dates and items have no dependencies on other items. There is a dependency between the customer name and the customer location, so it is subject to normalization, but the customer name is not dependent on any other item, and it is just a coincidence that multiple customers have the same location, so there is no dependency.
So the correct answers are C and E.
In practice, it is common to store the customer ID in the sales table instead of the customer name, and to refer to the customer table for the customer name. The point is that the sales table is not normalized if it has both the customer ID and the customer name, and it is normalized if it only has the customer name, although there is a question of what is the primary key of the customer table.
© EDUCO All Rights Reserved.