Professional Documents
Culture Documents
NOSQL
NOSQL
NOSQL
01 02
Definition & History Types of NoSQL
What is it? How did it Document based, column
change over time? based, etc..
03 04
CAP, Pros and Cons SQL VS NoSQL
Perfectly balanced, as
Decisions, decisions..
everything should be.
01
Definition & History
Let’s go back..
Non-relational
Open-Source
Cluster Friendly
Schema Free
The most basics type of NO SQL, to handle a huge of data base, based on Amazon ‘ Dymano paper
When you retrieve some thing , you only use the key
Allow developer to store scheme less(you don’t need to have scheme, each row follows key with
value which can search quickly like hash table)
Store data as hash table which key is unique and value may be any thing (string ,JSON file,BLOB’basic
large object’)
Key can be strings, hashes, sets , sorted sets (not just number)or attribute with value)
Tim Oakland 33
Carrey Boston 32
You need to access the all disks in Row to get the sum of
ages but in Col , you need only to access disk1
Document Oriented Database
• RDF Triple store : The RDF triple store is a type of graph database that
stores data as a network of objects and uses inference to uncover new
information out of existing relations.
• RDF: standard resource description framework
03
Consistency, CAP and
Pros & Cons
How does NoSQL fare?
Consistency
Definition
• ACID
• BASE
• Many others between them with different degrees of
consistency guarantees
ACID
• Atomic
• Consistent
• Isolated
• Durable
Atomic
• Any database transaction consists of many statements that
are executed together.
• If any statement was executed incorrectly, the database
would be changed incorrectly.
• This is called a database inconsistency.
Atomic
• Basically Available
• Soft state
• Eventually Consistent
BASE
• Consistency
• Availability
• Partition Tolerance
Consistency
• Easily Scalable.
• Flexible.
• Less Mature
• Less Support
• No standardization
Less Mature
SQL
bases as documents, (Relational Data Base
graphs, etc… Management Systems)
L Examples
• MongoDB, RavenDB • MySQL
• BigTable, HBase • Oracle
• Redis, Cassandra • PostgreSQL
• Neo4j, CouchDB • Microsoft SQL Server
NoSQL vs. SQL
Data Model
Follows the principles of the
Follows the BASE model
NoSQ
ACID model (Atomicity
(Basic Availability Soft State
Consistency Isolation
SQL
Eventually Consistent)
Durability)
L Schema
• Structured, semi-structured • The data in must be
or even unstructured data structured and constraints
can all be stored together must be planned
• Very loose schema or no • Requires a strict schema
schema at all
NoSQL vs. SQL
Scalability
Uses horizontal scaling and Utilizes vertical scaling that can
can divide the data in the be thought of as increasing the
SQL
chunks and distributed across the number of columns remains
multiple servers constant
L Language
• No standard language to use • Utilizes a standard question
• Each NOSQL framework designer language known as SQL.
has made their own language • Can deal with complex inquiries
• No aggregate functions or complex through specialized interface
inquiries • Can use aggregate functions
NoSQL vs. SQL
Security
NoSQL SQL
• Not designed with security as a • Remarkably secure systems
priority so has weak security that guarantee the protection of
• A security layer must be added services, data & users
to NoSQL applications. • Can encrypt data, limit access
• Hopefully will get better as the and authorization, protect data
NoSQL market matures in the from theft, destruction of data
future and malicious behaviour
NoSQL vs. SQL
Best
• When the access pattern is defined Usage
• When the access patterns aren’t defined or
random
• When the primary key is known • When you want to perform relational
queries
• When the data model fits best (for example
• When you want to perform flexible and
graphs in social media) complex queries
• When you want to use a more documented
• When there’s a need for a very high
access language
performance and low latency • When you want to enforce field constraints
NoSQL SQL
• Small Project + Low Scale +
Unknown Access Patterns
• Large Project + High Scale +
Relational Queries
NoSQL
Real Scenarios
• Medium/Large Project + High
Scale + High Performance
SQL
• Cloud Based Computing and
Storage
• Projects with Big Data
NO ONE WINS!!!!
The Future
of NoSQL
• Won’t be the only data base in the market
• More Security Measures
• Better decisions to choose the best database for every
application
• High probability of Polyglot Persistence
THANKS
DO YOU HAVE ANY
QUESTIONS?