Big Data Engineering

Chapter 5
Distributed Storage and Data Modeling

Post Graduate Program in Information Technology
Big Data Engineering   •   Post Graduate

Distributed Storage and Data Modeling

Introduction and Context

Big data engineering is fundamentally concerned with storing, organizing, and retrieving data whose volume, velocity, variety, or reliability requirements exceed the practical limits of a single server. Distributed storage divides data across multiple machines, while data modeling determines how that data is represented, partitioned, indexed, queried, governed, and evolved.

These concerns are inseparable. A logically elegant model may perform poorly if its records are concentrated on one partition. Conversely, a highly scalable storage design may be difficult to govern if it sacrifices data quality and semantic clarity. The professional engineer must therefore evaluate storage technologies and models together, considering workload, consistency, availability, cost, security, and lifecycle requirements.

Learning Objectives

By the end of this chapter, learners should be able to:

  1. Compare distributed file systems, object stores, relational databases, NoSQL systems, and NewSQL platforms.
  2. Explain replication, partitioning, sharding, consistency, durability, and locality.
  3. Select partition keys, indexes, and denormalized structures for analytical and operational workloads.
  4. Apply dimensional modeling to warehouse and lakehouse environments.
  5. Compare open table formats and serialization formats.
  6. Evaluate storage designs using performance, reliability, governance, and cost criteria.

1. Distributed Storage Foundations

1.1 Distributed storage

A distributed storage system stores data across multiple networked nodes while presenting either a unified namespace or a unified access interface. Distribution provides scale-out capacity, parallel processing, and resilience against node failure. It also introduces network latency, coordination overhead, partial failure, data-placement complexity, and consistency trade-offs.

Important properties include:

  • Scalability: the ability to increase capacity or throughput by adding resources.
  • Availability: the probability that the service is accessible when requested.
  • Durability: the probability that committed data will not be lost over a stated period.
  • Consistency: the degree to which reads observe the effects of writes.
  • Elasticity: the ability to add or remove resources as workload changes.
  • Locality: placing computation near the data to reduce network transfer.

Replication improves fault tolerance by maintaining multiple copies. If a dataset has size S bytes, replication factor r, and metadata or encoding overhead h, where h is expressed as a fraction, an approximate raw storage requirement is:

C ≈ S × r × (1 + h)

This estimate assumes full replication and uniform overhead. For example, 20 TB replicated three times with 8% overhead requires approximately 20 × 3 × 1.08 = 64.8 TB. Erasure coding may reduce storage overhead, but reconstruction and small-write performance can be more complex.

1.2 Distributed file systems

A distributed file system usually provides files, directories, permissions, and sequential or streaming access across a cluster. HDFS is a prominent example. Files are divided into large blocks and distributed among data nodes; metadata is managed by a name service. Replication protects against node failure, while data-local processing reduces network traffic.

Distributed file systems are suitable for large immutable or append-heavy datasets processed by batch engines. They are less suitable for millions of small files, low-latency point lookups, or direct browser-style object access. Small files create excessive metadata and scheduling overhead.

1.3 Object stores

Object stores such as Amazon S3, Google Cloud Storage, and Azure Blob Storage organize data as objects in buckets or containers. Each object contains data, metadata, and a key. Object stores generally offer very high durability, virtually unlimited namespace scale, and independent compute-storage scaling.

Object stores are foundational for data lakes and lakehouses. They work well with columnar files such as Parquet and ORC, but they are not traditional POSIX file systems. Operations such as rename, directory listing, and atomic multi-object update may have different semantics or costs. Table formats add transaction logs and metadata layers to address these limitations.

1.4 Storage comparison

TechnologyPrimary abstractionStrengthsTypical limitationsAppropriate workloads
Distributed file systemFile and directoryData locality, batch throughputSmall-file and operational complexityCluster analytics
Object storeObject and keyDurability, elasticity, low-cost capacityHigher latency, non-POSIX semanticsData lakes, archives
Relational databaseTables and transactionsSQL, integrity, joins, ACIDVertical scaling limits at extreme scaleOLTP, governed reporting
NoSQL databaseKey-value, document, wide-column, or graphFlexible schema, horizontal scaleLimited joins or transaction scopeHigh-scale operational workloads
NewSQL databaseDistributed relational tablesSQL and transactions with scale-outOperational complexity and costDistributed OLTP

