SlideShare a Scribd company logo
1 of 35
Download to read offline
NoSQL Technologies
Lecturer: Dr. Nguyen Binh Minh
Students:
- Pham Anh Doi
- Nguyen Quang Huy
- Nguyen Hai Nam
- Luong Anh Tuan
- Pham Duc Thang
- Nguyen Thi Tuyet Trinh
- Emmanuel Nana Ofori
2016-11-24 1
Agenda
• Introduction NoSQL
• Three Popular NoSQL: Cassandra, MongoDB,
ElasticSearch
• Compare Cassandra vs MongoDB vs
ElasticSearch
• Some NoSQL Changllengs
2016-11-24 2
2016-11-24 3
2016-11-24 4
2016-11-24 5
MongoDB
Introduction to
What is MongoDB ?
• MongoDB is an open-source document
database, and leading NoSQL database.
MongoDB is written in c++
• MongoDB is a cross-platform, document oriented
database that provides, high performance, high
availability, and easy scalability. MongoDB works
on concept of collection and document.
MongoDB - Overview
• Database:
Database is a physical container for collections. Each database gets
its own set of files on the file system. A single MongoDB server
typically has multiple databases.
• Collection
Collection is a group of MongoDB documents. It is the equivalent of
an RDBMS table. A collection exists within a single database.
Collections do not enforce a schema. Documents within a collection
can have different fields. Typically, all documents in a collection are of
similar or related purpose.
MongoDB - Overview
• Document
A document is a set of key-value pairs. Documents have dynamic
schema. Dynamic schema means that documents in the same
collection do not need to have the same set of fields or structure, and
common fields in a collection's documents may hold different types
of data.
MongoDB - Overview
• Below given table shows the relationship of RDBMS
terminology with MongoDB
Sample document
• Below given example shows the document structure of a
blog site which is simply a comma separated key value
pair.
Sample document
• _id is a 12 bytes hexadecimal number which assures the uniqueness
of every document. You can provide _id while inserting the
document. If you didn't provide then MongoDB provide a unique id
for every document. These 12 bytes first 4 bytes for the current
timestamp, next 3 bytes for machine id, next 2 bytes for process id of
mongodb server and remaining 3 bytes are simple incremental value.
Advantages of MongoDB over RDBMS
• Schema less : MongoDB is document database in
which one collection holds different different
documents. Number of fields, content and size of the
document can be differ from one document to
another.
• Structure of a single object is clear
• No complex joins
• Deep query-ability. MongoDB supports dynamic
queries on documents using a document-based query
language that's nearly as powerful as SQL
• Tuning
Advantages of MongoDB over RDBMS
• Ease of scale-out: MongoDB is easy to scale
• Conversion / mapping of application objects to database objects not
needed
• Uses internal memory for storing the (windowed) working set,
enabling faster access of data
Why should use MongoDB?
• Document Oriented Storage : Data is stored in
the form of JSON style documents
• Index on any attribute
• Replication & High Availability
• Auto-Sharding
• Rich Queries
• Fast In-Place Updates
• Professional Support By MongoDB
Where should use MongoDB?
• Big Data
• Content Management and Delivery
• Mobile and Social Infrastructure
• User Data Management
• Data Hub
Not use for?
• Highly Transactional Applications.
• Problems requiring SQL.
Some Companies using MongoDB in Production
Apache Cassandra
BigData
What is Cassandra
2006
2007
2008
What is Cassandra
• Apache Cassandra is an open source, distributed and
decentralized/distributed storage system (database), for managing very
large amounts of structured data spread out across the world. It provides
highly available service with no single point of failure.
• Notable points of Apache Cassandra:
• It is scalable, fault-tolerant, and consistent.
• It is a column-oriented database.
• Its distribution design is based on Amazon’s Dynamo and its data model on Google’s
Bigtable.
• Created at Facebook, it differs sharply from relational database management
systems.
• Cassandra implements a Dynamo-style replication model with no single point of
failure, but adds a more powerful “column family” data model.
• Cassandra is being used by some of the biggest companies such as Facebook,
Twitter, Cisco, Rackspace, ebay, Twitter, Netflix, and more.
Feature of
Cassandra
Elastic
scalability
No Single
Point of
Failure
Scale
Horizontally
(Linear
Availability /
Scale Out)
Flexible data
storage
Easy data
distribution
Peer-to-peer
Architecture
( no primary
secondary)
Fast writes
Architecture of Cassandra
 Cassandra was built from the ground up with the
