Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Describe normalization and why it is used

A worked example

Single answer

A company tracks sales in a spreadsheet. Part of the spreadsheet is shown in the exhibit.

The company normalizes this data into a relational database. Each entity (customer, product, sales order, and line item) is stored in its own table:

  • The Customer table stores CustomerID, CustomerName, and CustomerAddress.
  • The Order table stores only the OrderNo and the CustomerID of the customer who placed the order.
  • The LineItem table stores the OrderNo, ItemNo, ProductID, and Qty.

After the migration, customer Ana Silva moves to a new address.

OrderNoCustomerNameCustomerAddressProductNameUnitPriceQty
10Ana Silva7 Elm Rd DenverLamp19.501
10Ana Silva7 Elm Rd DenverBulb2.254
11Tom Lee3 Bay St AustinLamp19.502
12Ana Silva7 Elm Rd DenverShade8.751
12Ana Silva7 Elm Rd DenverBulb2.252

In the normalized database, which rows must be modified to record Ana Silva's new address?

Choose one answer
Why

In the spreadsheet, Ana Silva's address is repeated on four rows, so every copy would need to change. After normalization, each customer is recorded once in the Customer table, and orders refer to the customer only by key. The address change therefore needs a single row update, which is a direct benefit of removing duplicated data.

  • Not correct: Two rows in the Order table. The Order table references the customer through a key and holds no address, so its rows do not change when the address changes.
  • Not correct: One Customer row and two Order rows. Normalization stores the address once in the Customer table. The Order rows reference the customer by CustomerID, which stays the same when the address changes.
  • Correct: One row in the Customer table. Each customer is recorded once as a row in the Customer table, so changing the address requires modifying only that single row.
  • Not correct: Four rows in the LineItem table. Line items do not store customer details, so updating four rows reflects the duplication of the original spreadsheet, not the normalized design.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free