Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
1.1.
What is Data Warehouse?
1.2.
History of Data Warehousing
1.3.
How is the data warehouse architected?
1.4.
How does a data warehouse work?
1.5.
Properties of Data Warehouse
1.6.
Benefits of Data Warehouse
1.7.
Why learn Data Warehousing?
2.
Architecture
3.
Designs of the Data Warehouse
4.
Data Warehouse Schemas
4.1.
Definition
4.2.
Types
4.2.1.
Star Schema
4.2.2.
Snowflake Schema
4.2.3.
Fact Constellation Schema
4.2.4.
Hybrid Schema
4.2.5.
Third Normal Form Schema
5.
Data Warehouse Implementation
5.1.
Data Mart
5.2.
ETL & ELT
5.3.
OLAP and OLTP
5.4.
Metadata
6.
Characteristics of Data Warehouse
7.
Data Warehouse Security
8.
Advantages of data warehouse
9.
Disadvantages of data warehouse
10.
Limitations of data warehouse
11.
Applications of data warehouse
12.
Career in data warehousing
13.
Frequently Asked Questions
13.1.
What is data warehouse with example?
13.2.
Write the main 5 components of the Data Warehouse.
13.3.
Which warehouse schema is most preferred?
13.4.
Is SQL a data warehouse?
14.
Conclusion
Last Updated: Mar 27, 2024

Data Warehousing

gp-icon
Data Mining and Warehousing First Naukri
Free guided path
7 chapters
63+ problems
gp-badge
Earn badges and level up

Introduction

What is Data Warehouse?

In this article, we will learn about What is Data Warehouse, its architecture, design implementation, security, advantages and disadvantages, and many more. Data warehousing involves process collection, storing, and analyzing large data volumes to support business decision-making. Therefore we will cover the basics of a data warehouse and go in-depth about its subtopics.

What is Data Warehouse?

The data warehouse is used for storing large volumes of data from various sources in a structured manner. It is a centralized repository designed to support Business Intelligence and analytics activities. Data warehousing enables various organizations to integrate and analyze data from disparate sources. The data is used to make decisions and to gain insights into their operations. Therefore the data is organized to facilitate querying, reporting, and analysis and is optimized for performance and scalability.

History of Data Warehousing

In the 1980s, there was an increase in the need for analyzing large volumes of data for business purposes. So to solve this issue, data warehousing emerged while its concept was formalized in the early 1990s. Since then, it has become a critical component in modern business.

How is the data warehouse architected?

Data warehousing comprises three main components that provide a comprehensive view of an organization's data: source system, data storage layer, and user interface layer.

Source System: The source system generates or captures data like transactional systems, log files, or other databases. Data originated in the source system. From these systems, data is extracted, transformed, and loaded into the data storage layer, which includes a staging area, a data integration layer, and a data mart or data warehouse layer. Therefore data from these sources is extracted using various ETL (extract, transform, load) tools and methods.

 

Data storage layer: Data is stored here after it has been extracted from the source system. It comprises three parts: staging area, data integration layer, and data mart or data warehouse layer. 

  • The staging area is where raw data from the source system is temporarily stored before transforming and loading into the data integration layer. It provides a buffer for ensuring that data is not corrupted or lost during the ETL process. Data cleansing is performed at the data integration layer, providing information about the data in the data warehouses, like lineage, definitions, and relationships. It ensures data quality and consistency. 
  • The data integration layer integrates data from different sources and resolves conflicts and duplicates. Business rules and calculations are applied to the data. The integrated and transformed data is stored in a Data mart, the data warehouse layer. It consists of multiple subject areas or data marts focused on a specific functional domain or business area. The data is stored in a structured manner that is optimized for analysis and querying.

 

User interface layer: This top layer of data warehouse architecture provides users access to the data warehouse. It includes security and access controls, ensuring that only users can access data they are authorized to view. The user interface layer has reporting tools, dashboards, and business intelligence applications. These allow users to query and analyze data in the data warehouse.

How does a data warehouse work?