understanding that hardware and system failures can
and do occur
 Peer-to-peer, distributed system
 All nodes are the same
 Data partitioned among all modes in the cluster
 Custom data replication to ensure fault tolerance
 Read/write anywhere design
Cassandra Model
Component of Cassandra
 Node − It is the place where data is stored.
 Data center − It is a collection of related nodes.
 Cluster − A cluster is a component that contains one or more data centers.
 Commit log − The commit log is a crash-recovery mechanism in Cassandra.
Every write operation is written to the commit log.
 Mem-table − A mem-table is a memory-resident data structure. After
commit log, the data will be written to the mem-table. Sometimes, for a
single-column family, there will be multiple mem-tables.
 SSTable − It is a disk file to which the data is flushed from the mem-table
when its contents reach a threshold value.
 Bloom filter − These are nothing but quick, nondeterministic, algorithms for
testing whether an element is a member of a set. It is a special kind of
cache. Bloom filters are accessed after every query.
Some use case of Cassandra
• Is an earch engine / real-time search(1)
• Is free and open source distributed inverted index created by
shay banon.
• Build on top ofApache Lucene(2) .
• Developed in Java, so inherently cross-platform.
Mozilla, Quora, SoundCloud, GitHub, StackExchange, Center for Open
Science, Reverb, Netflix….
Excellent Query DSL
Example
Why Elastic Search?
Easy to scale (Distributed)
Everything is one JSON call away (RESTful API)
Excellent Query DSL
Support for advanced search features (Full Text)
Configurable and Extensible
Document Oriented
Schema free
Conflict management
 Elastic Search is built to scale horizontally out of
the box. When ever you need to increase
capacity, just add more nodes, and let the cluster
reorganize itself to take advantage of the extra
hardware.
Easy to Scale (Distributed)
RESTful API
 ElasticSearch is API driven. Almost any action can be
performed using a simple RESTful API using JSON
over HTTP. .
 Responses are always in JSON format.
Demo
1. Run elastic search and test in http://localhost:9200/
Response :
{
"status" : 200,
"name" : “elasticsearch",
"version" : {
"number" : "1.3.4",
"build_hash" : "f1585f096d3f3985e73456debdc1a0745f512bbc",
"build_timestamp" : "2015-04-21T14:27:12Z",
"build_snapshot" : false,
"lucene_version" : "4.9"
},
"tagline" : "You Know, for Search"
}
Demo
PUT data : curl -XPUT 'http://localhost:9200/twitter/tweet/1' -d '{"user" : "kimchy"}‘
Searching data: curl -XPUT
'http://localhost:9200/blog/post/_search?q=user:dilbert&pretty'
Feature Cassandra MongoDB ElasticSearch
Model #1 Wide-column store #1 Search engine #1 Document stores
Developer Apache Software MongoDB, Inc Foundation Elastic
Initial Release 2008 2010 2009
Database as a Service no no no
Server operating systems BSD, Linux, OS X,
Windows
All OS with a Java VM Linux, OS X, Solaris,
Windows
Data Schema free free free
Secondary indexes restricted yes yes
SQL no no no
APIs and other access
methods
Proprietary protocol Java API
RESTful HTTP/JSON API
proprietary protocol
using JSON
Server-side scripts no yes JavaScript
Compare Cassandra vs MongoDB vs ElasticSearch
Feature Cassandra MongoDB ElasticSearch
Partitioning methods Sharding Sharding Sharding
Replication methods selectable replication
factor
yes Master-slave replication
MapReduce yes no yes
Consistency concepts Eventual Consistency
Immediate Consistency
Eventual Consistency Eventual Consistency
Immediate Consistency
Foreign keys no no
no typically not used,
however similar
functionality with DBRef
possible
Transaction concepts no no no
Concurrency Support
for concurrent
manipulation of data
yes yes yes
Compare Cassandra vs MongoDB vs ElasticSearch
2016-11-24 34
2016-11-24 35

More Related Content

What's hot

NOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQLNOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQLRamakant Soni
 
NoSQL: Why, When, and How
NoSQL: Why, When, and HowNoSQL: Why, When, and How
NoSQL: Why, When, and HowBigBlueHat
 
MongoDB Replication fundamentals - Desert Code Camp - October 2014
MongoDB Replication fundamentals - Desert Code Camp - October 2014MongoDB Replication fundamentals - Desert Code Camp - October 2014
MongoDB Replication fundamentals - Desert Code Camp - October 2014Avinash Ramineni
 
