The Wayback Machine - https://web.archive.org/web/20240907001122/https://www.geeksforgeeks.org/denormalization-in-databases/
Open In App

Denormalization in Databases

Last Updated : 08 May, 2023
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Denormalization is a database optimization technique in which we add redundant data to one or more tables. This can help us avoid costly joins in a relational database. Note that denormalization does not mean ‘reversing normalization’ or ‘not to normalize’. It is an optimization technique that is applied after normalization.

Basically, The process of taking a normalized schema and making it non-normalized is called denormalization, and designers use it to tune the performance of systems to support time-critical operations.

In a traditional normalized database, we store data in separate logical tables and attempt to minimize redundant data. We may strive to have only one copy of each piece of data in a database.

For example, in a normalized database, we might have a Courses table and a Teachers table. Each entry in Courses would store the teacherID for a Course but not the teacherName. When we need to retrieve a list of all Courses with the Teacher’s name, we would do a join between these two tables. 

In some ways, this is great; if a teacher changes his or her name, we only have to update the name in one place. 
The drawback is that if tables are large, we may spend an unnecessarily long time doing joins on tables. 
Denormalization, then, strikes a different compromise. Under denormalization, we decide that we’re okay with some redundancy and some extra effort to update the database in order to get the efficiency advantages of fewer joins. 

Pros of Denormalization:

  1. Retrieving data is faster since we do fewer joins
  2. Queries to retrieve can be simpler(and therefore less likely to have bugs), 
    since we need to look at fewer tables.

Cons of Denormalization:

  1. Updates and inserts are more expensive.
  2. Denormalization can make update and insert code harder to write.
  3. Data may be inconsistent.
  4. Data redundancy necessitates more storage.

In a system that demands scalability, like that of any major tech company, we almost always use elements of both normalized and denormalized databases.

Advantages of Denormalization:

Improved Query Performance: Denormalization can improve query performance by reducing the number of joins required to retrieve data.

Reduced Complexity: By combining related data into fewer tables, denormalization can simplify the database schema and make it easier to manage.

Easier Maintenance and Updates: Denormalization can make it easier to update and maintain the database by reducing the number of tables.

Improved Read Performance: Denormalization can improve read performance by making it easier to access data.

Better Scalability: Denormalization can improve the scalability of a database system by reducing the number of tables and improving the overall performance.

Disadvantages of Denormalization:

Reduced Data Integrity: By adding redundant data, denormalization can reduce data integrity and increase the risk of inconsistencies.

Increased Complexity: While denormalization can simplify the database schema in some cases, it can also increase complexity by introducing redundant data.

Increased Storage Requirements: By adding redundant data, denormalization can increase storage requirements and increase the cost of maintaining the database.

Increased Update and Maintenance Complexity: Denormalization can increase the complexity of updating and maintaining the database by introducing redundant data.

Limited Flexibility: Denormalization can reduce the flexibility of a database system by introducing redundant data and making it harder to modify the schema.


Previous Article
Next Article

Similar Reads