2. Database Families and Consistency Choices

2.1 Relational databases

Relational systems represent data as relations, commonly implemented as tables. A schema defines attributes and types; primary keys identify rows; foreign keys express relationships. Normalization reduces duplication and update anomalies. ACID transactions provide atomicity, consistency, isolation, and durability.

Relational databases are especially appropriate when correctness depends on multi-row constraints, complex joins, or transactional workflows. Traditional systems often scale vertically, although distributed relational products also support partitioning and replication.

2.2 NoSQL systems

“NoSQL” describes several families rather than one design:

  • Key-value stores retrieve values by keys and support extremely fast simple access.
  • Document databases store JSON-like records with flexible nested structures.
  • Wide-column databases organize rows by partition keys and clustered columns, supporting large distributed datasets.
  • Graph databases represent entities and relationships explicitly, making traversal central to the query model.

NoSQL systems commonly begin with query patterns rather than entity normalization. A design may duplicate customer information in order to avoid a distributed join. This improves read performance but requires update strategies and governance for duplicated values.

2.3 NewSQL systems

NewSQL systems preserve relational schemas and SQL while distributing storage and transactions across nodes. They typically use consensus protocols, distributed timestamps, or transaction coordinators to provide strong consistency. They are useful when an organization requires SQL and relational integrity but cannot rely on a single-server database.

The trade-off is that cross-partition transactions require communication. Consequently, transaction design and partition-key selection remain important even when the database supports distributed ACID semantics.

2.4 CAP and consistency considerations

The CAP theorem concerns a distributed system facing a network partition. It states that a system cannot simultaneously guarantee strong consistency and availability for all requests during that partition. In practice, systems make more nuanced choices: consistency may vary by operation, replica, isolation level, or failure mode.

Engineers should distinguish:

  • Strong consistency: a read reflects the latest successfully committed write according to the system’s consistency model.
  • Eventual consistency: replicas may temporarily disagree but converge if updates stop.
  • Read-your-writes consistency: a client observes its own successful writes.
  • Causal consistency: causally related operations are observed in causal order.

The correct choice depends on business consequences. A product recommendation can tolerate stale data more readily than an account balance or authorization decision.

3. Partitioning and Sharding

3.1 Concepts

Partitioning divides a logical dataset into subsets called partitions. In a shared-nothing architecture, each partition may be stored and processed independently. Sharding commonly refers to horizontal partitioning across database nodes, although the terms are sometimes used interchangeably.

A good partition key distributes data and workload evenly, supports dominant queries, and limits the amount of data scanned. A poor key creates skew, hotspots, or expensive cross-partition operations.

3.2 Partitioning strategies

Hash partitioning applies a deterministic hash function to a key. If the hash output is mapped to n partitions, a simple mapping is:

p = hash(k) mod n

where k is the partition-key value, p is the partition number, and n is the number of partitions. This gives good distribution when key values are sufficiently diverse, but changing n can move many records unless consistent hashing or a virtual-partition layer is used.

Range partitioning assigns contiguous key intervals, such as dates or customer-number ranges. It supports range scans and time-based lifecycle management, but sequential keys can overload the newest partition.

List partitioning assigns explicitly defined groups, such as country or business unit. It is useful when groups have stable operational meaning, but group sizes may be uneven.

Composite partitioning combines methods, for example range partitioning by month followed by hash partitioning by account identifier.

3.3 Selecting a partition key

A practical evaluation asks:

  1. Does the key have high enough cardinality?
  2. Does it distribute storage and request volume evenly?
  3. Does it appear in common filters or joins?
  4. Will values arrive sequentially and create a hotspot?
  5. Will the key change during the record’s lifetime?
  6. Does it support retention, archival, or regulatory deletion?
  7. How will the design behave when the cluster grows?

Partition balance can be assessed using the largest-to-average partition-size ratio:

B = Smax ÷ Savg

where S_max is the largest partition and S_avg is the average partition size. A value near 1 indicates balance; a substantially larger value indicates skew. This is a diagnostic measure rather than a universal acceptance threshold.

3.4 Hotspots and skew

