Database Normalization: 1NF, 2NF, 3NF

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is a key characteristic of unnormalized data?

  • It ensures each row/column intersection contains multiple values.
  • It is structured to avoid data anomalies.
  • It has been processed to eliminate redundancy.
  • It represents data in its original, raw state. (correct)

Normalization primarily aims to increase data redundancy to ensure data integrity.

False (B)

In database normalization, what is the term for a rule that guides this process?

normal form

A data ______ refers to an undesirable consequence of data modification, often addressed through normalization.

<p>anomaly</p> Signup and view all the answers

Which normal form requires the elimination of repeating groups and identification of the primary key?

<p>First Normal Form (1NF) (B)</p> Signup and view all the answers

Third Normal Form (3NF) allows the presence of non-key attributes determined by another non-key attribute.

<p>False (B)</p> Signup and view all the answers

What is a primary objective of normalization concerning tables in a database?

<p>Ensuring each table represents a single, specific subject. (D)</p> Signup and view all the answers

What level of normalization is considered the highest level necessary for most applications?

<p>3NF</p> Signup and view all the answers

In Second Normal Form (2NF), beyond the requirements of 1NF, what additional condition must be met?

<p>All columns must depend on the primary key. (B)</p> Signup and view all the answers

Match the following normal forms with their characteristics:

<p>First Normal Form (1NF) = There are no repeating groups, and the primary key is identified. Second Normal Form (2NF) = 1NF and all columns depend on the table's primary key. Third Normal Form (3NF) = 2NF and no non-key attributes determined by another non-key attribute.</p> Signup and view all the answers

Flashcards

Unnormalized Data

Raw data in its original state, potentially containing redundant, multivalued data, and/or other data anomalies.

Normalization

A process that assigns attributes to entities to reduce or eliminate data redundancy.

Data Anomaly

An undesirable consequence of data modification, e.g., insertion, deletion or update anomalies.

Objectives of Normalization

Each table represents a single subject, each row/column intersection contains only one value, and no data item is unnecessarily stored in more than one table.

Signup and view all the flashcards

First Normal Form (1NF)

There are no repeating groups and the primary key is identified.

Signup and view all the flashcards

Second Normal Form (2NF)

It is in 1NF and all non-key attributes are fully functionally dependent on the primary key.

Signup and view all the flashcards

Third Normal Form (3NF)

It is in 2NF and there are no transitive functional dependencies.

Signup and view all the flashcards

Boyce-Codd Normal Form (BCNF)

Every determinant is a candidate key

Signup and view all the flashcards

Fourth Normal Form (4NF)

In 3NF and no independent multivalued dependencies.

Signup and view all the flashcards

Study Notes

  • An unnormalized data is raw data in its original state
  • Unnormalized data might contain redundant data, multivalued data, and/or other data anomalies
  • Data anomaly is an undesirable consequence of a data modification
  • Normalization assigns attributes to entities
  • Normalization reduces or eliminates data redundancies

Objectives of Normalization

  • Each table/relation represents a single subject
  • Each row/column intersection contains only one value and not a group of values
  • No data item is unnecessarily stored in more than one table
  • All nonprime attributes (not part of a key) in a table are dependent on the primary key
  • Each table has no insertion, update, or deletion anomalies
  • Each rule in database normalization is a normal form

Common Normal Forms

  • First Normal Form (1NF) has no repeating groups, and the primary key is identified
  • Second Normal Form (2NF) is 1NF, and all columns depend on the table's primary key
  • Third Normal Form (3NF) is 2NF, and there are no non-key attributes determined by another non-key attribute
  • Boyce-Codd Normal Form (BCNF) is every determinant is a candidate key (special case of 3NF)
  • Fourth Normal Form (4NF) is 3NF and no independent multivalued dependencies
  • While other normalization levels exist, 3NF is considered the highest level necessary for most applications

First Normal Form Example

  • ADV_NAME: A. Santos, SUBJ_CODE: MAT1, SUBJECT: Math, STU_NUM: 018, STU_NAME: John L.
  • ADV_NAME: A. Santos, SUBJ_CODE: MAT1, SUBJECT: Math, STU_NUM: 021, STU_NAME: Mae R.
  • ADV_NAME: A. Santos, SUBJ_CODE: MAT1, SUBJECT: Math, STU_NUM: 026, STU_NAME: Mark V.
  • ADV_NAME: C. Reyes, SUBJ_CODE: CHEM, SUBJECT: Chemistry, STU_NUM: 020, STU_NAME: Zac S.
  • ADV_NAME: C. Reyes, SUBJ_CODE: CHEM, SUBJECT: Chemistry, STU_NUM: 019, STU_NAME: Ed P.

Second Normal Form Examples

  • Table 1: Advisers includes ADV_ID and ADV_NAME; ADV_ID 0001 corresponds to ADV_NAME A. Santos and ADV_ID 0002 corresponds to ADV_NAME C. Reyes
  • Table 2: Subjects includes SUBJ_CODE and SUBJECT; SUBJ_CODE MAT1 corresponds to SUBJECT Math, and SUBJ_CODE CHEM corresponds to SUBJECT Chemistry
  • Table 3: Students includes STU_NUM and STU_NAME; STU_NUM 018 corresponds to STU_NAME John L., STU_NUM 021 corresponds to STU_NAME Mae R., STU_NUM 026 corresponds to STU_NAME Mark V., STU_NUM 020 corresponds to STU_NAME Zac S., and STU_NUM 019 corresponds to STU_NAME Ed P.

Third Normal Form Example

  • It includes all three tables from 2NF, listed above in the "Second Normal Form Examples" section.
  • Table 4: StudentAdvisers includes ADV_ID, SUBJ_CODE, and STU_NUM
  • ADV_ID: 0001, SUBJ_CODE: MAT1, STU_NUM: 018
  • ADV_ID: 0001, SUBJ_CODE: MAT1, STU_NUM: 021
  • ADV_ID: 0001, SUBJ_CODE: MAT1, STU_NUM: 026
  • ADV_ID: 0002, SUBJ_CODE: CHEM, STU_NUM: 020
  • ADV_ID: 0002, SUBJ_CODE: CHEM, STU_NUM: 019

Unnormalized Table

  • This has ADVISOR, SUBJECT, and STUDENTS columns
  • Santos A. advises on Math, and has John L., Mae R., and Mark V. as students
  • Reyes C. advises on Chemistry, and has Zac S. and Ed P. as students

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Database Normalization
10 questions

Database Normalization

EntertainingEuler avatar
EntertainingEuler
Database Normal Forms Quiz
39 questions

Database Normal Forms Quiz

GreatestIrrational8477 avatar
GreatestIrrational8477
Database Normalization and Normal Forms
16 questions
Database Normalization and Normal Forms
5 questions
Use Quizgecko on...
Browser
Browser