ElasticSearch for data mining
ElasticSearch for data mining ElasticSearch for data mining
ElasticSearch for data mining William Simms
 
What I learnt: Elastic search & Kibana : introduction, installtion & configur...
What I learnt: Elastic search & Kibana : introduction, installtion & configur...What I learnt: Elastic search & Kibana : introduction, installtion & configur...
What I learnt: Elastic search & Kibana : introduction, installtion & configur...Rahul K Chauhan
 
Introduction to NoSQL Databases
Introduction to NoSQL DatabasesIntroduction to NoSQL Databases
Introduction to NoSQL DatabasesDerek Stainer
 
Non relational databases-no sql
Non relational databases-no sqlNon relational databases-no sql
Non relational databases-no sqlRam kumar
 
NoSQL Databases
NoSQL DatabasesNoSQL Databases
NoSQL DatabasesBADR
 
Elasticsearch Arcihtecture & What's New in Version 5
Elasticsearch Arcihtecture & What's New in Version 5Elasticsearch Arcihtecture & What's New in Version 5
Elasticsearch Arcihtecture & What's New in Version 5Burak TUNGUT
 
Relational and non relational database 7
Relational and non relational database 7Relational and non relational database 7
Relational and non relational database 7abdulrahmanhelan
 

What's hot (20)

NOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQLNOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQL
 
NoSQL and MongoDB
NoSQL and MongoDBNoSQL and MongoDB
NoSQL and MongoDB
 
No sql
No sqlNo sql
No sql
 
NoSQL: Why, When, and How
NoSQL: Why, When, and HowNoSQL: Why, When, and How
NoSQL: Why, When, and How
 
BigData, NoSQL & ElasticSearch
BigData, NoSQL & ElasticSearchBigData, NoSQL & ElasticSearch
BigData, NoSQL & ElasticSearch
 
Introduction to NoSQL
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQL
 
Selecting best NoSQL
Selecting best NoSQL Selecting best NoSQL
Selecting best NoSQL
 
Elasticsearch 5.0
Elasticsearch 5.0Elasticsearch 5.0
Elasticsearch 5.0
 
MongoDB Replication fundamentals - Desert Code Camp - October 2014
MongoDB Replication fundamentals - Desert Code Camp - October 2014MongoDB Replication fundamentals - Desert Code Camp - October 2014
MongoDB Replication fundamentals - Desert Code Camp - October 2014
 
Relational vs. Non-Relational
Relational vs. Non-RelationalRelational vs. Non-Relational
Relational vs. Non-Relational
 
ElasticSearch for data mining
ElasticSearch for data mining ElasticSearch for data mining
ElasticSearch for data mining
 
Nosql databases
Nosql databasesNosql databases
Nosql databases
 
What I learnt: Elastic search & Kibana : introduction, installtion & configur...
What I learnt: Elastic search & Kibana : introduction, installtion & configur...What I learnt: Elastic search & Kibana : introduction, installtion & configur...
What I learnt: Elastic search & Kibana : introduction, installtion & configur...
 
Key-Value NoSQL Database
Key-Value NoSQL DatabaseKey-Value NoSQL Database
Key-Value NoSQL Database
 
Introduction to NoSQL Databases
Introduction to NoSQL DatabasesIntroduction to NoSQL Databases
Introduction to NoSQL Databases
 
Elasticsearch Introduction
Elasticsearch IntroductionElasticsearch Introduction
Elasticsearch Introduction
 
Non relational databases-no sql
Non relational databases-no sqlNon relational databases-no sql
Non relational databases-no sql
 
NoSQL Databases
NoSQL DatabasesNoSQL Databases
NoSQL Databases
 
Elasticsearch Arcihtecture & What's New in Version 5
Elasticsearch Arcihtecture & What's New in Version 5Elasticsearch Arcihtecture & What's New in Version 5
Elasticsearch Arcihtecture & What's New in Version 5
 
Relational and non relational database 7
Relational and non relational database 7Relational and non relational database 7
Relational and non relational database 7
 

Viewers also liked

پروژه هایی با تکرارهای ولایی قرآن
 پروژه هایی با تکرارهای ولایی قرآن پروژه هایی با تکرارهای ولایی قرآن
پروژه هایی با تکرارهای ولایی قرآنAli Dalili
 