A hotspot occurs when a disproportionate share of requests or writes targets one partition. Common causes include current timestamps, popular product identifiers, celebrity accounts, or low-cardinality keys such as Boolean status. Mitigations include salting, hash-based subkeys, adaptive partitioning, write buffering, or separating hot and cold data.

Salting adds a controlled suffix to distribute writes, but reads must then query multiple salts and merge results. Therefore, salting is a workload-specific compromise rather than a free improvement.

4. Indexing, Denormalization, and Query-Aware Design

4.1 Indexes

An index is an auxiliary structure that accelerates retrieval by avoiding a full scan. B-tree indexes support equality and ordered-range predicates. Hash indexes are efficient for equality in systems that support them. Inverted indexes support text terms. Bitmap indexes can be effective for low-cardinality analytical columns, subject to implementation and update patterns. Spatial and graph indexes serve specialized workloads.

Indexes consume storage and slow writes because each insert, update, or delete may require index maintenance. The useful question is not “which columns should be indexed?” but “which costly, frequent queries justify the maintenance cost?”

Selectivity is the fraction of rows matched by a predicate. If a predicate matches m rows out of N, then:

selectivity = m ÷ N

This definition is descriptive; whether an index helps depends on the optimizer, clustering, caching, table size, and access path. High-selectivity predicates often benefit from indexes, while an index on a low-selectivity column may not.

Composite indexes require attention to column order. An index on (customer_id, order_date) generally supports searches beginning with customer_id and can support ordered retrieval by order_date within a customer. It may not efficiently support a query filtering only on order_date.

4.2 Normalization and denormalization

Normalization organizes facts to reduce redundancy and update anomalies. A normalized transactional design might store customers, orders, and products in separate tables linked by keys. Denormalization intentionally duplicates or precomputes information to reduce joins and improve read latency.

Denormalization is justified when:

  • the read path is dominant and well understood;
  • joins are expensive or unavailable across partitions;
  • duplicated attributes change infrequently;
  • a pipeline can reliably propagate updates;
  • storage cost is lower than repeated computation.

Its risks include stale copies, larger storage, complex updates, and inconsistent semantics. A denormalized design should identify the authoritative source, refresh mechanism, expected staleness, and reconciliation process.

4.3 Materialized views and pre-aggregation

A materialized view stores the result of a query or aggregation. It can reduce response time for recurring reports, but freshness and invalidation must be managed. Pre-aggregated tables are especially useful for dashboards with fixed grains, such as daily sales by store and product category.

5. Dimensional Modeling for Analytics

Dimensional modeling organizes analytical data around measurable business events. A fact table records events at a defined grain and contains numeric measures and foreign keys to dimensions. A dimension table describes business entities such as customer, product, location, and date.

The most important modeling decision is the grain statement: for example, “one row per product per order line.” Measures must be compatible with that grain. Additive measures can be summed across all dimensions; semi-additive measures can be summed across some dimensions but not time; non-additive measures, such as ratios, should generally be recalculated from additive components.

A star schema has one fact table connected directly to denormalized dimensions. A snowflake schema normalizes some dimensions into additional tables. Star schemas often simplify queries and improve usability, while snowflake designs may reduce redundancy.

Slowly changing dimensions

A Type 1 dimension overwrites an old attribute and preserves no history. A Type 2 dimension creates a new versioned row with effective dates or a current-record indicator. Type 2 is appropriate when historical reports must reflect the attribute that was valid at the time of the event.

For example, if a customer moves from Region A to Region B, a Type 2 dimension retains both versions. The fact row references the dimension surrogate key valid when the transaction occurred.

6. Serialization and Open Table Formats

6.1 Serialization formats

Serialization converts structured data into bytes for storage or transmission. Selection should consider schema evolution, compression, interoperability, encoding and decoding cost, and access pattern.

FormatStructureTypical strengthsTypical limitations
JSONText, hierarchicalHuman-readable, flexible, broad toolingVerbose and slower for analytics
AvroRow-oriented binary with schemaStreaming, schema evolution, interoperabilityLess efficient for column-selective scans
ParquetColumnar binaryCompression, predicate and column pruningMore complex for individual mutable records
ORCColumnar binaryAnalytical compression and statisticsEcosystem fit must be checked
ProtobufCompact schema-based binaryEfficient service communicationLess directly queryable as a lake file