The working of the Data Warehouse takes place in the following steps.

  • The data warehouse works by collecting data from various sources, like databases, data lakes, and other data repositories. This data is transformed and cleaned. These steps ensure accuracy and consistency.
  • The next step is to combine the data from various sources into a single dataset using ETL(extract, transform, load). The extracted data is then transformed into a common model and loaded into the data warehouse.
  • The structure of the data warehouse is designed by defining dimensions, hierarchies, and measures that are to be used to organize and analyze the data.
  • The data is stored in a data warehouse such that it is optimized for querying and analysis. After storing the data in a data warehouse, it can be queried and analyzed using tools such as OLAP cubes, data mining algorithms, and SQL queries.

Properties of Data Warehouse

Some of the properties of the Data Warehouse are mentioned below:

  • The data warehouse is used for integrating data from multiple sources and systems. It helps in creating a unified view of the business. Data can be analyzed from multiple sources, and insights can be gained about the relationships between different parts of the organization.
  • A Data warehouse makes accessing and analyzing relevant data to their particular interest areas easier for users. Hence it is subject-oriented, which means it is organized around the specific subject area like inventory, sales, or customer data.
  • The data warehouse contains data that cannot be modified or updated once stored in the data warehouse. Therefore it is designed to be read only. This feature ensures that data is consistent and accurate over time, preventing accidental or deliberate changes.
  • The data in the data warehouse is structured in such a way that it is easier to query and analyze. The system is optimized for fast query performance.
  • Data warehouse enables time-based analysis as it stores historical data, for example, forecasting and trend analysis.

Benefits of Data Warehouse

Data warehousing has various benefits. Some of the benefits are mentioned below:

  • Data warehousing proves to be a cost-effective solution by centralizing data storage and reducing the need for multiple data marts.
  • Data warehousing is easily scaleable as data volumes grow. It is designed to handle large volumes of data.
  • As data warehousing provides such a comprehensive view of the data stored, it enables an organization to make efficient decisions.
  • Data warehousing supports easy access to historical data, trend analysis, and forecasting.
  • Data warehousing interacts with the data from multiple sources by cleansing and transforming it as part of ETL(extract, transform, load). Hence, it helps ensure the data is accurate, reliable, and consistent.

Why learn Data Warehousing?

As mentioned above, we have discussed several benefits and properties of data warehousing. All these properties make it an essential technology in today’s modern world, which is used in multiple organizations. Data warehousing is a foundational technology in analytics and business intelligence. Data warehousing skills are also in high demand, as we need highly skilled professionals in this area. This proves that data warehousing has a lot of scopes, and many opportunities are available for career advancement to help individuals develop data analysis, management, and integration skills. There will be a lot of growth for one’s who specialize in data warehousing.

Architecture

There are mainly three types of data warehouse architectures: single-tier, two-tier, and three-tier.

Single-tier architecture: Single-tier architecture is straightforward. It includes the data storage and management system, user interface or reporting tools, and ETL processes. In this type of architecture, all the components of the data warehouse system are located on a single server or machine. Single-server architecture can be limiting in terms of performance and scalability.

Two-tier architecture: ETL processes, data storage, and management system are separated by two-tier architecture from the user interface. Due to this, there is better scalability and performance than two-tier architecture, as storage and processing can be spread across multiple machines. The two-tier architecture is more complex in setting up and managing.

Three-tier architecture: This architecture provides excellent flexibility, performance, and scalability. In a three-tier architecture, the data warehouse system is divided into three layers or tiers: the ETL layer, the data storage, the management layer, and the user interface or reporting layer. Each layer can be optimized for its specific function, and processing can be distributed across multiple machines. They are located on a separate server or machine. They communicate with other layers through standardized interfaces.

Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job
Bootcamp

Designs of the Data Warehouse

The two main design approaches for building a data warehouse: are top-down and bottom-up:

Top-down design: A data warehouse is built in the top-down approach, starting with an overall view of the organization’s data needs and business processes. The critical business processes and data elements are identified, then the data model is built, followed by the ETL processes. This approach is widely used in large organizations with more complex data sets and multiple data resources. It involves a high level of learning and strategy, as the data warehouse is designed to meet the overall need of an organization. A conceptual data model is created and refined based on input from various stakeholders. After building a conceptual model, a physical data model is created, and ETL processes are developed to load the data model into data warehouses.

