You have 3 free guides left 😟
Unlock your guides
You have 3 free guides left 😟
Unlock your guides

9.3 Normalization process and denormalization

3 min readaugust 6, 2024

and are crucial concepts in database design. They help organize data efficiently, reduce redundancy, and improve integrity. These processes involve breaking down or combining tables to achieve the right balance between data consistency and query performance.

Understanding normalization and denormalization is essential for creating effective databases. Normalization minimizes redundancy and dependency, while denormalization can boost query speed. Knowing when to apply each technique helps optimize database performance for specific use cases.

Normalization and Denormalization

Normalization Process

Top images from around the web for Normalization Process
Top images from around the web for Normalization Process
  • Normalization organizes data in a database to minimize redundancy and dependency
    • Involves breaking down a database into smaller, more manageable tables
    • Ensures each table represents a single, specific topic or entity (customers, orders, products)
    • Reduces data redundancy by storing data only once in the most appropriate table
    • Improves data integrity by making updates simpler and reducing the risk of inconsistencies
  • Normalization is typically achieved through a series of normal forms (1NF, 2NF, 3NF, BCNF)
    • Each normal form builds upon the previous one, adding more stringent requirements
    • 1NF eliminates repeating groups and ensures atomic values in each cell
    • 2NF removes partial dependencies on composite keys
    • 3NF removes transitive dependencies on non-key attributes
    • BCNF (Boyce-Codd Normal Form) removes all functional dependencies on non-key attributes

Denormalization and Trade-offs

  • Denormalization is the process of intentionally adding redundancy to a normalized database
    • Involves combining data from multiple tables into a single table
    • Can improve query performance by reducing the need for complex joins
    • Useful in read-heavy databases where query speed is a priority (data warehouses, reporting systems)
  • Trade-offs exist between normalization and denormalization
    • Normalization reduces redundancy and improves data integrity but can slow down queries
    • Denormalization improves query performance but increases redundancy and maintenance complexity
    • The appropriate balance depends on the specific requirements of the database and its applications
  • Performance considerations play a key role in deciding between normalization and denormalization
    • Normalized databases are generally more suitable for transaction processing systems (OLTP)
    • Denormalized databases are often used in data warehouses and business intelligence systems (OLAP)
    • Indexing, caching, and other optimization techniques can help mitigate performance issues in normalized databases

Decomposition Techniques

Lossless Decomposition

  • Decomposition is the process of breaking down a into smaller relations
    • Aims to reduce redundancy and improve data integrity
    • Can be lossless or lossy, depending on whether information is preserved
  • ensures that no information is lost during the decomposition process
    • Allows the original relation to be reconstructed by joining the decomposed relations
    • Achieved through the use of functional dependencies and normalization techniques
    • Guarantees that the decomposed relations contain all the information present in the original relation
  • Example of lossless decomposition:
    • Original relation: Student(StudentID, Name, CourseID, CourseName, Grade)
    • Decomposed relations:
      • Student(StudentID, Name)
      • Enrollment(StudentID, CourseID, Grade)
      • Course(CourseID, CourseName)

Dependency Preservation

  • is a property of decomposition that ensures functional dependencies are maintained
    • Functional dependencies represent relationships between attributes in a relation
    • Preserving dependencies helps maintain data integrity and consistency
    • Allows functional dependencies to be checked and enforced locally within each decomposed relation
  • Dependency preservation is achieved when all functional dependencies are represented in the decomposed relations
    • Each should be contained entirely within a single decomposed relation
    • Ensures that update anomalies and data inconsistencies are avoided
  • Example of dependency preservation:
    • Original relation: Employee(EmployeeID, Name, DepartmentID, DepartmentName, Salary)
    • Functional dependencies:
      • EmployeeID → Name, DepartmentID, Salary
      • DepartmentID → DepartmentName
    • Decomposed relations:
      • Employee(EmployeeID, Name, DepartmentID, Salary)
      • Department(DepartmentID, DepartmentName)
© 2024 Fiveable Inc. All rights reserved.
AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.


© 2024 Fiveable Inc. All rights reserved.
AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.

© 2024 Fiveable Inc. All rights reserved.
AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.
Glossary
Glossary