Columnar formats store values from the same column together. This improves compression and allows an analytical engine to read only required columns. Predicate pushdown uses file or row-group statistics to skip data that cannot satisfy a filter.

6.2 Open table formats

An open table format adds table-level metadata, snapshots, schema evolution, partition specifications, and transaction or concurrency mechanisms over files in object storage. Apache Iceberg, Delta Lake, and Apache Hudi are widely used examples, with different implementation histories and feature details.

Common capabilities include:

  • atomic or coordinated commits;
  • snapshot-based reads;
  • time travel or historical querying;
  • schema evolution;
  • partition evolution or metadata-managed partitioning;
  • compaction and small-file management;
  • change-data-capture or incremental processing in some systems.

A table format does not eliminate the need for sound file sizing, partition design, access control, catalog governance, and lifecycle management. Metadata accumulation and excessive small files can degrade performance.

7. A Design Framework

A defensible storage design follows the workload rather than technology fashion.

  1. Classify workloads: OLTP, batch analytics, interactive BI, streaming, search, graph traversal, or archival.
  2. Define service objectives: latency percentiles, throughput, freshness, availability, recovery point objective, and recovery time objective.
  3. Define data semantics: entities, event grain, relationships, retention, legal basis, and ownership.
  4. Choose the storage abstraction: file, object, table, key-value, document, relational, or graph.
  5. Design partitions and physical layout: select keys, estimate skew, plan growth, and test failure behavior.
  6. Select serialization and table formats: consider interoperability and evolution.
  7. Add indexes, views, and denormalization only for measured access paths.
  8. Test representative workloads: include skew, concurrent users, backfills, node loss, schema changes, and recovery.
  9. Operate and govern: monitor cost, freshness, quality, security, lineage, and metadata.

A simple capacity estimate for data generated at rate R bytes per second over T seconds, with replication factor r and overhead h, is:

C ≈ R × T × r × (1 + h)

R must be expressed in bytes per second and T in seconds. The estimate excludes compression unless R is measured after compression. Retention, compaction, temporary files, indexes, backups, and growth headroom should be added in a production capacity plan.

8. Illustrative Case: A Retail Lakehouse and Order Platform

Background

A national retailer receives point-of-sale events, online orders, inventory updates, clickstream events, and supplier files. Its legacy architecture contains a relational order database and a nightly warehouse load. Reports are slow during promotions, and analysts maintain inconsistent copies of sales data.

Problem

The retailer needs sub-second order lookups, reliable order transactions, near-real-time inventory visibility, and large-scale historical analysis. It must retain selected sales records for seven years and support privacy-related deletion requests.

Analysis

The order workflow requires transactional integrity for payment, order status, and inventory reservation. A distributed analytical store is not an automatic replacement for the operational database. Historical analysis requires scalable object storage, columnar files, governed schemas, and reproducible snapshots. Product and customer attributes change over time, so historical reporting requires explicit dimension semantics.

Approach

The retailer retains a relational or NewSQL order service for transactional operations, partitioned by a stable order or customer-region strategy that avoids concentrating all current orders on one node. A key-value or document read model serves carefully defined, high-volume order-status lookups.

Events are written to an object-store lakehouse using an open table format. Raw events are retained in an immutable landing layer, while validated tables contain typed, deduplicated records. Parquet is selected for analytical tables; Avro is used for some event interchange because its schema is carried with the record stream. Sales facts use the grain “one row per order line.” A Type 2 product or customer dimension is used where historical attributes affect reporting.

Date-based partitioning supports retention and time-window queries, while an additional distribution strategy prevents a single promotion day or store from becoming a hotspot. Compaction controls small files. Data-quality checks validate uniqueness, accepted values, referential relationships, event-time plausibility, and reconciliation to financial totals.

Outcome

Operational and analytical workloads are separated, reducing contention. Analysts query governed fact and dimension tables rather than uncontrolled extracts. Historical reports reproduce the correct attribute versions, while current operational views remain optimized for point access. The architecture still requires monitoring of object-store costs, metadata growth, late events, privacy workflows, and cross-system reconciliation.

