Big Data Analytics
Department: Computer Science & Engineering
Semester: VII
Course Code: 23CSPC402
Teaching Hrs/Week (L:T: P): 3:0:2
Total Hrs: 64(40+24)
CIE Marks: 50
SEE Marks: 50
Exam Hrs: 3
Credits: 4
Course Learning Objectives
This course is designed to:
Module 1: �Introduction to Big Data Analytics
Text book 1: 1.1,2.1 to 2.5, 2.10, 3.2, 3.5, 3.8, 3.12, 4.1, 4.2
1.1 Classification of Digital data
Structured Data
Semi-Structured Data
Unstructured Data
2.1 Characteristics of Data
2.2 Evolution of Big Data
2.3 Definition of Big Data
2.4 Challenges with Big Data
2.5 What is Big Data
2.5.1 Volume
2.5.2 Velocity
2.5.3 Variety
2.10 A Typical Data Warehouse Environment
3.2 Big Data Analytics
3.5 Classification of Analytics
3.8 Why is Big Data Analytics Important
3.12 Terminologies used in Big Data Environments
3.12.1 In-Memory Analytics
3.12.2 In-Database Processing
3.12.3 Symmetric Multiprocessor System(SMP)
3.12.4 Massively Parallel Processing
3.12.5 Difference Between Parallel and Distributed Systems
3.12.6 Shared Nothing Architecture
4.1 NoSQL (Not Only SQL)
4.1.1 Where is it Used?
4.1.2 What is it?
4.1.3 Types of NoSQL Databases
4.1.4 Why NoSQL?
4.1.5 Advantages of NoSQL
4.1.6 What We Miss With NoSQL?
4.1.7 Use of NoSQL in Industry
4.1.8 NoSQL Vendors
4.1.9 SQL versus NoSQL
4.1.10 NewSQL
4.1.11 Comparison of SQL, NoSQL, and NewSQL
4.2 Hadoop
4.2.1 Features of Hadoop
4.2.2 Key Advantages of Hadoop
4.2.3 Versions of Hadoop
4.2.4 Overview of Hadoop Ecosystems
4.2.5 Hadoop Distributions
4.2.6 Hadoop versus SQL
4.2.7 Integrated Hadoop Systems Offered by Leading Market Vendors
4.2.8 Cloud-Based Hadoop Solutions
What is Data
How Information is Extracted
Introduction��
1.1 Classification of Digital data
Introduction
1.1 Classification of Digital data.
Digital data is classified into three categories based on its organization:
Structured Data
Example: Customer table, From this structured data, we can easily determine:
Customer ID | Name | Address | Phone Number |
C101 | A | BANGALORE | 1234567891 |
C102 | B | MANGALORE | 2468123412 |
C103 | C | MUMBAI | 1357924861 |
Characteristics of structured data
Examples of structured data
Benefits of structured data
Challenges of Structured data
Sources of Structured Data
Ease of Working with Structured Data
Structured data provides the ease of working with respect to the following:
1. Insert / Update / Delete
The Data Manipulation Language (DML) operations provide the required ease with: Data input, Data storage, Data access, Data processing, Data analysis.
2. Security:
3. Indexing
4. Scalability
5. Transaction Processing: RDBMS supports ACID properties of transactions:
Un-Structured Data
Unstructured data is found in:
Examples of unstructured data
1. Human-generated: Many of the files people create every day include qualitative data and natural language that don't fit neatly into tables, including:
Example: In healthcare, a single patient visit might generate typed notes, a scanned form, and an audio dictation file and these three are different kinds of unstructured data.
2. Machine-generated
Systems and devices produce large volumes of unstructured output, such as:
Example: In manufacturing, one machine might produce short error codes and long diagnostic logs with different formats and too unpredictable for relational tables.
Example 1: Steps to Deal with Unstructured Data
Example: Image Data: Resize images, Remove noise, Image enhancement.
5. Data Analysis: After preprocessing, different analytical techniques are applied like
6. Machine Learning and Artificial Intelligence
Machine Learning algorithms help extract useful patterns from unstructured data.
Examples: Naive Bayes (Text Classification), Logistic Regression, Support Vector Machine (SVM).
7. Natural Language Processing (NLP): NLP enables computers to understand human language.
Applications: Chatbots, Language Translation
Example: Analyzing customer reviews to determine whether feedback is positive or negative.
8. Data Visualization: The processed information is presented through dashboards and reports.
Common tools: Power BI, Tableau, Grafana.
Example 2: Steps to Deal with Unstructured Data
Techniques Used to Find Patterns in or Interpret Unstructured Data
1. Data Mining: Deals with large data sets.
Popular Data Mining Algorithms
a) Association Rule Mining: Also called Market Basket Analysis, Affinity Analysis
Determines "What goes with what?"
Identifies products that are likely to be purchased together.
Example: If a customer buys bread, they may also buy eggs or cheese.
b) Regression Analysis:
c) Collaborative Filtering:
2. Text Analytics (Text Mining)
3. Natural Language Processing (NLP)
4. Noisy Text Analytics
5. Manual Tagging with Metadata
6. Part-of-Speech (POS) Tagging
7. Unstructured Information Management Architecture (UIMA)
Semi-structured data
Characteristics of semi-structured data
Examples: JSON, XML, Avro, Parquet, ORC, and data from web applications and IoT sensors
Sources of Semi-Structured Data
REST APIs, IoT devices and sensors, Mobile applications, Social media platforms, Cloud services, Web applications, Email systems, Web server logs.
Advantages
Limitations
Example 1: JSON
{
"StudentID": 101,
"Name": “Shivu",
"Department": "CSE",
"Skills": ["Java", "Python", "SQL"]
}
Organized using key-value pairs. Different students can have different fields. No fixed schema.
Example 2: XML
<Teacher>
<StudentID>101</StudentID>
<Name>Shivu</Name>
<Department>CSE</Department>
</Teacher>
Data is organized using tags. Easy to exchange data between applications.
Feature | Structured data | Unstructured data | Semi-structured data |
Schema | Fixed schema, predefined structure | No predefined schema; data lacks formal structure | Flexible schema, evolves dynamically |
Storage format | Tables with rows and columns | Files, media, text (for example, images, videos, PDFs, emails, audio files) | JSON, XML, Avro, Parquet, ORC |
Querying | Standard SQL-based querying | Difficult to query directly; requires advanced tools like NLP or AI | Requires specialized parsing tools: Apache Nifi, Apache Spark's DataFrame API, Kafka Connect |
Flexibility | Limited adaptability | Highly flexible (any format or form of content) | Highly flexible for evolving data sets |
Use cases | Business transactions, reporting | Social media analysis, video/audio analysis, document management | Web apps, IoT, social media, machine learning |
Scenario: Online Shopping System | |||
| Structured Data | Unstructured Data | Semi-Structured Data |
Schema | Customer table has predefined columns: Customer_ID, Name, Email, Phone | Customer reviews, product images, videos, etc. have no fixed table structure | JSON/XML data has some structure, but fields can vary |
Querying | Can easily use SQL: SELECT * FROM Customer | Cannot directly query like a normal SQL table; may require NLP/AI for reviews or image-processing tools for images | Can be processed using tools such as Spark, Kafka, or JSON parsers |
Use cases | Customer transactions, orders, billing and reports | Customer reviews, product images, videos, social-media posts | Web application data, IoT data, clickstream data |
Questions
2.1 CHARACTERISTICS OF DATA
2.1 CHARACTERISTICS OF DATA
1. Composition (Structure of Data): Composition tells us how the data is organized or made up.
It answers questions such as:
Example: A student database contains: Student ID, Name, Department, Marks.
Here, the composition describes the structure and organization of these fields.
2. Condition (State or Quality of Data): Condition tells us whether the data is ready for analysis or needs improvement.
It answers questions such as:
3. Context (Background of Data): Context explains the meaning and background of the data.
It answers questions such as:
2.2 Evolution of Big Data: The major stages are
2.3 Definition of Big Data
:Data Evolution:
As the volume, complexity, and diversity of data grew, traditional tools such as spreadsheets and conventional databases could no longer store or analyze it efficiently.
This need led to the development of Big Data technologies like Hadoop, Spark, NoSQL databases, and cloud computing.
Data Measurements From The Smallest Units To The Largest
2.4 Challenges with Big Data
2.4 Challenges with Big Data
Challenges with Big Data are the difficulties organizations face while managing large and complex datasets.
The major challenges include:
2.5 What are the Five “Vs” of Big Data?
The Five V's of Big Data describe the key characteristics of Big Data.
1. Volume refers to the amount of data generated, collected, and stored.
Examples
2. Velocity refers to the speed at which data is generated, collected, processed, and analyzed.
Examples
3. Variety refers to the different types and formats of data.
Examples
4. Veracity refers to the accuracy, quality, and reliability of data.
Examples
5. Value refers to the usefulness of data in generating meaningful insights and business benefits.
Examples
2.10 A Typical Data Warehouse Environment
A classic data warehouse architecture diagram, showing how data flows into and out of a central data warehouse.
"Data warehouse" the central repository where data from all these disparate sources is consolidated, cleaned, and stored in a structured format for analysis.
Below are the operational systems where raw business data originates.
Consumers / uses of the Data Warehouse data:
3.2 Big Data Analytics
Big Data Analytics is the process of examining large, complex datasets often too big or fast-moving for traditional tools to uncover patterns, trends, correlations, and insights that support decision-making.
The 5 V’s (Volume, Velocity, Variety, Veracity, Value ) usually the foundation of Big Data Analytics.
Types of Big Data Analytics
Common Tools & Technologies
3.5 Classification of Analytics
First School of Thought Definition:
The first school (Basic : Operationalized : Advanced : Monetized) classifies analytics by business maturity/integration — how deeply it's used and whether it makes money..
The second school of Thought Definition
(Descriptive : Predictive : Prescriptive) classifies analytics by the nature of the insight / question regardless of how it's deployed in the business.
2. Analytics 2.0 (2005 – 2012) The rise of big data.
3. Analytics 3.0 (2012 – present)
3.8 Why is Big Data Analytics Important?
The four approaches to data analysis and what each leads to:
1. Reactive – Business Intelligence (BI)
2. Reactive – Big Data Analytics
3. Proactive – Analytics
4. Proactive – Big Data Analytics
Reactive (Approaches 1 & 2)
Proactive (Approaches 3 & 4)
Reactive Business Intelligence:
Reactive Big Data Analytics:
Proactive Analytics:
Proactive Big Data Analytics:
3.12 Terminologies used in Big Data Environments
3.12.1 In-Memory Analytics
3.12.2 In-Database Processing
3.12.3 Symmetric Multiprocessor System(SMP)
3.12.4 Massively Parallel Processing
3.12.5 Difference Between Parallel and Distributed Systems
3.12.6 Shared Nothing Architecture
3.12.1 In-Memory Analytics
The Problem:
Limitation:
Drawback: This requires predicting in advance what data will be needed.
Solution: In-Memory Analytics
3.12.2 In-Database Processing (In-database analytics )
How it works: It combines data warehouses with analytical systems.
The Traditional Process (without in-database processing):
The Improvement: In-Database Processing
Adoption: Leading database vendors offer this feature to large businesses.
3.12.3 Symmetric Multiprocessor System (SMP)
Definition: SMP has a single common main memory that is shared by two or more identical processors.
Key characteristics:
Architecture:
3.12.4 Massively Parallel Processing (MPP)
Definition:
MPP refers to the coordinated processing of programs by multiple processors working in parallel.
Key characteristics:
Challenge:
3.12.5 Difference Between Parallel and Distributed Systems
Parallel Database System: A tightly coupled system
Distributed Database System: Known as a loosely coupled system. Composed of individual, separate machines.
3.12.6 Shared Nothing Architecture
Three common types of architecture for multiprocessor high transaction rate systems.
1. Shared Memory (SM): A common central memory is shared by multiple processors.
2. Shared Disk (SD): Multiple processors share a common collection of disks, but each has its own private memory.
3. Shared Nothing (SN): Neither memory nor disk is shared among multiple processors each processor is fully independent with its own memory and disk.
Advantages of a "Shared Nothing Architecture"
1. Fault Isolation
2. Scalability
4.1 NoSQL (Not Only SQL)
4.1.1 Where is it Used?
4.1.2 What is it?
4.1.3 Types of NoSQL Databases
4.1.4 Why NoSQL?
4.1.5 Advantages of NoSQL
4.1.6 What We Miss With NoSQL?
4.1.7 Use of NoSQL in Industry
4.1.8 NoSQL Vendors
4.1.9 SQL versus NoSQL
4.1.10 NewSQL
4.1.11 Comparison of SQL, NoSQL, and NewSQL
Origin & Definition
What is NoSQL?
Key Features:
Where/Why Used:
Types of NoSQL Databases:
Mnemonic: "Kids Drink Cold Ginger"
Why NoSQL?
1. Scale-out architecture (instead of monolithic architecture)
2. Houses large volumes of structured, semi-structured, and unstructured data
3. Dynamic schema
4. Auto-sharding
5. Replication
Advantages of NoSQL
2. Doesn't require a pre-defined schema:
{_id: 101, "BookName": "Fundamentals of Business Analytics", "Author_Name": "Seema Acharya", "Publisher": "Wiley India"}
{_id: 102, "Book_Name": "Big Data and Analytics"}
3. Cheap, easy to implement:
4. Relaxes the data consistency requirement:
5. Data can be replicated to multiple nodes and can be partitioned:
1. Sharding:
2. Replication:
What We Miss With NoSQL?
Joins, Group by, ACID properties, Easy integration with other applications that support SQL.
Use of NoSQL in Industry
NoSQL is being put to use in varied industries and They are used to support analysis for applications such as
NoSQL Type | Use Cases | Companies |
Key-Value Pairs | Shopping carts, web user data analysis | Amazon, LinkedIn |
Column-oriented | Analyze huge web user actions, sensor feeds | Facebook, Twitter, eBay, Netflix |
Document based | Real-time analytics, logging, document archive management | - |
Graph-based | Network modeling, recommendation, upsell, cross-sell | Walmart |
NoSQL Vendors
Company | Product | Most Widely Used by |
Amazon | DynamoDB | LinkedIn, Mozilla |
Cassandra | Netflix, Twitter, eBay | |
BigTable | Adobe Photoshop |
SQL versus NoSQL | |
SQL | NoSQL |
Relational database | Non-relational, distributed database |
Relational model | Model-less approach |
Pre-defined schema | Dynamic schema for unstructured data |
Table based databases | Document-based or graph-based or wide column store or key-value pairs databases |
Vertically scalable (by increasing system resources) | Horizontally scalable (by creating a cluster of commodity machines) |
Uses SQL | Uses UnQL (Unstructured Query Language) |
Not preferred for large datasets | Largely preferred for large datasets |
Not a best fit for hierarchical data | Best fit for hierarchical storage as it follows the key-value pair of storing data similar to JSON (Java Script Object Notation) |
Emphasis on ACID properties | Follows Brewer's CAP theorem |
SQL versus NoSQL | |
SQL | NoSQL |
Emphasis on ACID properties | Follows Brewer's CAP theorem |
Excellent support from vendors | Relies heavily on community support |
Supports complex querying and data keeping needs | Does not have good support for complex querying |
Can be configured for strong consistency | Few support strong consistency (e.g., MongoDB), some others can be configured for eventual consistency (e.g., Cassandra) |
Examples: Oracle, DB2, MySQL, MS SQL, PostgreSQL, etc. | Examples: MongoDB, HBase, Cassandra, Redis, Neo4j, CouchDB, Couchbase, Riak, etc. |
Comparative study of SQL, NoSQL and NewSQL | |||
| SQL | NoSQL | NewSQL |
Adherence to ACID properties | Yes | No | Yes |
OLTP/OLAP | Yes | No | Yes |
Schema rigidity | Yes | No | Maybe |
Adherence to data model | Adherence to relational model | | |
Data Format Flexibility | No | Yes | Maybe |
Scalability | Scale up / Vertical Scaling | Scale out / Horizontal Scaling | Scale out |
Distributed Computing | Yes | Yes | Yes |
Community Support | Huge | Growing | Slowly growing |
4.2 Hadoop
What is Hadoop?
Features of Hadoop
Features of Hadoop
Key Advantages of Hadoop
1. Stores Data in Its Native Format
2. Scalable: Hadoop can store and distribute very large datasets across hundreds of inexpensive servers that operate in parallel.
3. Cost-Effective: Owing to its scale-out architecture, Hadoop has a much reduced cost/terabyte of storage and processing.
4. Resilient to Failure
5. Flexibility
6. Fast: Processing is extremely fast in Hadoop as compared to other conventional systems.
Versions of Hadoop��Hadoop version 1 (Hadoop 1.x or Hadoop v1)�Hadoop version 2 (Hadoop 2.x or Hadoop v2)��
Hadoop version 1 (Hadoop 1.x or Hadoop v1):
Hadoop version 2 (Hadoop 2.x or Hadoop v2):
Hadoop version 3 (Hadoop 3.x or Hadoop v3):
Overview of Hadoop Ecosystems
The image shows the Apache Hadoop Ecosystem, which is a collection of tools that work together to store, process, analyze, manage, and monitor Big Data.
There are components available in the Hadoop ecosystem for data ingestion, processing, and analysis.
Components chat help With Data Ingestion are:
Components that help with Dara Processing are:
Components that help which Data Analysis are:
HDFS (Hadoop Distributed File System) | |
1. Distributed Storage Unit | HDFS is the distributed storage unit of Hadoop. |
2. Streaming Access and Security | It provides streaming access to file system data. It provides file permissions and authentication. |
3. Based on GFS | HDFS is based on GFS (Google File System). |
4. Scalability | It is used to scale a single cluster node to hundreds and thousands of nodes. |
5. Handles Large Datasets | It handles large datasets running on commodity hardware (inexpensive, and easily available computer hardware). |
6. Highly Fault-Tolerant | HDFS is highly fault-tolerant. |
7. Stores Files Across Multiple Machines | It stores files across multiple machines. |
8. Redundant Storage | These files are stored in redundant fashion to allow for data recovery in case of failure. |
HBASE | |
1. Data Storage | HBase stores data in HDFS. HBase uses HDFS as the underlying storage system for storing its data. |
2. Database on HDFS | HBase is a database on top of HDFS. provides additional database features for organizing, storing, and accessing data quickly. |
3. Quick Random Access | It provides quick random access to the stored data. |
4. Low Latency | HBase has very low latency compared to HDFS. |
5. NoSQL Database | It is a NoSQL database. It is non-relational. It is a column-oriented database. |
6. Table Structure | A table can have thousands of columns. A table can have multiple rows. |
7. Based on Google BigTable | HBase is based on Google BigTable. |
8. Widely Used | HBase is widely used by Facebook, Twitter, Yahoo, etc. |
Difference Between HBase and Hadoop/HDFS | ||
Aspect | HDFS | HBase |
Basic Definition | HDFS is the file system, whereas HBase is a Hadoop database. HDFS is like NTFS, whereas HBase is like MySQL. | HBase is a Hadoop database built on top of HDFS. |
Read/Write Operations | HDFS is WORM (Write Once and Read Multiple Times or Many Times). Latest versions support appending of data, but this feature is rarely used. | HBase supports real-time random read and write. |
Underlying Technology | HDFS is based on Google File System (GFS). | HBase is based on Google BigTable. |
Scanning | HDFS supports only full table scan or partition table scan. | HBase supports random small-range scan or table scan. |
Performance | Performance of Hive on HDFS is relatively very good. | For HBase, it becomes times slower. |
Data Access | Access to data is via MapReduce job only in HDFS. | Access to data is via Java APIs, REST, Avro, and Thrift APIs. |
Difference Between HBase and Hadoop/HDFS | ||
Aspect | HDFS | HBase |
Storage | HDFS does not support dynamic storage owing to its rigid structure. | HBase supports dynamic storage. |
Latency | HDFS has high-latency operations. | HBase has low-latency operations. |
Suitable For | HDFS is most suitable for batch analytics. | HBase is suitable for real-time analytics. |
Hadoop Ecosystem Components for Data Ingestion
1. Sqoop: Sqoop stands for SQL to Hadoop.
Main Functions of Sqoop
Importing Data:
Exporting Data
Exporting data from Hadoop File System: HDFS, Hbase, Hive To RDBMS such as: MySQL, Oracle, DB2
Uses of Sqoop
a) Connector-Based Architecture
It has a connector-based architecture to allow plug-ins to connect to external systems such as: MySQL, Oracle, DB2
b) Provisioning Data
It can provision the data from external system onto HDFS.
It can populate tables in Hive and HBase.
c) Integration with Oozie
It integrates with Oozie, allowing you to schedule and automate import and export tasks.
2. Flume
Hadoop Ecosystem Components for Data Processing
1. MapReduce
Map Phase
Reduce Phase
2. Spark
Spark Libraries
a) Spark SQL: Spark also has support for SQL.
Spark SQL uses SQL to help query data stored in disparate applications.
b) Spark Streaming: It helps to analyze and present data in real time.
c) Mllib: It supports machine learning, such as applying advanced statistical operations on data in the Spark Cluster.
d) GraphX: It helps in graph parallel computation.
Hadoop Ecosystem Components for Data Analysis
1. Pig
It has two parts: (a) Pig Latin , (b) Pig Runtime
(a) Pig Latin
How Pig Works?
2. Hive
Hive vs RDBMS | ||
Data Variety | Used for structured, semi-structured and unstructured data. Hadoop supports a variety of data formats in real time such as XML, JSON, and text-based flat file formats. | Used for structured data |
Data Storage | Usually datasets Of size terabytes, petabytes | Usually datasets Of size gigabytes |
Querying | HiveQL | SQL |
Query Response | In Hadoop, there is latency due to batch processing. | In RDBMS, query response time is immediate. |
Schema | Schema required on read | Schema required on write |
Speed | Writes are faster compared to reads as there is no adherence to schema required at the time of inserting or writing data. Schema is enforced at read time | Reads are very fast (supported by building indexes on required columns). |
cost | Apache Hadoop is open-source, 'varge-scale, distributed, scalable, data intensive computing. | Available as proprietary RDBMS such as oracle, MS SQL server, IBM 082, etc. |
Hive vs RDBMS | ||
use Cases | Analytics, data discovery | OLTP (Online Transaction processing). Mainly used to store and process day-to-day business data. |
Throughput | High | Low |
Scalability | Horizontal (Hadoop scales by adding nodes to a Hadoop cluster Of easily available commodity machines). | Vertical: RDBMS scales vertically by increasing the horsepower (CPU, Hard Disk Capacity, RAM, etc.) Of the machine. |
Hardware | Commodity/Utility Hardware | High End Servers |
Integrity | Low | High. Obeys ACID properties A - Atomicity C - Consistency I - Integrity D - Durability |
4.2.5 Hadoop Distributions
Hadoop:
Core Aspects of Hadoop
Hadoop Distributions or Services
Hadoop vs SQL | |
Hadoop | SQL |
Scale out | Scale up |
Key—Value pairs | Relational table |
Functional Programming | Declarative Queries |
Offline batch processing | Online transaction processing |
4.2.7 Integrated Hadoop Systems Offered by Leading Market Vendors
4.2.8 Cloud-Based Hadoop Solutions
Cloud-Based Hadoop Solutions
1. Amazon Web Services
2. Google Cloud Storage Connector for Hadoop