0% found this document useful (0 votes)
40 views41 pages

2ND TM 2023-2024 Normal Forms

Uploaded by

Bannie kawata
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views41 pages

2ND TM 2023-2024 Normal Forms

Uploaded by

Bannie kawata
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 41

Normal Forms

Introduction to
Normal Forms
Definition:

• Normal Forms are a set of guidelines or


rules that help in organizing and
structuring relational databases. These
guidelines aim to eliminate redundancy and
dependency issues within tables, ensuring
data integrity.
First Normal Form (1NF)

• Definition:
• In 1NF, each column in a table must contain
atomic (indivisible) values.
• No repeating groups or arrays are allowed.
• Every cell should have a single value.
Examples of Tables in
1NF:
Table: Students

StudentID Name Subjects


1 John Doe Math, English
2 Jane Smith Science
3 Bob Johnson Math, Science, English
Modified Table in 1NF:

StudentID Name Subject


1 John Doe Math
1 John Doe English
2 Jane Smith Science
3 Bob Johnson Math
3 Bob Johnson Science
3 Bob Johnson English
3. Second Normal Form (2NF)

• Definition:
• A table is in 2NF if it is in 1NF and all non-
key attributes are fully functionally
dependent on the primary key.
Examples of Tables in
2NF:
Table: StudentsCourses

StudentID Course Instructor


1 Math Dr. Smith
1 English Prof. Jones
2 Science Dr. Johnson
Modified Table in 2NF: Table: Courses

Course Instructor
Math Dr. Smith
English Prof. Jones
Science Dr. Johnson
4. Third Normal Form (3NF)

• Definition:
• A table is in 3NF if it is in 2NF and there is no
transitive dependency, i.e., no non-prime attribute
depends on another non-prime attribute.
Examples of Tables in
3NF:
Table: Employees

EmployeeID Department ManagerID


1 HR 101
2 Finance 102
3 IT 101
Modified Table in 3NF: Table: Departments

Department ManagerID
HR 101
Finance 102
IT 101
5. Problems of Tables in 1NF
• Redundancy: Repetition of data leads to wastage of
storage and may cause inconsistencies.
• Update Anomalies: Difficulties in updating data due to
redundancy.
• Insertion Anomalies: Adding new data may lead to
incomplete entries or errors.
6. Determinant of Normal Forms

• Determining Normal Form: The process


involves analyzing dependencies and
ensuring that tables satisfy the criteria of
1NF, 2NF, and 3NF to avoid data
redundancy and maintain data integrity.
7. Foreign Keys

• Definition:
• A foreign key is a column or a set of columns in a table
that refers to the primary key of another table.
• Purpose:
• Establishes relationships between tables, ensuring
referential integrity.
ACTIVITY
1. What is the primary goal of
First Normal Form (1NF)?
• a. Eliminate data redundancy
b. Establish relationships between tables
c. Ensure transitive dependencies
d. Optimize database performance
Answer: a. Eliminate data redundancy
2. In which normal form should a table
be to eliminate transitive dependencies?

a. First Normal Form (1NF)


b. Second Normal Form (2NF)
c. Third Normal Form (3NF)
d. Fourth Normal Form (4NF)
Answer: c. Third Normal Form (3NF)
3. What is a characteristic of a table in
Second Normal Form (2NF)?

a. No repeating groups or arrays


b. Every column contains atomic values
c. All non-key attributes are fully functionally dependent on
the primary key
d. No transitive dependencies
Answer: c. All non-key attributes are fully
functionally dependent on the primary key
4. What problem is associated with
tables in First Normal Form (1NF)?

a. Data redundancy
b. Transitive dependencies
c. Incomplete entries
d. Data inconsistency
Answer: a. Data redundancy
5. How can the problems of tables in
First Normal Form (1NF) be addressed?

a. Use more complex data types


b. Normalize the table to higher normal forms
c. Introduce repeating groups
d. Increase the size of the database
Answer: b. Normalize the table
to higher normal forms
6. What is the purpose of foreign keys in
database design?

• a. Ensure data redundancy


b. Establish relationships between tables
c. Introduce transitive dependencies
d. Optimize database performance
Answer: b. Establish relationships between
tables
7. What is a key characteristic of a table
in Third Normal Form (3NF)?

• a. No repeating groups or arrays


b. Every column contains atomic values
c. No transitive dependencies
d. All non-key attributes are fully functionally dependent
on the primary key
Answer: c. No transitive
dependencies
8. Which normal form focuses on
ensuring that there are no
repeating groups or arrays in a
table?
a. First Normal Form (1NF)
b. Second Normal Form (2NF)
c. Third Normal Form (3NF)
d. Boyce-Codd Normal Form (BCNF)
Answer: a. First Normal Form (1NF)
9. What is the role of determinant in
the context of normal forms?
a. Ensures data integrity
b. Identifies the primary key of a table
c. Helps in determining normal forms by analyzing
dependencies
d. Eliminates transitive dependencies
Answer: c. Helps in determining normal forms
by analyzing dependencies

You might also like