Learning points

  1. One storage technology rarely optimizes every workload.
  2. Grain, partition key, and access path must be designed together.
  3. Open formats improve interoperability but do not replace governance.
  4. Denormalized read models should have explicit ownership and freshness rules.
  5. Reliability includes recovery, reconciliation, and correct historical meaning—not merely uptime.

9. Governance, Security, and Ethical Considerations

Distributed storage increases the number of copies, services, identities, and locations that must be controlled. Security design should include encryption in transit and at rest, least-privilege access, key management, network isolation, audit logging, and secure deletion procedures.

Data minimization is important: retaining every available attribute indefinitely increases breach impact and may conflict with privacy obligations. Sensitive fields may require masking, tokenization, row-level security, column-level security, or separate restricted zones. Partitioning by a sensitive identifier must not accidentally expose information through paths, filenames, or metadata.

Governance should document ownership, definitions, lineage, retention, quality rules, permitted uses, and deletion behavior. Replicas, snapshots, caches, backups, and derived tables must be included in deletion and legal-hold procedures. Ethical engineering also requires assessing whether denormalized or historical datasets enable inappropriate profiling or discriminatory decisions.

10. Contemporary Developments and Limitations

Lakehouse architectures increasingly combine low-cost object storage with warehouse-like table management. Query engines are becoming more federated, allowing users to query multiple systems, but federation can produce unpredictable latency and inconsistent security semantics. Vector indexes and embedding stores are growing in importance for AI retrieval, yet their results require provenance, access control, and evaluation for bias and leakage.

Storage abstractions also continue to converge: relational systems adopt semi-structured types, NoSQL systems add transactions, and analytical platforms support increasingly real-time ingestion. Nevertheless, trade-offs remain. Distributed transactions incur coordination cost, flexible schemas can weaken quality controls, and automatic partitioning cannot compensate for poorly understood workload semantics.

Best Practices

  • Begin with workload and data-grain analysis, not product selection.
  • Use stable, high-cardinality partition keys and measure skew.
  • Separate operational, analytical, and archival access paths where necessary.
  • Prefer columnar formats for scan-heavy analytics and row-oriented formats for record-oriented exchange.
  • Treat schema evolution as a governed compatibility process.
  • Control small files through batching and compaction.
  • Design for late data, retries, duplicates, backfills, and replay.
  • Measure p95 or p99 latency, not only averages.
  • Test node loss, network partitions, corruption, restore, and deletion workflows.
  • Document authoritative sources for every denormalized attribute.
  • Monitor storage, compute, egress, metadata, and backup costs.

Chapter Summary

Distributed storage enables scale and resilience by distributing data across nodes, but it introduces network, coordination, consistency, and governance challenges. Distributed file systems provide file-oriented batch access, whereas object stores provide elastic durable storage for data lakes. Relational systems emphasize schemas, joins, and transactions; NoSQL systems optimize particular access patterns and horizontal scale; NewSQL systems combine relational semantics with distributed execution.

Partitioning and sharding determine data placement and strongly influence performance. Hash, range, list, and composite strategies each have appropriate uses. Partition-key quality depends on cardinality, balance, query alignment, growth, and hotspot risk. Indexes, materialized views, and denormalization should be justified by measured workloads and accompanied by freshness and ownership rules.

Dimensional modeling provides an analytical structure based on fact-table grain and descriptive dimensions. Serialization formats determine how records are encoded, while open table formats add transaction, snapshot, and schema-management capabilities to files in object storage. A professional design integrates technical performance with security, privacy, lineage, retention, recovery, and ethical use.

Key Terms

Distributed storage: Storage in which data is placed across multiple networked nodes.

Distributed file system: A file-oriented storage system that spans multiple machines.

Object store: A storage service that manages objects addressed by keys within buckets or containers.

Replication: Maintaining multiple copies of data for resilience or availability.

Durability: The likelihood that committed data remains preserved.

Partitioning: Dividing a logical dataset into physical subsets.

Sharding: Horizontal distribution of database data across nodes.

Hotspot: A partition receiving disproportionately high traffic or writes.

Skew: Uneven distribution of data or workload among partitions.

Consistency: The visibility and ordering guarantees provided for reads and writes.

NoSQL: A family of non-relational database models, including key-value and document systems.

NewSQL: Distributed relational technology that retains SQL and transactional semantics.