Bottom-up design: The bottom-up approach's primary focus is identifying the data sources and then building the data warehouse around those sources by developing the ETL processes to load that data into data warehouses. It is more of a tactical approach. Therefore it is built starting with individual data sources and then combining them into a more extensive data model. The bottom-up design approach is primarily used in smaller organizations with more specific data sets and fewer data sources. This approach can address specific business needs or data issues more specifically.

Therefore top-down and bottom-up approaches are used widely in industries and organizations according to their business needs and data challenges.

Approaches that combine both top-down and bottom-up approaches are known are hybrid approaches. They are also used in many organizations, which provide a more balanced and practical approach to data warehousing.

Data Warehouse Schemas

Definition

DefinitionLogical structures that organize and represent data in the data warehouse are known as data warehouse schemas. It is a collection of database objects, including tables and relationships, and it defines how the data is stored and accessed in a database system. They organize data into logical groupings, reflecting the business's needs. There are mainly five types of data warehouse schemas, i.e., star schema, snowflake schema, Hybrid schema, third standard form schema, and fast constellation schema. Each schema comes with its weaknesses and strengths. They are used in different situations according to the data characteristics and business needs.

Types

Some of the different types of data warehouse schemas are listed below:

Star Schema

Data is organized around a central fact table in tar schema using one or more dimension tables, which provide additional context for the fats. Each business is interested in analyzing measures and metrics related to sales revenue or customer counts. These metrics are contained in fact tables. On the other hand, the dimension table contains attributes that describe the content of those measures, such as product, time, or location.

Some of the advantages of star schema are listed below:

  • They are easy to understand.
  • They are easier to maintain and modify.
  • Data redundancy is reduced due to the denormalized structure of star schema.
  • Queries can be executed faster.
     

Some of the disadvantages of star schema are:

  • If we need to add new attributes to the schema, they can prove to be inflexible.
  • They may require a significant amount of redesign and restructuring.
  • Not suitable for complex relationships or hierarchies between dimensions.


Snowflake Schema

Snowflake schema has additional normalization of dimension tables. They are similar to star schema. This results in a complex structure. They are usually used in OLAP data warehouses, data marts, and relational databases. It is an extension of the star schema. Dimension tables are broken down into subdimensions.

Advantages of snowflake schema:

  • By using the snowflake schema, storage space can be saved.
  • They can also help in reducing data redundancy.
  • Snowflake schema is more flexible than star schema.
  • This type of schema performs better in complex queries involving multiple aggregation levels.

 

Disadvantages of snowflake schema:

  • Snowflake schemas are more challenging to understand than other schemas mentioned above.
  • The maintenance and modification of snowflake schema are complex.
  • Multiple joins may be required to access the data, resulting in slower query performance.


Fact Constellation Schema

Fact constellation schema contains multiple fact tables and shared dimensions tables. These are also known as galaxy schema. As fat tables are related to each other through shared dimension tables, they provide a more complex and interconnected schema structure.

Advantages of fact constellation schema:

  • Fact constellation schema performs better than other schemas in the case of complex queries involving multiple fact tables and dimensions.
  • They are adaptable to changing business needs or data requirements.
     

Disadvantages of fact constellation schema:

  • They are more complex and challenging to understand.
  • They may require more storage space than other schemas due to additional tables and relationships.


Hybrid Schema

It combines different schema types, star and snowflake schemas. They are usually used when a single schema type only meets some business requirements or the data characteristics are complex.

Advantages of Hybrid schema:

  • They are more flexible and adaptable to situations.
  • In the case of different query types, they provide optimized performance.
  • By combining different schema types, data redundancy can be reduced.

 

Disadvantages of Hybrid schema:

  • They are challenging to understand.
  • The maintenance of hybrid schema is also complex.


Third Normal Form Schema

It is a highly normalized schema that eliminates data redundancy and improves data consistency. The data is organized into multiple tables. Each table contains a unique set of attributes.

