Big data means data so large, fast or varied that one ordinary computer and one ordinary database cannot handle it. This topic introduces three technologies used for it.

The three Vs

  • Volume: very large amounts, terabytes and beyond.
  • Velocity: data arrives quickly, such as sensor and click streams.
  • Variety: structured tables, text, images, logs and JSON.

Hadoop

Hadoop is an open-source framework that stores and processes data on a cluster of ordinary machines.

  • HDFS (Hadoop Distributed File System): splits big files into blocks and stores copies on several machines, so a machine failure loses no data.
  • MapReduce: a processing model. The map step works on blocks in parallel; the reduce step combines the results.
  • YARN: shares cluster resources among jobs.

Word count idea: map turns every word into (word, 1); reduce adds the numbers for each word.

Hadoop suits large batch analysis, not quick single-row lookups.

MongoDB in big data

MongoDB stores JSON documents and scales out with sharding (splitting data across servers) and replication (copies for safety and reads). It suits applications that need flexible, fast reads and writes of document-shaped data.

Cassandra

Cassandra is a column-family database with no single master: every node is equal. Data is spread over nodes using a hash of the key and copied to several of them. It gives high availability and very high write speed, which suits logs, messaging and time-series data. It follows the BASE style and offers tunable consistency.

Comparison

Technology Type Strength Typical use
Hadoop Distributed storage and batch processing Huge-scale analysis Log analysis, data lakes
MongoDB Document database Flexible data, easy development Catalogues, apps
Cassandra Column-family database Always available, fast writes IoT, messaging, time series

Common mistakes

  • Calling Hadoop a database. It is a file system and a processing framework.
  • Using a big data tool for data that fits comfortably in one MySQL server.

Practice questions

  1. What are the three Vs of big data?
  2. Explain HDFS and MapReduce.
  3. What is sharding?
  4. Why is Cassandra said to have no single point of failure?
  5. Compare Hadoop and MongoDB in two points.

Answers to the practice questions

  1. Volume, velocity and variety.
  2. HDFS stores blocks of files with copies across machines; MapReduce processes them with parallel map and combining reduce steps.
  3. Splitting a database across several servers.
  4. Every node is equal and data is copied to several nodes, so no one node is critical.
  5. Hadoop is a file system with batch processing; MongoDB is a document database for fast access to individual documents.

Sources

  • Official BCA syllabus Database Management Systems, course code CC202, Unit IV
  • Raghu Ramakrishnan and Johannes Gehrke, Database Management Systems, 3rd edition, McGraw-Hill