Database Normalization: 2NF and 3NF

ObservantLimerick avatar
ObservantLimerick
·
·
Download

Start Quiz

Study Flashcards

10 Questions

What is the primary key in a table?

A composite key consisting of EmpID and CourseTitle

What is the main characteristic of a relation in 1st normal form?

No multivalued attributes and unique rows

What is the purpose of normalization?

To minimize data redundancy and improve data integrity

What is a functional dependency?

The value of one attribute determines the value of another attribute

What is the minimum degree of normalization that is generally considered sufficient?

3rd normal form

What is a candidate key?

A unique identifier, one of which will become the primary key

What is the characteristic of a table in 1st normal form?

Each row is unique and there are no multivalued attributes

What is the purpose of a primary key?

To uniquely identify each record in a table

What is the characteristic of a relation?

No multivalued attributes and each row is unique

What is the result of normalization?

Minimization of data redundancy and improvement of data integrity

Study Notes

Second Normal Form (2NF)

  • In 2NF, every non-key attribute is fully functionally dependent on the entire primary key.
  • No partial functional dependencies are allowed.
  • Every non-key attribute must be defined by the entire key, not just part of the key.

Third Normal Form (3NF)

  • 3NF is 2NF plus no transitive dependencies.
  • Transitive dependencies occur when the primary key is a determinant for another attribute, which in turn is a determinant for a third attribute.
  • To solve transitive dependencies, non-key determinants with transitive dependencies are moved to a new table, becoming the primary key in the new table and staying as a foreign key in the old table.

Key Fields

  • Keys serve two main purposes: primary keys (unique identifiers of a relation) and foreign keys (identifiers that enable a dependent relation to refer to its parent relation).
  • Keys can be simple (a single field) or composite (more than one field).

Transforming ER and EER Diagrams into Relations

  • Simple attributes in ER diagrams map directly onto the relation.
  • Composite attributes are broken down into their simple component attributes.
  • Multivalued attributes become a separate relation with a foreign key taken from the superior entity.

Normalization

  • First Normal Form (1NF): no multivalued attributes (repeating groups), every attribute value is atomic, and every relation is in 1NF.
  • Higher degrees of normalization are possible, but 3NF is generally considered sufficient.

Functional Dependencies and Keys

  • Functional dependency: the value of one attribute (the determinant) determines the value of another attribute.
  • Candidate key: a unique identifier, one of which will become the primary key.
  • Each non-key field is functionally dependent on every candidate key.

Learn about the principles of Second Normal Form (2NF) and Third Normal Form (3NF) in database normalization, including functional dependencies and transitive dependencies.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

Use Quizgecko on...
Browser
Browser