Advantages of Third Normal form schema:

  • They reduce data redundancy by organizing it into smaller, more normalized tables.
  • In the case of write-sensitive workloads, this schema type is known to perform better.
  • They also provide high consistency and data integrity.
  • They are suitable for critical or sensitive data.
     

Disadvantages of Third Normal form schema:

  • They are less flexible in comparison to other schemas.
  • They are not suitable for all data analytical scenarios.
  • They result in slower and more complex queries.

Data Warehouse Implementation

Data Mart

A Data mart is designed to serve a specific business function or department. It is a subset of a data warehouse containing a focused data set optimized for querying and analysis by business users. These are the repositories that help organizations manage their data.

Types of Data Marts

There are mainly two types of data mart: dependent and independent.

  • A dependent data mart is created by extracting data from a centralized data warehouse. A dependent data mart is updated regularly to reflect changes made in the data warehouse.
  • An Independent data mart is created directly by extracting data from the operating systems. It is used to support a specific department or function.
  • Hybrid data mart allows us to combine input from sources other than a data warehouse.

 

Advantages

  • They improve scalability and performance by reducing the load on the central database.
  • They provide a more straightforward implementation.
  • Data marts provide a more focused and efficient way of accessing data.
  • We can access data and gain insights using data marts in a faster way.

 

Disadvantages

  • If data marts are not correctly integrated with the central data warehouse, they can result in data redundancy and inconsistencies.
  • They can create data silos and lead to inconsistent reporting if not adequately managed.
  • For maintaining multiple data marts, we may require additional resources. Therefore there is an increase in the complexity of the overall data architecture.

ETL & ELT

The main task of ETL and ELT is to transfer data from one place to another.ETL and ETL are the two integration methods. They extract, transform, and load data from various sources into the target data warehouse or data mart.

ETL: ETL stands for Extract, transform, and Load. ETL is the process of extracting data from various sources, transforming it into a format suitable for analysis, and loading it into a target data warehouse or data mart.

Approach: In ETL the data is extracted from the source systems and transformed into a consistent format suvh that it meets the requirements of the target system.It involves a separate transformation layer,that is used to clean, merge, aggregate, or manipulate data before loading it into the data warehouse.


ELT: ELT stands for Extract, Load, and transform. In ELT, data is extracted from the source systems and loaded directly into the target data warehouse or data mart.

Approach: In the ELT approach, transformation is typically one within the target system. The data is extracted from the data source and loaded directly into the target system, usually a data lake or data warehouse. After loading the data, it is transformed and processed within the target system. The data is transformed and processed using tools and techniques like SQL queries, data pipelines, or distributed processing frameworks.

 

Difference between ETL and ELT

The differences between ETL and ELT are as follows.

  • The main difference between ETL and ELT is the order in which data is processed. In ETL, data is transformed before being loaded into the target system, while in ETL, data is loaded first and then transformed.
  • ETL is usually used. We need to transform data significantly before loading it into the target system.
  • ELT is used when data can be loaded directly into the target system with minimal data transformation requirements.
  • ELT allows for greater scalability as data transformation is performed within the target system.ETL requires significant computing power and storage space for transforming data before loading it into the target system.

OLAP and OLTP

OLAP stands for online analytical processing, a technology that is used to analyze large volumes of data from different perspectives quickly and interactively. It is usually stored in a multi-dimensional database called a cube. They are designed for decision-making and are used for data analysis, forecasting, and budgeting.

Operations:

OLTP is a technology used to manage and process high volumes of real-time transactions. Its operations include inserting, deleting, and selecting.OLTP data is typically stored in a relational database. They are designed for transaction processing and are used for order processing, banking transaction, and inventory management.

The main operations of OLAP include data mining, data analysis, data consolidation, drill-down and roll-up, and slice and dice. On the other hand, the main operations of  OLTP include data input, validation, storage, transaction processing, and concurrency control.

Difference between OLAP and OLTP