Tieng anh 4 unit 6 my school lesson 1
Tieng anh 4 unit 6 my school lesson 1Tieng anh 4 unit 6 my school lesson 1
Tieng anh 4 unit 6 my school lesson 1bang chau
 
Innovations in Prevention: Youth Substance Abuse & Dating Violence
Innovations in Prevention: Youth Substance Abuse & Dating ViolenceInnovations in Prevention: Youth Substance Abuse & Dating Violence
Innovations in Prevention: Youth Substance Abuse & Dating ViolenceChristine Wekerle
 
Mit nyújthatnak a videójátékok az oktatásnak?
Mit nyújthatnak a videójátékok az oktatásnak?Mit nyújthatnak a videójátékok az oktatásnak?
Mit nyújthatnak a videójátékok az oktatásnak?Hajba László Hajba
 
Research potential of Warsaw in international scientific networks
Research potential of Warsaw in international scientific networksResearch potential of Warsaw in international scientific networks
Research potential of Warsaw in international scientific networksAdam Ploszaj
 
Ligia judith trujillo caro 63487485
Ligia judith trujillo caro 63487485Ligia judith trujillo caro 63487485
Ligia judith trujillo caro 63487485Diego Hernández
 
Publicidad 2
Publicidad 2Publicidad 2
Publicidad 2dp10306
 
Unit v ( digestive system)
Unit v ( digestive system)Unit v ( digestive system)
Unit v ( digestive system)QORYANI
 
Trabajo final desarrollo nacional (Provincia de los santos)
Trabajo final desarrollo nacional (Provincia de los santos)Trabajo final desarrollo nacional (Provincia de los santos)
Trabajo final desarrollo nacional (Provincia de los santos)Tulia Torres
 
Educational Achievement among Child Welfare Youth: The Maltreatment and Adole...
Educational Achievement among Child Welfare Youth: The Maltreatment and Adole...Educational Achievement among Child Welfare Youth: The Maltreatment and Adole...
Educational Achievement among Child Welfare Youth: The Maltreatment and Adole...Christine Wekerle
 

Viewers also liked (15)

پروژه هایی با تکرارهای ولایی قرآن
 پروژه هایی با تکرارهای ولایی قرآن پروژه هایی با تکرارهای ولایی قرآن
پروژه هایی با تکرارهای ولایی قرآن
 
Tieng anh 4 unit 6 my school lesson 1
Tieng anh 4 unit 6 my school lesson 1Tieng anh 4 unit 6 my school lesson 1
Tieng anh 4 unit 6 my school lesson 1
 
Innovations in Prevention: Youth Substance Abuse & Dating Violence
Innovations in Prevention: Youth Substance Abuse & Dating ViolenceInnovations in Prevention: Youth Substance Abuse & Dating Violence
Innovations in Prevention: Youth Substance Abuse & Dating Violence
 
Mit nyújthatnak a videójátékok az oktatásnak?
Mit nyújthatnak a videójátékok az oktatásnak?Mit nyújthatnak a videójátékok az oktatásnak?
Mit nyújthatnak a videójátékok az oktatásnak?
 
Guia metadatos
Guia metadatosGuia metadatos
Guia metadatos
 
Research potential of Warsaw in international scientific networks
Research potential of Warsaw in international scientific networksResearch potential of Warsaw in international scientific networks
Research potential of Warsaw in international scientific networks
 
Ligia judith trujillo caro 63487485
Ligia judith trujillo caro 63487485Ligia judith trujillo caro 63487485
Ligia judith trujillo caro 63487485
 
Publicidad 2
Publicidad 2Publicidad 2
Publicidad 2
 
Unit v ( digestive system)
Unit v ( digestive system)Unit v ( digestive system)
Unit v ( digestive system)
 
Trabajo final desarrollo nacional (Provincia de los santos)
Trabajo final desarrollo nacional (Provincia de los santos)Trabajo final desarrollo nacional (Provincia de los santos)
Trabajo final desarrollo nacional (Provincia de los santos)
 
Pdf slideshare
Pdf slidesharePdf slideshare
Pdf slideshare
 
Compartimos todo
Compartimos todoCompartimos todo
Compartimos todo
 
Educational Achievement among Child Welfare Youth: The Maltreatment and Adole...
Educational Achievement among Child Welfare Youth: The Maltreatment and Adole...Educational Achievement among Child Welfare Youth: The Maltreatment and Adole...
Educational Achievement among Child Welfare Youth: The Maltreatment and Adole...
 
