0

For the most part, I understand first, second, and third normal form. I would just like clarification on a few normalization examples I found on the net. The first example is as follows:

UNF
Supplier: supplier_id, supplier_name, prod_code, prod_desc, cost, markup, dept_cd

1NF:
Supplier:  supplier_id, supplier_name
supplier_product:  supplier_id, prod_code, prod_desc, cost, markup, dept_cd

2NF:
Supplier:  supplier_id, supplier_name
supplier_product:  supplier_id, prod_code
product:  prod_code, prod_desc, cost, markup, dept_cd

3NF:
Supplier:  supplier_id, supplier_name
Product:  prod_code, prod_desc, dept_cd (FK), supplier_id (FK), cost, markup 
dept:  dept_cd, dept_name, aisle_no

Source: http://cs.mvnu.edu/twiki/bin/view/Main/Lab8DB2013

When moving from UNF to 1NF, are we simply moving the values that make up repeating groups to the new entity along with the primary key from the original entity? In the above example, products and departments are considered repeating groups. Thus, both are moved to the second entity.

This can also be demonstrated in the following example:

0NF
ORDER(order#, customer#, name, address, orderdate(product#, description, quantity, unitprice))
1NF
ORDER(order#, customer#, name, address, orderdate)
ORDER_LINE(order#, product#, description, quantity, unitprice)
2NF
ORDER(order#, customer#, name, address, orderdate)
ORDER_LINE(order#, product#, quantity)
PRODUCT(product#, description, unitprice)
3NF
ORDER(order#, customer#, orderdate)
CUSTOMER(customer#, name, address)
ORDER_LINE(order#, product#, quantity)
PRODUCT(product#, description, unitprice)

Source: http://www4.comp.polyu.edu.hk/~cstyng/data.98/tutorials/norm5.html

In this case, only products are considered to be a repeating group, not customers. Therefore, customer attributes are left in the original entity. Do I understand this correctly?

EDIT: An additional Example

A software contract and consultancy firm maintain details of all the various projects in which its employees are currently involved. These details comprise: Normalize this data to Third Normal Form.

• Employee Number

• Employee Name

• Date of Birth

• Department Code

• Department Name

• Project Code

• Project Description

• Project Supervisor Assume the following and normalize this data into 3NF:

• Each employee number is unique.

• Each department has a single department code.

• Each project has a single code and supervisor.

• Each employee may work on one or more projects.

• Employee names need not necessarily be unique.

• Project Code, Project Description, and Project Supervisor are repeating fields.

UNF
Employee Number, Employee Name, Date of Birth, Department Code, Department Name, Project Code, Project Description, Project Supervisor
1NF  
Employee Number, Employee Name, Date of Birth, Department Code, Department Name
Employee Number, Project Code,  Project Description, Project Supervisor


2NF  
Employee Number, Employee Name, Date of Birth, Department Code, Department Name
Employee Number, Project Code,
Project Code, Project Description, Project Supervisor


3NF  
EmployeeNumber,Employee Name, Date of Birth, *Department Code
Department Code, Department Name 
Employee Number, Project Code
Project Code,  Project Description, Project Supervisor
Zampanò
  • 574
  • 3
  • 11
  • 33
  • Possible duplicate of [Normalization in database management system](https://stackoverflow.com/questions/40623169/normalization-in-database-management-system) – philipxy May 28 '18 at 05:11
  • Hi. You are just asking what 1NF is & how to get there, which is asking us to rewrite a textbook/reference. That is too broad a question. Anyway "1NF" has no single definition, so defining when you are there depends on your reference. There is no limit to what a "UNF" might be, since it just means non-relational, so there is no way to describe in general how to generically map from one to a "1NF". Tell us your reference & ask a specific question where you are stuck. Don't try to learn from the web. Read published textbooks. Don't use links, include relevant text. Ask 1 question per post. – philipxy May 28 '18 at 05:19
  • Please tag your database normalization questions with [tag:database-normalization]. – philipxy May 31 '18 at 18:22

0 Answers0