0% found this document useful (0 votes)
27 views20 pages

Nosql

Uploaded by

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

Nosql

Uploaded by

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

NOSQL DATABASE

Not Only SQL DATABASE

Submitted By:
Shikha Singla
M.Tech(1st Sem)
Information technology
NEED OF NOSQL
 Modern RDBMS simply don’t scale to internet traffic. So,
the main solutions are-
 Scaling Up(Vertical Scaling)- Adding resources to a
single node in a system.
 Scaling Out(Horizontal Scaling)- Adding more nodes to a
single system, multi-node database solution. Different
approaches are-
• Master Slave
• Sharding
• Multi Master Replication
• In Memory database
• No Joins
Need of NOSQL(cont.)

 High prices from RDBMS vendors.

 These days Sites like Digg, Facebook and EBay have data
sets 10s or 100s of TB large.

 Reduce object-relational impedance


HISTORY OF NOSQL
 CARLO STROZZI used the term NOSQL in 1998 to

name his lightweight, Open Source Relational Database.

 ERIC EVANS, a rack space employee, reintroduced the

term NOSQL in 2009 to discuss the open source


distributed database.
INTRODUCTION
 Stands for Not Only SQL.

 Having non-relational flat file database.

 May not require fixed table schema.

 Horizontally scalable-easily add more information.

 Avoid JOIN operation.

 Relaxation of ACID properties.

 Distributed in nature.
ARCHITECTURE of NOSQL
 Several NOSQL systems use a Distributed architecture
like Master/Slave, Master/Master,Masterless.

 Based on Distributed Hash Tables.

 Easily scale out by adding more servers & failure of a


server can be tolerated.

 Provide full ACID guarantee by adding a supplementary


middleware layer.
CAP THEOREM
 Main movement of NOSQL- Having three main
properties of a system:
 Consistency
 Availability
 Partitions
 To scale out, you have to Partition. That leaves either
Consistency or Availability , you would choose
availability over consistency in almost all cases.
 You can have at most two of these three properties for
any shared-data system.
CAP THEOREM(cont.)
Theorem states: Strict Consistency can't be
achieved at the same time as availability
and partition-tolerance.
EVENTUAL CONSISTENCY
 NOSQL database leaves consistency to achieve better
availability & partitioning, this resulted in system know
as BASE.
 BASE , as opposed to ACID, having three properties:
 Basically Available
 Soft-state
 Eventually consistent
 When no updates occur for a long period of time,
eventually all updates will propagate through the system
and all the nodes will be consistent.
NOSQL DATA MODELS
NOSQL databases can be categorized according
to their data model into the following four
categories:

Key-Value-stores
Document-stores
Graph Databases
 Big Table-Column
Implementation
KEY VALUE STORE
 Simplest form of NoSQL store- Each key is mapped to a
value containing arbitrary data.
 This store has no knowledge of the contents of its
payload and simply delivers the data to the application.
 Mainly used to encapsulate the information .
 Key-value stores is a very simple query model, usually
consisting of set, get, and delete primitives.
 Main applications based on this store:
 Redis
 Level DB
 Memcache DB
DOCUMENT STORE
 Key-document stores map a key to some document that
contains structured information.
 They store lists and dictionaries, which can be
embedded recursively inside one-another.
 Freedom and complexity of document stores are two
key points:
o Developers have a lot of freedom in modeling their
documents
o Application-based query logic can become complex.
 Main applications based on this store:
 Mongo DB
 Couch DB
GRAPH DATABASE
 To avoid JOIN operation in RDBMS, Graph Databases are
used.
 Graph Database is modeled using three basic building
blocks:
 Node as vertex
 Relationship as edge
 Property as attribute
 Graph theory has seen a great usefulness and relevance in
many problems across various domains.
 Main applications based on this store:
 Neo4J
 InfoGrid
 HyperGraphDB
BIG TABLE-COLUMN
IMPLEMENTATION
 In this Model, a key identifies a row, which contains data
stored in one or more Column Families.
 Within a Column Family, each row can contain multiple
columns.
 The values within each column are timestamped, so that
several versions of a row-column mapping can live within a
Column Family.
 The model naturally supports sparse column placement.
 It is particularly good at modeling historical data with
timestamps.
 Main applications based on this store:

 Cassandra
 HBase
 Hyper Table
COMPLEXITY
ADVANTAGES OF NOSQL
 Cheap & easy to implement due to open source.
 Easy to distribute
 Scale to available memory
 Have individual query language rather than using
a standard query language
 Flexible data model
 ACID support is not required for product listing,
status update etc
 Developer friendly-More developer centric
interface
APPLICATIONS OF NOSQL
 Cassandra-: It is developed at Facebook & written in
java. It uses Column Oriented & Eventual
Consistency model.
 MongoDB-: It is an open source , high-performance,
schema-free, document-oriented database written in
the C++ programming language. It manages
collections of JSON-like documents.
 In Yahoo ,Google or Amazon, you have had your data
served via a NoSQL solution.
 In eBay or Twitter, you have indirectly used NOSQL
datastores.
REFERENCES
 http://www.julianbrowne.com
 http://www.odbms.org
 http://nosql.mypopescu.com
 http://nosql-database.org
 http://www.infoq.com
 http:// www.nosqldatabases.com
 http://highscalability.com
THANK YOU
QUERIES?

You might also like