10 Nosql And Unstructured Data

Database Management System · Unit 10

NoSQL and Unstructured Data

Exam-focused notes for NoSQL and Unstructured Data (Database Management System, BIT202): what the TU syllabus asks and how it has actually been tested, with 5 solved past questions from this unit.

NoSQL and Unstructured Data in short

Modern applications such as social media and online shops store huge amounts of data in many forms. Relational databases do not always fit this need well. NoSQL databases were created to handle such data at large scale.

NoSQL and Unstructured Data: notes

Structured and unstructured data

  • Structured data follows a fixed schema of rows and columns. Examples are bank records and student tables. It is stored in relational databases and queried with SQL.
  • Semi-structured data has some structure but no fixed schema. Examples are JSON, XML, and log files with tags.
  • Unstructured data has no predefined format. Examples are emails, photos, videos, audio, PDF files, and social media posts.
StructuredUnstructured
Fixed schemaNo fixed schema
Easy to search with SQLNeeds special tools to search
Fits tablesStored as files or documents
Example: employee tableExample: video or image

Most data created today is unstructured or semi-structured, which is one reason NoSQL grew.

NoSQL definition and characteristics

NoSQL means "Not Only SQL". It is a group of databases that store data in forms other than fixed relational tables. They are built for large volume, high speed, and a variety of data.

Characteristics:

  • Flexible schema: records in one collection can have different fields.
  • Horizontal scaling: capacity grows by adding more cheap servers (scale out), not by buying a bigger server.
  • Distributed: data is spread and copied over many nodes.
  • High availability: the system keeps working if a node fails.
  • Fast reads and writes for simple operations.
  • Often no joins and weaker transaction support.

NoSQL systems follow the BASE idea instead of ACID.

  • Basically Available: the system answers most requests.
  • Soft state: data may change over time as copies sync.
  • Eventual consistency: all copies become the same after some time.

The CAP theorem says a distributed system can fully give only two of three: Consistency, Availability, and Partition tolerance.

What this unit covers

  • Structured and unstructured data
  • NoSQL definition and characteristics
  • NoSQL types and models
  • NoSQL advantages
  • Data storage and retrieval in NoSQL
  • NoSQL query languages

Data storage and retrieval in NoSQL

2082 · 5 marks

How data is stored and retrieved in NoSQL databases? Illustrate with examples. [5]

NoSQL (Not Only SQL) databases store data in non-relational formats, designed for flexibility, scalability, and high performance. Unlike relational databases that use fixed table schemas, NoSQL databases use various data models depending on the type. --- Storage: Data is stored as a simple key-va...

Open this answer on its own page →

NoSQL definition and characteristics

2080 · 5 marks

What is NoSQL? Explain the characteristics of NoSQL. [5]

Show solved answer

NoSQL: Definition and Characteristics

What is NoSQL?

NoSQL (Not Only SQL) is a category of database management systems that do not follow the traditional relational database model. NoSQL databases are designed to store, retrieve, and manage large volumes of unstructured, semi-structured, or structured data that may not fit neatly into tables with fixed schemas.

NoSQL databases emerged to address the limitations of relational databases in handling big data, real-time web applications, and distributed computing environments.

Note: This answer is based on standard database literature, as no specific curriculum notes were provided.


Characteristics of NoSQL

1. Non-Relational / Schema-Free

  • NoSQL databases do not require a fixed schema like relational databases.
  • Data can be stored in flexible formats such as key-value pairs, documents, graphs, or wide columns.
  • New fields can be added without altering the entire database structure.

2. Horizontal Scalability

  • NoSQL databases are designed to scale out by adding more servers (horizontal scaling) rather than upgrading a single server (vertical scaling).
  • This makes them suitable for handling massive amounts of data across distributed systems.

3. Distributed Architecture

  • Data is distributed across multiple nodes or servers.
  • This ensures high availability and fault tolerance.
  • Examples include replication and sharding of data across clusters.

4. High Performance

  • NoSQL databases are optimized for fast read and write operations.
  • By avoiding complex joins and rigid schemas, they achieve lower latency and higher throughput.

5. BASE Properties (instead of ACID)

NoSQL follows the BASE model:

PropertyDescription
Basically AvailableSystem guarantees availability
Soft StateState of the system may change over time
Eventually ConsistentData will become consistent eventually, not immediately

6. Support for Variety of Data Models

NoSQL supports multiple data storage models:

  • Key-Value Store (e.g., Redis)
  • Document Store (e.g., MongoDB)
  • Column-Family Store (e.g., Cassandra)
  • Graph Database (e.g., Neo4j)

7. Open Source and Cost-Effective

  • Most NoSQL databases are open-source and can run on commodity hardware, reducing infrastructure costs.

8. Handles Big Data

  • NoSQL is well-suited for storing and processing large volumes of data (Big Data) generated by social media, IoT devices, and web applications.

Summary Table

FeatureRelational DBNoSQL DB
SchemaFixedFlexible
ScalabilityVerticalHorizontal
Data ModelTablesKey-Value, Document, Graph, Column
ConsistencyACIDBASE
Best ForStructured DataUnstructured/Big Data
Open this answer on its own page →

2079 · 5 marks

What is NoSQL? Explain the NOSQL characteristics related to data models and query languages. [5]

NoSQL (Not Only SQL) refers to a broad class of database management systems that differ from traditional relational databases (RDBMS) in that they do not primarily use SQL or the relational table-based model. NoSQL databases are designed to handle: - Large volumes of unstructured or semi-structur...

Open this answer on its own page →

2078 · 5 marks

What is NoSQL? What are the types of NoSQL? Explain. [5]

NoSQL (Not Only SQL) refers to a category of database management systems that do not follow the traditional relational (tabular) model. NoSQL databases are designed to handle: - Large volumes of unstructured or semi-structured data - High scalability (horizontal scaling across multiple servers) -...

Open this answer on its own page →

0 · 5 marks

Differentiate structured and unstructured data. List the advantages of NoSQL. [5]

Basis Structured Data Unstructured Data --------- Definition Data that is organized in a predefined format (rows and columns) Data that has no predefined format or organization Storage Stored in relational databases (RDBMS) Stored in NoSQL databases, file systems, data lakes Schema Has a fixed, r...

Open this answer on its own page →