Week1
Week1Week1
Week1
 
1565 1995 ruido-ocupacional
1565 1995 ruido-ocupacional1565 1995 ruido-ocupacional
1565 1995 ruido-ocupacional
 

Similar to No sq lv1_0

Klevis Mino: MongoDB
Klevis Mino: MongoDBKlevis Mino: MongoDB
Klevis Mino: MongoDBCarlo Vaccari
 
NoSql Data Management
NoSql Data ManagementNoSql Data Management
NoSql Data Managementsameerfaizan
 
Big Data technology Landscape
Big Data technology LandscapeBig Data technology Landscape
Big Data technology LandscapeShivanandaVSeeri
 
Introduction to NoSQL
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQLbalwinders
 
Presentation of Apache Cassandra
Presentation of Apache Cassandra Presentation of Apache Cassandra
Presentation of Apache Cassandra Nikiforos Botis
 
Compare DynamoDB vs. MongoDB
Compare DynamoDB vs. MongoDBCompare DynamoDB vs. MongoDB
Compare DynamoDB vs. MongoDBAmar Das
 
Dynamo vs Mongo
Dynamo vs MongoDynamo vs Mongo
Dynamo vs MongoAmar Das
 
Mongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorialMongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorialMohan Rathour
 
Couchbase - Yet Another Introduction
Couchbase - Yet Another IntroductionCouchbase - Yet Another Introduction
Couchbase - Yet Another IntroductionKelum Senanayake
 
ElasticSearch: Distributed Multitenant NoSQL Datastore and Search Engine
ElasticSearch: Distributed Multitenant NoSQL Datastore and Search EngineElasticSearch: Distributed Multitenant NoSQL Datastore and Search Engine
ElasticSearch: Distributed Multitenant NoSQL Datastore and Search EngineDaniel N
 
Scaling MongoDB - Presentation at MTP
Scaling MongoDB - Presentation at MTPScaling MongoDB - Presentation at MTP
Scaling MongoDB - Presentation at MTPdarkdata
 
NoSQL Introduction, Theory, Implementations
NoSQL Introduction, Theory, ImplementationsNoSQL Introduction, Theory, Implementations
NoSQL Introduction, Theory, ImplementationsFirat Atagun
 
Introduction to mongodb
Introduction to mongodbIntroduction to mongodb
Introduction to mongodbMohammed Ragab
 

Similar to No sq lv1_0 (20)

MongoDB
MongoDBMongoDB
MongoDB
 
Klevis Mino: MongoDB
Klevis Mino: MongoDBKlevis Mino: MongoDB
Klevis Mino: MongoDB
 
NoSql Data Management
NoSql Data ManagementNoSql Data Management
NoSql Data Management
 
Big Data technology Landscape
Big Data technology LandscapeBig Data technology Landscape
Big Data technology Landscape
 
Introduction to NoSQL
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQL
 
Presentation of Apache Cassandra
Presentation of Apache Cassandra Presentation of Apache Cassandra
Presentation of Apache Cassandra
 
Compare DynamoDB vs. MongoDB
Compare DynamoDB vs. MongoDBCompare DynamoDB vs. MongoDB
Compare DynamoDB vs. MongoDB
 
Dynamo vs Mongo
Dynamo vs MongoDynamo vs Mongo
Dynamo vs Mongo
 
NOSQL
NOSQLNOSQL
NOSQL
 
NoSQL_Night
NoSQL_NightNoSQL_Night
NoSQL_Night
 
Nosql
NosqlNosql
Nosql
 
Mongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorialMongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorial
 
NOsql Presentation.pdf
NOsql Presentation.pdfNOsql Presentation.pdf
NOsql Presentation.pdf
 
NoSql Databases
NoSql DatabasesNoSql Databases
NoSql Databases
 
Couchbase - Yet Another Introduction
Couchbase - Yet Another IntroductionCouchbase - Yet Another Introduction
Couchbase - Yet Another Introduction
 
Mongo db
Mongo dbMongo db
Mongo db
 
ElasticSearch: Distributed Multitenant NoSQL Datastore and Search Engine
ElasticSearch: Distributed Multitenant NoSQL Datastore and Search EngineElasticSearch: Distributed Multitenant NoSQL Datastore and Search Engine
ElasticSearch: Distributed Multitenant NoSQL Datastore and Search Engine
 
