Professional Documents
Culture Documents
2
Taxonomy of NoSQL
• Key-value
• Graph database
• Document-oriented
• Column family 3
NoSQL “Not Only SQL”
(Non-Relational)
New ways of querying architecting
your dynamic data store…
6
What Giants use ?
Google – Big Table
Proprietary , available with Google Cloud
Platform
Amazon – DynamoDB –proprietary
NoSQL Database
Offered as a part of AWS
It is a fully managed cloud database and
supports both document and key-value
store models.
7
Case Study : Google Big Table
Google need to store results from the web crawlers
that extract HTML pages, images, sounds, videos, and
other media from the internet.
12
NoSQL
13
NoSQL Continued..
No Joins
No Complex transactions
Complexity has to be taken care by the
application
Less functionality but more
performance (w.r.t. RDBMS)
14
Sharding of data
Distributes a single logical database system
across a cluster of machines
Uses range-based partitioning to distribute
documents based on a specific shard key
Automatically balances the data associated
with each shard
Can be turned on and off per collection
(table) 8
MongoDB
16
MongoDB
Document Oriented, NoSQL Database
Open Source
Developed and Supported by 10gen
founded in 2007
General Public Licence (free)
Commercial Licence
Scalable, open source , high
performance , document oriented
database (10gen) 17
MongoDB Continued..
Schema-less database
Written in C++
Supports APIs (drivers) in many
computer languages
JavaScript, Python, Ruby, Perl, Java,
Java Scala, C#, C++, Haskell, Erlang
18
MongoDB
Table – Collection
Row – Document
Document may have different field
Each Row need to have same field
Compare it with Flipkart page visits
for user
19
Schema Free
• MongoDB does not need any pre-defined data schema
• Every document in a collection could have different data
}
Flipkart Collection (another
way)
{
{id=1
Page =[page1, page 2, page3]
}
{id=2
Page [page1, page2]
}
}
22
CRUD operations
Create
Read
Update
Delete
Done on the collections
23
MongoDB :Use Cases
(Project / Company specific )
24
Aadhar
Adhar is an excellent example of real world use
cases of MongoDB.
Aadhar, is the world’s biggest biometrics
database. Contains biometric data of over 1.2
billion residents.
Aadhar has used MongoDB as one of its
database to store this huge amount of data,
originally procured for running the database
search.
MySQL is used for storing demographic data
and MongoDB is used to store images.
25
Shutterfly
Internet-based photo sharing and
personal publishing company
Manages a store of more than 6
billion images with a transaction rate
of up to 10,000 operations per
second.
One of the companies that
transitioned from Oracle to MongoDB.
26
MetLife
MetLife is a leading global provider of
insurance, annuities and employee
benefit programs.
They serve about 90 million customers
and hold leading market positions in the
United States, Japan, Latin America,
Asia, Europe and the Middle East.
27
Metlife continued..
MetLife uses MongoDB for “The Wall”,
an innovative customer service application
that provides a consolidated view of MetLife
customers, including policy details and
transactions
The Wall is designed to look and
function like Facebook and has improved
customer satisfaction and call centre
productivity
28
eBay
eBay has a number of projects
running on MongoDB for search
suggestions, metadata storage, cloud
management and merchandizing
categorization.
29
MongoDB use cases
(Application specific)
Source: MongoDB
30
High Volume Data Feeds
Machine
• More machine forms, sensors & data
Generated • Variably structured
Data
Data
Data
Sources
Data
Sources
Data Write to memory with
Sources periodic disk flush
Sources
API
In database
aggregation
Dashboards
Flexible schema
Can use same adapts to changing
cluster to collect, input data
store and report on
data
Behavioural Profiles
Rich profiles
collecting multiple
complex actions
1 See Ad
4 Convert
Metadata
• Data mining
Data analysis • Call records
• Insurance Claims
• Retina Scans
Biometric • Fingerprints
Metadata Indexing and rich query
API for easy searching
and sorting
db.archives.
find({key:“type”, value:“Artifact”}); Flexible data model
for similar but
different objects
{ origin: “facebook.com/photos/xwdf23fsdf”,
license: “Creative Commons CC0”,
size: {
dimensions: [ 124, 52 ],
units: “pixels”
Horizontal scalability }
for large data sets }
Application Why MongoDB Might be a good fit
Large number of objects Sharding lets you split objects across
to store multiple servers
High write / read Sharding + Replication lets you scale
throughput and data read and write traffic across multiple
distribution servers, multiple tenants, or data
centers
Low latency access Memory mapped storage engine
caches documents in RAM, enabling
in-memory operations. Data locality of
documents significantly improves
latency over join-based approaches
Variable data in objects Dynamic schema and JSON data
model enable flexible data storage
without sparse tables or complex
joins, and provide for an intuitive
query language
Cloud based deployment Sharding and replication let you work
around hardware limitations in the 40
cloud.