0% found this document useful (0 votes)
0 views3 pages

No SQL

Uploaded by

Jay Vachhani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views3 pages

No SQL

Uploaded by

Jay Vachhani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

What is NoSQL Database?

NoSQL stands for Not only SQL. NoSQL Databases are also known as non-relational
databases that don’t require a fixed schema. Users can create documents with flexible
schema and can scale up evenly without much of a stretch. NoSQL information bases are
largely utilized for BigData and ongoing applications. NoSQL database processes
information in a distributed manner and can oblige tremendous volumes of data.

Internet giants like Facebook, Google, Amazon use NoSQL databases heavily to deal with
Terabytes of data daily.

As NoSQL Database uses distributed storage, it is easy to scale them up horizontally with
commodity hardware. In the RDBMS world, the system tends to go slow when the volume
of the data increases and could be tackled by scaling up the existing hardware. However,
this process is expensive and inefficient. An alternative to this problem is distributing the
data load to separate commodity hardware whenever the load increases.

How Does a NoSQL Database Work?


NoSQL databases leverage a variety of data models for managing and accessing data.
These types of databases are optimized specifically for applications that need large data
volume, flexible data models, and low latency, which can be achieved by relaxing some of
the data consistency restrictions of other databases.

Here’s an example of modeling the schema for a simple book database:

 In a relational database, a book record is often dissected (or normalized) and stored
in separate tables, and relationships are defined by foreign and primary key
constraints. In this instance, the Books table has columns for Book Title, ISBN, and
Edition Number. The Authors table consists of the columns Author Name and
AuthorID, and the Author-ISBN table consists of the columns ISBN and AuthorID.
This relational model is designed specifically to allow the database to enforce
referential integrity between tables within the database, normalized to decrease
the redundancy, and generally optimized for storage.
 Within a NoSQL database, a book record is generally stored as a JSON document.
For every book, the item, Book Title, ISBN, Edition Number, Author ID, and Author
Name are stored as attributes within a single document. In this model, the data is
optimized for horizontal scalability and intuitive development.
Types of NoSQL Databases
1. Document Databases

Also called document stores, these databases store semi-structured data and descriptions
of that data in document format. They enable developers to create and update programs
without needing to reference master schema. Use of document databases has increased
along with the use of JavaScript and the JavaScript Object Notation (JSON), a data
interchange format that has gained wide currency among web application
developers. Document databases are used for content management and mobile
application data handling, such as blogging platforms, web analytics and e-commerce
applications.

2. Key-Value Stores

Key-value Stores are the simplest type of NoSQL Database. It uses keys and values to
store the data. The attribute name is stored in ‘key’, whereas the values corresponding to
that key will be held in ‘value’.

In Key-value store databases, the key can only be string, whereas the value can store
string, JSON, XML, Blob, etc. Due to its behavior, it is capable of handling massive data
and loads.

The use case of key-value stores mainly stores user preferences, user profiles, shopping
carts, etc.

3. Column-Oriented Databases
These databases use familiar tables, columns and rows like relational database tables, but
column names and formatting can differ from row to row in a single table. Each column
is also stored separately on disk. As opposed to traditional row-orientated storage, a
wide-column store is optimal when querying data by columns. Typical applications where
wide-column stores can excel include recommendation engines, catalogs, fraud detection
and event-logging.
Differences between NoSQL and Relational database

NoSQL Database Relational Database

NoSQL Database supports a very simple query Relational Database supports a powerful query
language. language.

NoSQL Database has no fixed schema. Relational Database has a fixed schema.

NoSQL Database is only eventually consistent. Relational Database follows acid properties.
(Atomicity, Consistency, Isolation, and Durability)

NoSQL databases don't support transactions Relational Database supports transactions (also
(support only simple transactions). complex transactions with joins).

NoSQL Database is used to handle data coming Relational Database is used to handle data coming in
in high velocity. low velocity.

The NoSQL?s data arrive from many locations. Data in relational database arrive from one or few
locations.

NoSQL database can manage structured, Relational database manages only structured data.
unstructured and semi-structured data.

NoSQL databases have no single point of Relational databases have a single point of failure
failure. with failover.

NoSQL databases can handle big data or data NoSQL databases are used to handle moderate
in a very high volume . volume of data.

NoSQL has decentralized structure. Relational database has centralized structure.

NoSQL database gives both read and write Relational database gives read scalability only.
scalability.

NoSQL database is deployed in horizontal Relation database is deployed in vertical fashion.


fashion.

You might also like