Intro to NoSQL
Intro to NoSQL
No SQL systems are also referred to as "NotonlySQL“ to emphasize that they do in fact allow
SQL-like query languages to be used.
In relational Databases:
You can’t add a record which does not fit the schema
You need to add NULLs to unused items in a row
We should consider the datatypes. i.e : you can’t add a stirng to an interger field
You can’t add multiple items in a field (You should create another table: primary-key, foreign
key, joins, normalization, ...)
In NoSQL Databases:
There is no schema to consider
There is no unused cell
There is no datatype (implicit)
Most of the considerations are done in
NoSQL avoids:
The overhead of ACID transactions
(Atomicity (A), Consistency (C), Isolation (I)
“concurrency control,” Durability (D)
“Permanent Changes”
Complexity of SQL query
Burden of up-front schema design
DBA presence
Transactions (It should be handled at the
application layer)
Provides:
Easy and frequent changes to DB
Fast development
Large data volumes(e.g. Google)
Schema less
The CAP theorem is a fundamental concept in distributed computing that states that a distributed
We need a distributed database system data store can only guarantee two out of the following three properties:
CAP Trade-off
•In a distributed system, network partitions can happen due to network failures. When this occurs,
the system must prioritize Consistency or Availability.
NoSQL Database
5. No predefined Schema
6. Per-product definition and interface language
7. Getting an answer quickly is more important than getting a correct answer