The differences between OLAP and OLTP are as follows.

  • OLAP is used for data analysis, forecasting, and budgeting and stores data in the multi-dimensional cube, while OLTP is used for transaction processing and storing data in relational databases.
  • OLAP makes use of a data warehouse, whereas  OLTP makes use of a standard database management system (DBMS).
  • OLAP is subject-oriented and is used for data mining, analysis, decision-making, etc., while OLTP is application-oriented and used for business tasks.
  • OLAP can store large amounts of data, usually in TB, or PB, while OLTP’s data size is comparatively small.
  • OLAP is designed for decision-making analysis. On the other hand, OLTP is designed for transaction processing.
  • OLAP operations include slice-and-dice,drill-down, roll-up, and pivoting, while OLTP operations include insert, update, select, and delete.
  • OLAP improves the efficiency of business analysis, while OLTP enhances the user's productivity.

Metadata

Metadata is an essential aspect of data management. It provides information about data stored in a data warehouse or other repository. 

Definition

Metadata refers to the data that provides information about other data. In context to data warehousing, it includes information about the data warehouse’s structure and relationships between different data elements and the meaning of the data. It s an essential component of data warehousing, as it helps users understand and use the data effectively by providing information about the structure, meaning, and context of data. Metadata can improve data quality, enable better decision-making and increase productivity.

Types of Metadata:

There are various types of metadata, some of which are listed below:

Descriptive metadata: descriptive metadata includes information about the content and context of the data, such as data, subject, title, and author. It helps user access, discover, and understand the data.

Technical metadata: Technical metadata includes information about the structure, format, encoding, data type, field length, storage of data, and other technical specifications. It ensures that the data is properly processed, transformed, and stored.

Administrative metadata: administrative metadata includes information about the data's rights, ownership, and access permissions. It ensures that the data is properly managed, secured, and controlled.

Use metadata: It provides information about data usage and analysis, data lineage transformation rules, and quality measures. It helps users to understand how the data has been transformed and processed.

Structural metadata: It provides information about the relationship between different elements of the data, like tables, fields, and records. Structural metadata includes details about keys, schemas, relationships, and constraints.

Advantages:

  • Metadata helps in improving data quality.
  • It helps to ensure that the data is accurate, complete, and consistent by providing information about data quality rules, transformation, and lineage.
  • Metadata helps in better decision-making.
  • It provides context and insights into the data.


Disadvantages:

  • Metadata must be protected from unauthorized access as it contains sensitive information such as data lineage and sources.
  • Managing metadata can prove to be complex in the case of large and complex data environments.
  • Metadata requires specialized knowledge and tools to manage it effectively.
  • The process of metadata creation can prove to be time-consuming, especially for large datasets.

Characteristics of Data Warehouse

Some of the characteristics of data warehouses are listed below:

  • Data warehouses are subject-oriented.
  • Data warehouses can integrate data from multiple sources.
  • The data is standardized and consistent across all sources.
  • Data warehouses store historical data. This enables users to analyze trends and patterns over time.
  • Data warehouses are non-volatile, meaning the data is not updated or deleted once loaded into the warehouse.
  • They are designed for handling large data volumes in TB or PB.
  • Data warehouses are designed for ease of use, which means they are user-friendly, with intuitive interfaces.

Data Warehouse Security

Data Warehouse security involves various tools, techniques, and processes. Data warehouse security protects sensitive information stored in a data warehouse from unauthorized access, theft, and misuse.

Importance of data warehouse:

  • As a data warehouse contains sensitive information, it is essential to protect the data from theft, misuse, or unauthorized access.
  • Security measures must be designed to ensure that the data is not corrupted and altered.
  • Data breaches can result in financial losses, reputational damage, and legal liabilities. Therefore it is important to implement strong security measures.


Access Control: Access control involves setting up user accounts, roles, and permissions to limit access to sensitive data. Access control helps in ensuring that only authorized users can access the data warehouse and perform authorized actions on the data. Therefore, it basically allows access to sensitive information only to authorized users and implies restriction to unauthorized persons.

Firewall: A firewall is a barrier between the internal network and the internet to prevent malicious attacks and unauthorized access. It is a network security device: firewall monitors and filters incoming and outgoing network traffic to prevent unauthorized access to the data warehouse.

