Overview of NoSQL
Overview of NoSQL
OF NOSQL
Meera C Dev 1
M.Sc. Data Science and Analytics
WHAT IS A NOSQL DATABASE?
NoSQL, also referred to as “not only SQL” or “non-SQL”, is an
approach to database design that enables the storage
and querying of data outside the traditional structures found
in relational databases.
2
NoSQL databases store data in a single data structure,
such a JSON document, as opposed to the usual tabular
structure of a relational database. This non-relational database
design provides quick scalability to handle big, usually
unstructured data sets because it doesn't require a
schema.
3
EMERGENCE OF NOSQL
The acronym NoSQL was coined in 1998.
4
NoSQL is not SQL and not relational; it's not a replacement for
an RDBMS but compliments it.
Designed for distributed data stores for large scale data needs.
– Example: Consider Facebook, which has 500,000,000 users,
or X (formerly Twitter) which generates Terabits of data daily.
No fixed schema and no joins in a NoSQL database.
TYPES OF NOSQL
DATABASES
KEY-VALUE STORES
The simplest form of a NoSQL database is a key-value store.
Every data element in the database is stored in key-value
pairs.
The data can be retrieved by using a unique key allotted
to each element in the database.
The values can be simple data types like strings and numbers
or complex objects.
However, it's not ideal when you need to pull multiple records
at a time.
Example: Redis and Memcached
8
DOCUMENT-BASED DATABASE
Flexible schema: Documents in the database has a flexible
schema. It means the documents in the database need not be
the same schema.
Faster creation and maintenance: the creation of documents
is easy and minimal maintenance is required once we create the
document.
No foreign keys: There is no dynamic relationship between two
documents so documents can be independent of one another. So,
there is no requirement for a foreign key in a document database.
Open formats: To build a document we use XML, JSON, and
others.
Example: MongoDB, the database component of the MEAN
stack.
9
COLUMN ORIENTED
DATABASES
Stores the data in columns instead of rows i.e., when we want
to run analytics on a small number of columns, you can read
those columns directly without consuming memory with
the unwanted data.
Columnar databases are designed to read data more efficiently
and retrieve the data with greater speed.
A columnar database is used to store a large amount of data.
Example: Apache HBase and Apache Cassandra are
examples of open-source, wide-column databases.
10
GRAPH-BASED
DATABASES
Graph-based databases focus on the relationship between the
elements.
It stores the data in the form of nodes in the database. The
connections between the nodes are called links or
relationships.
The Query’s output is real-time results.
The speed depends upon the number of relationships among
the database elements.
Updating data is also easy, as adding a new node or edge to a
graph database is a straightforward task that does not require
significant schema changes.
Example: Neo4j and ArangoDB
11
MAJOR NOSQL PLAYERS
The major players in NoSQL have emerged primarily because of
the organizations that have adopted them. Some of the largest
NoSQL technologies include:
1. Dynamo was created by Amazon.com and is the most
prominent Key-Value NoSQL database. Amazon S3 uses
Dynamo as the storage mechanism.
2. Cassandra was open sourced by Facebook and is a column-
oriented NoSQL database.
3. BigTable is Google's proprietary column oriented database.
Google allows the use of BigTable but only for the Google App
Engine.
12
4. SimpleDB is another Amazon database. Used for Amazon
EC2 and S3, it is part of Amazon Web Services that charges fees
depending on usage.
5. CouchDB along with MongoDB are open source
document-oriented NoSQL databases.
6. Neo4j is an open source graph database.
7. Apache CouchDB is an open source, JSON document-based
database that uses JavaScript as its query language.
8. Elasticsearch is a document-based database that includes
a full-text search engine.
9. Couchbase is a key-value and document database that
empowers developers to build responsive and flexible
applications for cloud, mobile, and edge computing.
13
ADVANTAGES OF NOSQL
Each type of NoSQL database has strengths that make it better
for specific use cases. However, they all share the following
advantages for developers and create the framework to provide
better service customers, including:
Cost-effectiveness: It is expensive to maintain high-end,
commercial RDBMS. They require the purchase of licenses,
trained database managers, and powerful hardware to scale
vertically. NoSQL databases allow you to quickly scale
horizontally, better allocating resources to minimize costs.
Flexibility: Horizontal scaling and a flexible data model also
mean NoSQL databases can address large volumes of rapidly
changing data, making them great for agile development,
quick iterations, and frequent code pushes.
14
Replication: NoSQL replication functionality copies and stores
data across multiple servers. This replication provides data
reliability, ensuring access during down time and protecting
against data loss if servers go offline.
Speed: NoSQL enables faster, more agile storage and
processing for all users, from developers to sales teams to
customers. Speed also makes NoSQL databases generally a
better fit for modern, complex web applications, e-commerce
sites, or mobile applications.
15
10 COMMON USE CASES
10 common NoSQL use cases for modern applications seen in the
database market today are:
1. Personalization
2. Profile Management
3. Augmented Real-time Analytics
4. Content Management
5. Catalog
6. Customer 360° View
7. Mobile Applications
8. Internet of Things
9. Digital Communication
10. Fraud Detection
16
[1] NoSQL Databases. IBM,
https://www.ibm.com/topics/nosql-databases. Accessed
on 01-10-2024
[2] An Overview of NoSQL Databases. Lifewire,
https://www.lifewire.com/nosql-an-overview-of-nosql-dat
abases-2495393
. Accessed on 01-10-2024
[3] Types of NoSQL Databases. GeeksforGeeks,
https://www.geeksforgeeks.org/types-of-nosql-databases
/
. Accessed on 01-10-2024
REFERE
[4] SQL vs NoSQL: 5 Critical Differences. Integrate.io,
https://www.integrate.io/blog/the-sql-vs-nosql-difference/
NCE
. Accessed on 01-10-2024
[5] 10 Common NoSQL Use Cases for Modern
Applications. Couchbase,
17
https://www.couchbase.com/blog/10-common-nosql-use-