Difference between Normalization and Denormalization
Normalization: Normalization is the method used in a database to reduce the data redundancy and data inconsistency from the table. It is the technique in which Non-redundancy and consistency data are stored in the set schema. By using normalization the number of tables is increased instead of decreased. Denormalization: Denormalization is also the
1 min read
What is Integration Databases in NoSQL?
In NoSQL databases, integration databases refer to databases that combine different types of NoSQL databases and/or traditional relational databases to provide a comprehensive and flexible data storage solution. This can help organizations to overcome some of the limitations of using a single type of database and to take advantage of the strengths
5 min read
Difference between Parallel and Distributed databases
1. Parallel Database :A parallel DBMS is a DBMS that runs across multiple processors and is designed to execute operations in parallel, whenever possible. The parallel DBMS link a number of smaller machines to achieve the same throughput as expected from a single large machine.Features : There are parallel working of CPUsIt improves performanceIt d
3 min read
Types of Databases
A quick review of the present need to store massive chunks of data relevant to multiple related or unrelated categories, reveals that databases must be highly effective at what they are designed to do. This is not only because of the amount of data being continuously revised or modified that we are dealing with the dynamics of it aren't of sole int
7 min read
Concepts of Distributed databases
A Distributed database is defined as a logically related collection of data that is shared which is physically distributed over a computer network on different sites. Distributed DBMS : The Distributed DBMS is defined as, the software that allows for the management of the distributed database and make the distributed data available for the users. A
3 min read
How to Store and Extract XML Documents from Databases
We can used different apporache, for organizing the contents of XML document to facilitate their subsequent querying and retrieval. This are the following approaches, for storing and extracting XML document from database. In the first approach, we can use database management system in which we store the document as a text and the relational and obj
3 min read
Clausal Form in Deductive Databases
In clausal form, the formula is made up of a number of clauses, where each clause is composed of a number of literals connected by OR logical connectives only. A formula can have the following quantifiers: Universal quantifier - It can be understood as - "For all x, P(x) holds", meaning P(x) is true for every object x in the universe. Example: All
2 min read
Horn Clauses in Deductive Databases
Horn clause is clause (a disjunction of literals) with at most one positive, i.e. unnegated, literal. A clause with at most one positive (unnegated) literal is called a Horn Clause. Deductive Database: A type of database which can make conclusions based on sets of well-defined rules, stored in database. RDBMS and logic programming are combined usin
2 min read
Eventual vs Strong Consistency in Distributed Databases
1. Eventual Consistency : Eventual consistency is a consistency model that enables the data store to be highly available. It is also known as optimistic replication & is key to distributed systems. So, how exactly does it work? Let's Understand this with the help of a use case. Real World Use Case : Think of a popular microblogging site deploye
4 min read
Production databases in SQL queries
SQL is a Structured Query Language which is a computer language for storing, manipulating, and retrieving data stored in a relational database. SQL is the most powerful data handling tool. Actionable advice to help you get the most versatile language and create beautiful, effective queries. SQL is effectively used to insert, search, update, delete,
4 min read
Design of Parallel Databases | DBMS
A parallel DBMS is a DBMS that runs across multiple processors or CPUs and is mainly designed to execute query operations in parallel, wherever possible. The parallel DBMS link a number of smaller machines to achieve the same throughput as expected from a single large machine. In Parallel Databases, mainly there are three architectural designs for
3 min read
Aggregate-Oriented Databases in NoSQL
The aggregate-Oriented database is the NoSQL database which does not support ACID transactions and they sacrifice one of the ACID properties. Aggregate orientation operations are different compared to relational database operations. We can perform OLAP operations on the Aggregate-Oriented database. The efficiency of the Aggregate-Oriented database
3 min read
Specialty Databases
A NoSQL originally referring to non SQL or nonrelational is a database that provides a mechanism for storage and retrieval of data. NoSQL databases are used in real-time web applications and big data and their use is increasing over time. NoSQL systems are also sometimes called Not only SQL to emphasize the fact that they may support SQL-like query
4 min read
Document Databases in NoSQL
In this article, we will see about the Document Data Model of NoSQL and apart from Examples, Advantages, Disadvantages, and Applications of the document data model. Document Data Model: A Document Data Model is a lot different than other data models because it stores data in JSON, BSON, or XML documents. in this data model, we can move documents un
4 min read
Types of NoSQL Databases
A database is a collection of structured data or information which is stored in a computer system and can be accessed easily. A database is usually managed by a Database Management System (DBMS). NoSQL is a non-relational database that is used to store the data in the nontabular form. NoSQL stands for Not only SQL. The main types are documents, key
3 min read
Secondary Indexing in Databases
Pre-requisites: Primary Indexing in Databases Databases are a critical component of modern applications, storing vast amounts of data and serving as a source of information for various functions. One of the primary challenges in managing databases is providing efficient access to the stored data. To meet this challenge, database management systems
5 min read
Clustering Indexing in Databases
Pre-requisites: Primary Indexing in Databases, indexing Databases are a crucial component of modern computing, providing a structured way to store, manage, and retrieve vast amounts of data. As the size of databases increases, it becomes increasingly important to have an efficient indexing mechanism that can quickly search and retrieve data. Cluste
4 min read
Indexing in Databases - Set 1
Indexing improves database performance by minimizing the number of disc visits required to fulfill a query. It is a data structure technique used to locate and quickly access data in databases. Several database fields are used to generate indexes. The main key or candidate key of the table is duplicated in the first column, which is the Search key.
9 min read
Active Databases
An active Database is a database consisting of a set of triggers. These databases are very difficult to be maintained because of the complexity that arises in understanding the effect of these triggers. In such database, DBMS initially verifies whether the particular trigger specified in the statement that modifies the database is activated or not,
3 min read
Most Popular Databases in 2024
There are various database management systems known in the market that many companies use according to their need and use. As we know, almost every service from social media, payments applications, various booking services through applications, etc has enormous amounts of data on the server. Suppose, you are playing a multiplayer game and there is
10 min read
Top 7 Databases to Learn in 2024
A database is just like a room in an office where all the files and important information can be stored related to a project. Every company needs a database to store and organize the information. The information that we store can be very sensitive, so we always have to be careful while accessing or manipulating the information in the database.  In
10 min read
Primary Indexing in Databases
Indexing is a technique used to reduce access cost or I/O cost, now the question arrives what is access cost? Access cost is defined as the number of secondary memory blocks which is transferred from secondary memory to main memory in order to access required data. In this article, we are going to discuss every point about primary indexing. What is
5 min read
Horizontal and Vertical Scaling In Databases
Scaling alters the size of a system. In the scaling process, we either compress or expand the system to meet the expected needs. The scaling operation can be achieved by adding resources to meet the smaller expectation in the current system, by adding a new system to the existing one, or both.  Types of Scaling:  Scaling can be categorized into 2 t
3 min read
DBMS Tutorial – Learn Database Management System
Database Management System is a software or technology used to manage data from a database. Some popular databases are MySQL, Oracle, MongoDB, etc. DBMS provides many operations e.g. creating a database, Storing in the database, updating an existing database, delete from the database. DBMS is a system that enables you to store, modify, and retrieve
8 min read
SQL Query Interview Questions
SQL or Structured Query Language is a standard language for relational databases. SQL queries are powerful tools used to, manipulate, and manage data stored in these databases like MySQL, Oracle, PostgreSQL, etc. Whether you're fetching specific data points, performing complex analyses, or modifying database structures, SQL queries provide a standa
10 min read
SQL Interview Questions
SQL is a standard database language used for accessing and manipulating data in databases. It stands for Structured Query Language and was developed by IBM Computer Scientists in the 1970s. By executing queries, SQL can create, update, delete, and retrieve data in databases like MySQL, Oracle, PostgreSQL, etc. Overall, SQL is a query language that
15+ min read
SQL Joins (Inner, Left, Right and Full Join)
SQL Join operation combines data or rows from two or more tables based on a common field between them. In this article, we will learn about Joins in SQL, covering JOIN types, syntax, and examples. SQL JOINSQL JOIN clause is used to query and access data from multiple tables by establishing logical relationships between them. It can access data from
5 min read
Introduction of DBMS (Database Management System)
A database is a collection of interrelated data that helps in the efficient retrieval, insertion, and deletion of data from the database and organizes the data in the form of tables, views, schemas, reports, etc. For Example, a university database organizes the data about students, faculty, admin staff, etc. which helps in the efficient retrieval,
8 min read
ACID Properties in DBMS
A transaction is a single logical unit of work that accesses and possibly modifies the contents of a database. Transactions access data using read and write operations. In order to maintain consistency in a database, before and after the transaction, certain properties are followed. These are called ACID properties. For those looking to master thes
6 min read
Introduction of ER Model
Peter Chen developed the ER diagram in 1976. The ER model was created to provide a simple and understandable model for representing the structure and logic of databases. It has since evolved into variations such as the Enhanced ER Model and the Object Relationship Model The Entity Relational Model is a model for identifying entities to be represent
10 min read
Article Tags :
Practice Tags :