Row-Based Storage Vs Column-Based Storage - A Beginner's Guide - by Santosh Beora - Medium
Row-Based Storage Vs Column-Based Storage - A Beginner's Guide - by Santosh Beora - Medium
Introduction
When it comes to storing and managing data, two primary storage
formats are commonly used: row-based storage and column-based
storage. Understanding the differences between these formats can help
you make better decisions when designing databases or data warehouses.
Let’s dive into these storage formats, their advantages and disadvantages,
and real-life examples to make these concepts clear.
- CustomerID: [1, 2, 3]
This structure allows the system to access only the relevant columns
needed for a query.
The company uses a relational database like MySQL to manage its daily
transactions. This database stores data about customers, orders, and
inventory in a row-based format. Each transaction, such as adding a new
order or updating customer details, requires accessing complete records,
making row-based storage ideal.
Example Query : “Add a new order for customer ID 1 with product ID 123.”
Example Query : “Calculate the total sales for the last quarter by country.”
Performance : Fast because only the relevant columns (sales amount and
country) are read and aggregated.
Comparison:
1. Data Organization :
3. Query Performance :
4. Storage Efficiency :
Conclusion:
Note
If this article helped you gain some knowledge, please clap and comment.
Don’t forget to follow me on Medium and on LinkedIn. Your support
helps me create more content like this and keeps us connected in the
data engineering community. Thank you!
81 Followers
A GCP Data Engineer sharing cutting-edge data insights.For the latest in data
engineering! Follow me on LinkedIn : https://www.linkedin.com/in/santosh-beora/
Pritam Deb in Towards Data Engineering Nidhi Jain 👩💻 in Code Like A Girl
Lists