Database normalization helps to organize data in a structured way by eliminating redundancy and ensuring data integrity within relational databases.
A relational database is a type of database that stores data in tables, which are structured into rows and columns consisting of table, rows, and columns.
Primary key and Foreign key are the two types of keys used in relational databases to link data from different tables.
Redundant data means storing the same data in multiple places, which wastes disk space and creates maintenance problems. Inconsistent dependency happens when data in a database relies on other data in a way that is unpredictable or incorrect.
Normalization has different forms, and each aims to eliminate specific types of redundancy or inconsistency to create a well-organized database. First Normal Form (1NF) eliminates repeating groups in individual tables by creating a separate table for each set of related data. Second Normal Form (2NF) removes partial dependency. Third Normal Form (3NF) removes transitive dependencies.
Elementary key Normal Form (EKNF) further refines 3NF to ensure all functional dependencies are straightforward and clear, without any complex dependencies. Boyce–Codd Normal Form (BCNF) eliminates functional dependencies except if A is a candidate key. Fourth Normal Form (4NF) deals with multivalued dependencies and Fifth Normal Form (5NF) is the highest level of normalization.
Denormalization is the process of adding redundant data to a database to improve performance by reducing processing across multiple tables.