Encryption: Encryption involves using an encryption algorithm to scramble the data and a decryption key to unscramble it. It is a technique to transform the data warehouse data into a code or cipher to protect it from unauthorized access.

VPN: VPN stands for virtual private network. It is a secure communication tunnel that enables remote users to access the data warehouse securely over the internet. It also helps ensure remote users can securely access the data warehouse anywhere without compromising security.VPN encrypts the traffic between the remote user and the data warehouse.

Advantages of data warehouse

Some of the advantages of a data warehouse are mentioned below:

  • Data warehouse facilitates data analysis and reporting.
  • It provides a historical perspective of the data.
  • It helps in enhancing business intelligence capabilities.
  • Data Warehouse increases operational efficiency and productivity.
  • It also improves data quality and consistency.

Disadvantages of data warehouse

Some of the disadvantages of a data warehouse are mentioned below:

  • Data warehouses require high maintenance.
  • They may not support real-time data processing.
  • It may take time to integrate with legacy systems.
  • It requires specialized skills and expertise.

Limitations of data warehouse

Some of the limitations of a data warehouse are mentioned below:

  • They require significant storage capacity.
  • Data warehouses require significant investment in software and hardware.
  • Data warehouses are limited to structured data only. They accept the structured data from various resources.
  • They may be complex to maintain.

Applications of data warehouse

Every industry needs a data warehouse to connect disparate sources for business intelligence, analysis, reporting, and facilitating robust decision-making. Data warehouses have the following applications:

  • It is widely used in supply chain management.
  • There is a wide usage of Data warehouses in human resource analysis.
  • Used in sales, reporting, and marketing analysis.
  • It is also applied in sales and marketing analysis.

Career in data warehousing

There has been tremendous growth in data in the past few years. Therefore the need to organize this data so as to extract valuable information has led to an increase in demand for this skill. Opportunities related to data warehousing in the market are endless. It's like creating a data warehouse from different sources that may be structured or unstructured.

For building a career in data warehousing, it is recommended to have experience in SQL server coding and SQL server administration. 

Good knowledge of server integration and knowledge of ETL tools is also required. Also, one needs to understand dimensional data, Tableau, or any other analytics platform. Usually, a mid-career Data Warehouse developer with 4-9 years of experience earns an average of 10 Lakhs per year. The salary of an ETL developer in India ranges between 3.2 lakhs to 10.5 lakhs, with an average annual salary of 5.8 lakhs. The national average salary for a data warehouse engineer is approx 10 Lakhs in India. The average salary of a database manager in India is approx 11.3 Lakhs per year. Some of the top-paying Companies that employ Database managers are Cognizant and TCS.

Frequently Asked Questions

What is data warehouse with example?

The data warehouse is used for storing large volumes of data from various sources in a structured manner. It is a centralized repository designed to support business intelligence and analytics activities. For example, a financial institution uses a data warehouse to store transactional data for its customers.

Write the main 5 components of the Data Warehouse.

The main 5 components of a data warehouse are the source system interface, ETL(extract, transform, interface) process, data storage, metadata management, query, and reporting tools.

Which warehouse schema is most preferred?

The choice of warehouse schema depends on each organization's specific needs and requirements. The star schema is the most commonly used warehouse schema as they are easy to understand,  maintain and modify.

Is SQL a data warehouse?

SQL is a programming language used for managing and manipulating data stored in databases, including data warehouses. Therefore it is not a data warehouse. The data warehouse is used for storing large volumes of data from various sources in a structured manner. It is a centralized repository designed to support business intelligence and analytics activities.

Conclusion

In this article, we have discussed about what is Data Warehouse, its architecture, design implementation, security, advantages and disadvantages, and many more. We have learned that Data warehousing involves process collection, storing, and analyzing large data volumes to support business decision-making. We have covered the basics of data warehousing and went in-depth about its subtopics.

Next article
Characteristics of Data Warehouse
Guided path
Free
gridgp-icon
Data Mining and Warehousing First Naukri
7 chapters
63+ Problems
gp-badge
Earn badges and level up
Live masterclass