You are on page 1of 32

No SQL DATA

MANAGEMENT
Introduction to NoSQL

2 RVR & JC COLLEGE OF ENGINEERING


Introduction to NoSQL
There are lots of data storage options
available in the market.
And yet, many more are still coming
up as the nature of data, platforms,
user requirements, architectures, and
processes are constantly changing. We
are living in the era of Big Data and
3 are in search of ways of handling it.
RVR & JC COLLEGE OF ENGINEERING
Interaction of Layers in
NoSQL

4 RVR & JC COLLEGE OF ENGINEERING


NoSQL
There are more than 150 NoSQL
databases available in the market.

5 RVR & JC COLLEGE OF ENGINEERING


Benefits and Challenges
of Benefits
BigData of NoSQL Databases
Challenges against
NoSQL Databases
Scale(horizontal), Simple data model ACID transactions
(fewer joins) Cannot us SQL
Streaming/volume, Reliability Ecosystem/tools/add
Schema-less(no modeling or prototyping) -ons
Rapid development, Flexible as it can Cannot perform
handle semi-structured, unstructured, and searches
structured data Data loss
Cheaper a caching layer, Creates a No referential
caching layer integrity
Wide data type variety, Uses large binary Lack of availability of
objects for storing large data, Bulk upload, expertise
Graphs
6 RVR & JC COLLEGE OF ENGINEERING
Characteristics of NoSQL
NoSQL databases do not use SQL; however, some of
them have query languages.
Database query language that does not follow the
principles of RDBMS.
NoSQL are generally open-source projects
Most NoSQL databases run on clusters.
Relational data bases are one option for data storage.
Polyglot persistence, mans using different data stores
for different circumstances.
Most organizations will have a mix of data storage
7 RVR & JC COLLEGE OF ENGINEERING

Evolution of Data Bases


Application programs generally demand small bits
of information in quick successions rather than
large data.
Impedance Mismatch difference between relational
model and the in-memory data structures.
The following properties of RDBMS make it easy for
developers to use it:
Data persistence
Concurrency
8 Shared database integration
RVR & JC COLLEGE OF ENGINEERING
Evolution of Databases

9 RVR & JC COLLEGE OF ENGINEERING


Aggregate Data Models
Database developer generally use relational
databases, which are quite different from
NoSQL databases.
The data structures used by developers
make them focus on aggregate models.
Aggregate data model, we basically interact
with a collection of data.
This is formed with the help of key values,
10
documents, graph and
RVR & JC COLLEGE OF ENGINEERING
column-family
Aggregate Data Models
Comparison between different
NoSQL
Data Models
Data Model Performa
nce
Scalability Flexibi
lity
Functionality

Key Value High High High Variable


Column High High Modera Minimal
Oriented te
Document High Variable(hig High Variable(low)
Oriented h)
Graph Variable Variable High Graph Theory
11 Relational
RVR & JC COLLEGE OF ENGINEERING Variable Variable Low Relational
Ahttps://www.thoughtworks.com/insights/blog/nosql-databases-overview

Key Values Database
Key-value stores are the simplest NoSQL data stores to use from an
API perspective. The client can either get the value for the key, put a
value for a key, or delete a key from the data store.
The value is a blob that the data store just stores, without caring or
knowing what's inside; it's the responsibility of the application to
understand what was stored.
Since key-value stores always use primary-key access, they generally
have great performance and can be easily scaled.
Some of the popular key-value databases are Riak , Redis (often
referred to as Data Structure server), Memcached, Berkeley DB,
upscaledb (especially suited for embedded use), Amazon DynamoDB
(not open-source), Project Voldemort
12
and Couchbase.
RVR & JC COLLEGE OF ENGINEERING
13 RVR & JC COLLEGE OF ENGINEERING
Document Databases
http://dataconomy.com/sql-vs-nosql-need-know/

There are many types of document databases, such as XML, JSON,


BSON, etc. the document databases are self-describing hierarchical
tree data structures that can contain maps, collections, and scalar
values.
Document data bases mainly store documents in the value part of the
key/value store;
Document data base provide indexing and searching etc,

14 RVR & JC COLLEGE OF ENGINEERING