Index: An auxiliary access structure that accelerates retrieval.

Denormalization: Intentional duplication or precomputation to improve access performance.

Fact table: An analytical table containing events, measures, and dimensional keys.

Dimension table: A table containing descriptive business context.

Serialization: Encoding structured data into a byte representation.

Columnar format: A format that stores values by column rather than by complete row.

Open table format: A metadata and transaction layer managing files as a logical table.

Schema evolution: Controlled change to a data structure over time.

Review Questions

Short Answer Questions

  1. What are the principal differences between an object store and a distributed file system?
  2. Define a partition hotspot and identify two possible causes.
  3. Why can denormalization improve read performance?
  4. What is the grain of a fact table?
  5. State one strength and one limitation of columnar serialization.

Long Answer Questions

  1. Compare relational, NoSQL, and NewSQL technologies for a high-volume order-processing system.
  2. Explain hash, range, list, and composite partitioning, including a suitable use case for each.
  3. Discuss the relationship among normalization, denormalization, indexes, and materialized views.
  4. Explain dimensional modeling and distinguish additive, semi-additive, and non-additive measures.
  5. Evaluate the role of open table formats in object-store-based lakehouse architectures.

Analytical / Application Questions

  1. A dataset grows at 80 MB/s, is retained for 30 days, replicated twice, and has 15% overhead. Estimate its storage requirement, ignoring compression. State your unit conversions and assumptions.
  2. A time-partitioned event table receives most writes for the current hour, causing one partition to overload. Propose two alternative designs and discuss their read implications.
  3. Design a storage architecture for a financial service requiring strong transactional correctness, interactive dashboards, seven-year retention, historical customer attributes, and privacy deletion. Justify the database family, file format, table format, partitioning, and governance controls.

Multiple Choice Questions with Answers

Question 1

Which storage abstraction is most directly associated with buckets, keys, and objects?

A. Object store

B. Distributed file system

C. Relational database

D. Graph database

Correct Answer: A. Object store

Question 2

Using p = hash(k) mod n, what is the main purpose of hash partitioning?

A. To preserve chronological ordering

B. To distribute keys across partitions

C. To normalize relational tables

D. To encode records in binary

Correct Answer: B. To distribute keys across partitions

Question 3

Which condition most commonly creates a write hotspot?

A. A highly distributed random identifier

B. A sequential current-timestamp partition key

C. A columnar file format

D. A Type 2 dimension

Correct Answer: B. A sequential current-timestamp partition key

Question 4

A fact table has one row per order line. Which measure is generally additive across order lines?

A. Order-line quantity

B. Customer age

C. Current account balance

D. Average order value

Correct Answer: A. Order-line quantity

Question 5

Which format is generally best suited to analytical queries that read a small number of columns from very large files?

A. JSON

B. Avro

C. Parquet

D. Plain text

Correct Answer: C. Parquet

Question 6

What is the principal purpose of a Type 2 slowly changing dimension?

A. To overwrite all historical attributes

B. To preserve versions of changing attributes over time

C. To remove all dimension keys

D. To prevent analytical joins

Correct Answer: B. To preserve versions of changing attributes over time

Question 7

If a predicate matches 500 rows in a table containing 10,000 rows, its selectivity is:

A. 0.005

B. 0.05

C. 0.5

D. 5

Correct Answer: B. 0.05

Question 8

Which statement best describes NewSQL systems?

A. They provide only unstructured files

B. They combine distributed scale with relational and SQL capabilities

C. They cannot support transactions

D. They are exclusively graph databases

Correct Answer: B. They combine distributed scale with relational and SQL capabilities

Question 9

What is a major benefit of an open table format over unmanaged files in object storage?

A. It eliminates the need for partitioning

B. It adds capabilities such as snapshots, schema management, and coordinated commits

C. It guarantees zero storage cost

D. It makes all queries strongly consistent across unrelated systems

Correct Answer: B. It adds capabilities such as snapshots, schema management, and coordinated commits

Question 10

A dataset of 10 TB is replicated three times with 10% overhead. Approximately how much raw capacity is required?

A. 13 TB

B. 30 TB

C. 33 TB

D. 40 TB

Correct Answer: C. 33 TB

Big Data Engineering
Chapter 5 of 15