No SQL
No SQL
Web 2.0 refers to the second generation of the World Wide Web, characterized by the shift
from static web pages to dynamic and interactive content( youtube, blogs, facebook,twitter
etc).
The SQL scalability issue was recognized by Web 2.0 companies with huge, growing data
and infrastructure needs, such as Google, Amazon, and Facebook.
They came up with their own solutions to the problem – technologies
like BigTable, DynamoDB, and Cassandra.
A number of existing indexing structures were reused and improved upon with the
purpose of enhancing search and read performance.
First, there were proprietary (closed source) types of NoSQL databases developed by big
companies to meet their specific needs, such as Google’s BigTable, which is believed to be
the first NoSQL system, and Amazon’s DynamoDB.
The success of these proprietary systems, initiated development of a number of similar open-
source and proprietary database systems, the most popular ones being Hypertable, Cassandra,
MongoDB, DynamoDB, HBase, and Redis.
NoSQL is a type of database management system (DBMS) that is designed to handle
and store large volumes of unstructured and semi-structured data.
Unlike traditional relational databases that use tables with pre-defined schemas to
store data, NoSQL databases use flexible data models that can adapt to changes in
data structures and are capable of scaling horizontally to handle growing amounts of
data.
The term NoSQL originally referred to “non-SQL” or “non-relational” databases, but
the term has since evolved to mean “not only SQL,” as NoSQL databases have
expanded to include a wide range of different database architectures and data models.
It does not follow the rules of Relational Database Management Systems (RDBMS),
and hence do not use traditional SQL statements to query your data.
Some famous examples are MongoDB, Neo4J, HyperGraphDB, etc.
3. You can transfer the application code object model directly into a document
using several different formats. The most commonly used are JavaScript Object
Notation (JSON), Binary JavaScript Object Notation (BSON), and Extensible
Markup Language (XML).
An example of a document data model
AWS offers a specialized document database service
called Amazon DocumentDB (with MongoDB compatibility).
NoSQL databases are often used in applications where there is a high volume of data
that needs to be processed and analyzed in real-time, such as social media analytics, e-
commerce, and gaming.
They can also be used for other applications, such as content management systems,
document management, and customer relationship management.
However, NoSQL databases may not be suitable for all applications, as they may
not provide the same level of data consistency and transactional guarantees as
traditional relational databases.
In a relational database, we'd likely create two tables: one for Users and one for
Hobbies.
Users
Hobbies
ID user_id hobby
10 1 scrapbooking
11 1 eating waffles
12 1 working
In order to retrieve all of the information about a user and their hobbies, information
from the Users table and Hobbies table will need to be joined together.
The data model we design for a NoSQL database will depend on the type of NoSQL
database we choose. Let's consider how to store the same information about a user and
their hobbies in a document database like MongoDB.
In order to retrieve all of the information about a user and their hobbies, a single
document can be retrieved from the database. No joins are required, resulting in faster
queries.
2. Key-value:
A key-value data store is a type of database that stores data as a collection of key-
value pairs. In this type of data store, each data item is identified by a unique key, and
the value associated with that key can be anything, such as a string, number, object, or
even another data structure.(MongoDB)