Document databases
This image from Document Database solutionCouchDBsums up the
distinction between RDBMS and Document Databases pretty well:
Comparision of Rletional data model and Document data model

15 RVR & JC COLLEGE OF ENGINEERING


<document>

16 RVR & JC COLLEGE OF ENGINEERING


Relationships
https://www.informit.com/articles/article.aspx?p=2266741

The most important concept of a database is the relationship shared


among nodes.

17 RVR & JC COLLEGE OF ENGINEERING


Relationships
Relationship between Nodes

18 RVR & JC COLLEGE OF ENGINEERING


Graph Databases
A graph database is a type of database that makes use of graph
structures for semantic queries having nodes, edges, and properties
to display and store data.
Graph databases allow you to store entities and relationships
between these entities.
Entities are also known as nodes, which have properties. Think of a
node as an instance of an object in the application. Relations are
known as edges that can have properties.
Edges have directional significance; nodes are organized by
relationships which allow you to find interesting patterns between
the nodes.
The organization of the graph lets the data to be stored once and
19 then
RVR & JC interpreted in different ways based on relationships .
COLLEGE OF ENGINEERING
Graph Databases

20 RVR & JC COLLEGE OF ENGINEERING


Graph Databases

21 RVR & JC COLLEGE OF ENGINEERING


Schema-Less Databases
Data base without Schema is called schema-less database.
A schema less database allows us to store non-uniform information,
where each
record will have an alternative set of fields.
Also have various types of fields in diverse columns.
You can add edges and simultaneously define node properties as per
your convenience or
requirement.
A schema less data base permits each record to contain exactly what it
needs. This type
of database also eliminates many conditions found in fixed-schema
database.
22 RVR & JC COLLEGE OF ENGINEERING
Materialized Views

23 RVR & JC COLLEGE OF ENGINEERING


Distribution Models
Distribution of data can be done in two ways:
Through Sharding: distribute various types of data across multiple server.
Each server acts as a single source for a subset of data.

Through replacement: technique for fault tolerance. Idea is copy data


across multiple servers so that each bit of data can be found in multiple
places.
Replication occurs in two forms:
Master-slave replication, which makes one node the authoritative copy
that handles writes while slaves, which are synchronized with the
master, handle reads.
Peer-to-peer replication, which allows writes to any node without
requiring authorization.

24 RVR & JC COLLEGE OF ENGINEERING


CAP Theorem
In theoretical computer science, the CAP theorem, also
named Brewer's theorem after computer scientist Eric
Brewer, states that it is impossible for a distributed computer
system to simultaneously provide more than two out of three
of the following guarantees: Consistency. Availability. Partition
tolerance.
Aspects of the CAP Theorem
The number of nodes that should respond to a read request
before it is considered as successful operation.
The number of nodes that should respond to a write request
before it is considered a successful operation.
The number of nodes where the data is replicated or copied.
25 RVR & JC COLLEGE OF ENGINEERING
CAP THEOREM

26 RVR & JC COLLEGE OF ENGINEERING


Sharding
Googles Def: Sharding is a type of database partitioning that
separates very large databases the into smaller, faster, more easily
managed parts called data shards. The word shard means a small
part of a whole.
Database sharding: Database sharding is to store data into physically
separate databases through horizontal partitioning and to retrieve them.
For example, it is a method to store users less than 13 years old in
database 0 and store users 13 or greater than 13 years old in database 1
when 'User Table' is located through multiple database. In addition to
performance, database sharding is used to distribute and save large data
which cannot be saved into one database instance.
Each partitioned database is called a shard or database shard.
Diagrams for Database Sharding available @

http://www.cubrid.org/manual/91/en/shard.html
27 RVR & JC COLLEGE OF ENGINEERING
28 RVR & JC COLLEGE OF ENGINEERING
DB Sharding

29 RVR & JC COLLEGE OF ENGINEERING


MapReduce Partitioning and Combining
Basic slides @

http://www.slideshare.net/diliprk/mapreduce-paradigm

30 RVR & JC COLLEGE OF ENGINEERING


31 RVR & JC COLLEGE OF ENGINEERING
Thank You

32 RVR & JC COLLEGE OF ENGINEERING

You might also like