Scaling MongoDB - Presentation at MTP
Scaling MongoDB - Presentation at MTPScaling MongoDB - Presentation at MTP
Scaling MongoDB - Presentation at MTP
 
NoSQL Introduction, Theory, Implementations
NoSQL Introduction, Theory, ImplementationsNoSQL Introduction, Theory, Implementations
NoSQL Introduction, Theory, Implementations
 
Introduction to mongodb
Introduction to mongodbIntroduction to mongodb
Introduction to mongodb
 

Recently uploaded

Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Association for Project Management
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operationalssuser3e220a
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsPooky Knightsmith
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataBabyAnnMotar
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWQuiz Club NITW
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...DhatriParmar
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQuiz Club NITW
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationdeepaannamalai16
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdfMr Bounab Samir
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxMichelleTuguinay1
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 

Recently uploaded (20)

Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operational
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young minds
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped data
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITW
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentation
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdf
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 

No sq lv1_0

  • 1. NoSQL Technologies Lecturer: Dr. Nguyen Binh Minh Students: - Pham Anh Doi - Nguyen Quang Huy - Nguyen Hai Nam - Luong Anh Tuan - Pham Duc Thang - Nguyen Thi Tuyet Trinh - Emmanuel Nana Ofori 2016-11-24 1
  • 2. Agenda • Introduction NoSQL • Three Popular NoSQL: Cassandra, MongoDB, ElasticSearch • Compare Cassandra vs MongoDB vs ElasticSearch • Some NoSQL Changllengs 2016-11-24 2
  • 7. What is MongoDB ? • MongoDB is an open-source document database, and leading NoSQL database. MongoDB is written in c++ • MongoDB is a cross-platform, document oriented database that provides, high performance, high availability, and easy scalability. MongoDB works on concept of collection and document.
  • 8. MongoDB - Overview • Database: Database is a physical container for collections. Each database gets its own set of files on the file system. A single MongoDB server typically has multiple databases. • Collection Collection is a group of MongoDB documents. It is the equivalent of an RDBMS table. A collection exists within a single database. Collections do not enforce a schema. Documents within a collection can have different fields. Typically, all documents in a collection are of similar or related purpose.
  • 9. MongoDB - Overview • Document A document is a set of key-value pairs. Documents have dynamic schema. Dynamic schema means that documents in the same collection do not need to have the same set of fields or structure, and common fields in a collection's documents may hold different types of data.
  • 10. MongoDB - Overview • Below given table shows the relationship of RDBMS terminology with MongoDB
  • 11. Sample document • Below given example shows the document structure of a blog site which is simply a comma separated key value pair.
  • 12. Sample document • _id is a 12 bytes hexadecimal number which assures the uniqueness of every document. You can provide _id while inserting the document. If you didn't provide then MongoDB provide a unique id for every document. These 12 bytes first 4 bytes for the current timestamp, next 3 bytes for machine id, next 2 bytes for process id of mongodb server and remaining 3 bytes are simple incremental value.
  • 13. Advantages of MongoDB over RDBMS • Schema less : MongoDB is document database in which one collection holds different different documents. Number of fields, content and size of the document can be differ from one document to another. • Structure of a single object is clear • No complex joins • Deep query-ability. MongoDB supports dynamic queries on documents using a document-based query language that's nearly as powerful as SQL • Tuning
  • 14. Advantages of MongoDB over RDBMS • Ease of scale-out: MongoDB is easy to scale • Conversion / mapping of application objects to database objects not needed • Uses internal memory for storing the (windowed) working set, enabling faster access of data
  • 15. Why should use MongoDB? • Document Oriented Storage : Data is stored in the form of JSON style documents • Index on any attribute • Replication & High Availability • Auto-Sharding • Rich Queries • Fast In-Place Updates • Professional Support By MongoDB
  • 16. Where should use MongoDB? • Big Data • Content Management and Delivery • Mobile and Social Infrastructure • User Data Management • Data Hub
  • 17. Not use for? • Highly Transactional Applications. • Problems requiring SQL. Some Companies using MongoDB in Production
  • 20. What is Cassandra • Apache Cassandra is an open source, distributed and decentralized/distributed storage system (database), for managing very large amounts of structured data spread out across the world. It provides highly available service with no single point of failure. • Notable points of Apache Cassandra: • It is scalable, fault-tolerant, and consistent. • It is a column-oriented database. • Its distribution design is based on Amazon’s Dynamo and its data model on Google’s Bigtable. • Created at Facebook, it differs sharply from relational database management systems. • Cassandra implements a Dynamo-style replication model with no single point of failure, but adds a more powerful “column family” data model. • Cassandra is being used by some of the biggest companies such as Facebook, Twitter, Cisco, Rackspace, ebay, Twitter, Netflix, and more.
  • 21. Feature of Cassandra Elastic scalability No Single Point of Failure Scale Horizontally (Linear Availability / Scale Out) Flexible data storage Easy data distribution Peer-to-peer Architecture ( no primary secondary) Fast writes
  • 22. Architecture of Cassandra  Cassandra was built from the ground up with the understanding that hardware and system failures can and do occur  Peer-to-peer, distributed system  All nodes are the same  Data partitioned among all modes in the cluster  Custom data replication to ensure fault tolerance  Read/write anywhere design
  • 24. Component of Cassandra  Node − It is the place where data is stored.  Data center − It is a collection of related nodes.  Cluster − A cluster is a component that contains one or more data centers.  Commit log − The commit log is a crash-recovery mechanism in Cassandra. Every write operation is written to the commit log.  Mem-table − A mem-table is a memory-resident data structure. After commit log, the data will be written to the mem-table. Sometimes, for a single-column family, there will be multiple mem-tables.  SSTable − It is a disk file to which the data is flushed from the mem-table when its contents reach a threshold value.  Bloom filter − These are nothing but quick, nondeterministic, algorithms for testing whether an element is a member of a set. It is a special kind of cache. Bloom filters are accessed after every query.
  • 25. Some use case of Cassandra
  • 26. • Is an earch engine / real-time search(1) • Is free and open source distributed inverted index created by shay banon. • Build on top ofApache Lucene(2) . • Developed in Java, so inherently cross-platform. Mozilla, Quora, SoundCloud, GitHub, StackExchange, Center for Open Science, Reverb, Netflix….
  • 28. Why Elastic Search? Easy to scale (Distributed) Everything is one JSON call away (RESTful API) Excellent Query DSL Support for advanced search features (Full Text) Configurable and Extensible Document Oriented Schema free Conflict management
  • 29.  Elastic Search is built to scale horizontally out of the box. When ever you need to increase capacity, just add more nodes, and let the cluster reorganize itself to take advantage of the extra hardware. Easy to Scale (Distributed) RESTful API  ElasticSearch is API driven. Almost any action can be performed using a simple RESTful API using JSON over HTTP. .  Responses are always in JSON format.
  • 30. Demo 1. Run elastic search and test in http://localhost:9200/ Response : { "status" : 200, "name" : “elasticsearch", "version" : { "number" : "1.3.4", "build_hash" : "f1585f096d3f3985e73456debdc1a0745f512bbc", "build_timestamp" : "2015-04-21T14:27:12Z", "build_snapshot" : false, "lucene_version" : "4.9" }, "tagline" : "You Know, for Search" }
  • 31. Demo PUT data : curl -XPUT 'http://localhost:9200/twitter/tweet/1' -d '{"user" : "kimchy"}‘ Searching data: curl -XPUT 'http://localhost:9200/blog/post/_search?q=user:dilbert&pretty'
  • 32. Feature Cassandra MongoDB ElasticSearch Model #1 Wide-column store #1 Search engine #1 Document stores Developer Apache Software MongoDB, Inc Foundation Elastic Initial Release 2008 2010 2009 Database as a Service no no no Server operating systems BSD, Linux, OS X, Windows All OS with a Java VM Linux, OS X, Solaris, Windows Data Schema free free free Secondary indexes restricted yes yes SQL no no no APIs and other access methods Proprietary protocol Java API RESTful HTTP/JSON API proprietary protocol using JSON Server-side scripts no yes JavaScript Compare Cassandra vs MongoDB vs ElasticSearch
  • 33. Feature Cassandra MongoDB ElasticSearch Partitioning methods Sharding Sharding Sharding Replication methods selectable replication factor yes Master-slave replication MapReduce yes no yes Consistency concepts Eventual Consistency Immediate Consistency Eventual Consistency Eventual Consistency Immediate Consistency Foreign keys no no no typically not used, however similar functionality with DBRef possible Transaction concepts no no no Concurrency Support for concurrent manipulation of data yes yes yes Compare Cassandra vs MongoDB vs ElasticSearch