SlideShare ist ein Scribd-Unternehmen logo
1 von 76
Mongo Database
The Right database to
fit your data
{“author”:”kirankumar”}
The Right database to
fit your Development
The Right database
for
Scale and
Performance
NO SQL
{“author”:”kirankumar”}
NoSQL
Defining Characteristics
– Scaling out on commodity hardware
– Aggregate structure
– Schema-less attitude
– Impedance Mismatch : Relational model in-memory data
structures
– Big Data : Massive data being stored and transacted
– Reduced Data Management and Tuning Requirements
– Eventually consistent / BASE (not ACID)
NoSQL databases are little different than conventional databases (in terms of storage,
reterival, performance, scalability, security, accuracy. They are widely used in web applications
(like storing website cache so that results can be fetched on search, for example google).
Conventional databases involves storing rows (tables) and then multiple tables might be
joined to fetch results for required query. In NoSQL solution data might be stored based on
columns or key/value pair.
Performance is better in NoSQL databases (again depends how it’s used and setup). To
improve performance of conventional databases hardware or database optimization will be
required.
Understanding NO SQL
• Mongo DB is an open source project.
• On Github
• Licensed under the AGPL
• Started and Sponsored by Mongo DB Inc( Formely Know
as 10gen)
Open source
Mongo DB Evolution
History of the Database
• 1960’s – Hierarchical and Network type (IMS and CODASYL)
• 1970’s – Beginnings of theory behind relational model. Codd
• 1980’s – Rise of the relational model. SQL. E/R Model (Chen)
• 1990’s – Access/Excel and MySQL. ODMS began to appear
• 2000;’s – Two forces; large enterprise and open source. Google and
Amazon. CAP Theorem (more on that to come…)
• 2010’s – Immergence of NoSQL as an industry player and viable
alternative
Database Landscape
{“author”:”kirankumar”}
Why MongoDB
• Intrinsic support for agile development
• Super low latency access to your data
• Very little CPU overhead
• No Additional caching layer required
• Built in Replication and Horizontal Scaling support
{“author”:”kirankumar”}
● A document is the basic unit of data for MongoDB, roughly
equivalent to a row in arelational database management system
(but much more expressive).
● Similarly, a collection can be thought of as the schema-free
equivalent of a table.
● A single instance of MongoDB can host multiple independent
databases, each of which can have its own collections and
permissions.
● MongoDB comes with a simple but powerful JavaScript shell,
which is useful for the administration of MongoDB instances and
data manipulation.
Overview on Mongo DB
10gen is the company behind MongoDB.
Set the direction &
contribute code to
MongoDB
Foster community &
ecosystem
Provide MongoDB
management services
Provide commercial
services
Founded in 2007
• Dwight Merriman, Eliot Horowitz
• Doubleclick, Oracle, Marklogic, HP
$73M+ in Funding
• Flybridge, Sequoia, NEA, Union Square
Worldwide Expanding Team
• 140+ employees
• NY, Palo Alto, London, Dublin, Sydney
{“author”:”kirankumar”}
Terminology
RDBMS Mongo
Table, View Collection
Row(s) JSON Document
Index Index
Join Embedded
Document
Partition Shard
Partition Key Shard Key
MongoDB is Easy to Use
{
title: ‘MongoDB’,
contributors: [
{ name: ‘Eliot Horowitz’,
email: ‘eliot@10gen.com’ },
{ name: ‘Dwight Merriman’,
email: ‘dwight@10gen.com’ }
],
model: {
relational: false,
awesome: true
}
}
• Written in C++
• Extensive use of memory-mapped files
i.e. read-through write-through memory caching.
• Runs nearly everywhere
• Data serialized as BSON (fast parsing)
• Full support for primary & secondary indexes
• Document model = less work
High Performance
{“author”:”kirankumar”}
Performance
High Availability
Communication
Communication
Replica set communication breaks down
{“author”:”kirankumar”}
Replica set -Failure
{“author”:”kirankumar”}
Primary Election
Replica set -Recovery
{“author”:”kirankumar”}
Document
• At its simplest form, Mongo is a document oriented database
• MongoDB stores all data in documents, which are JSON-style data
structures composed of field-and-value pairs.
• MongoDB stores documents on disk in the BSON serialization format.
BSON is a binary representation of JSON documents. BSON contains more
data types than does JSON.
• ** For in-depth BSON information, see bsonspec.org.
NOSQL Intro & MongoDB 28{“author”:”kirankumar”}
What does a Document Look Like
• {
• "_id" : "52a602280f2e642811ce8478",
• "ratingCode" : "PG13",
• "country" : "USA",
• "entityType" : "Rating”
• }
NOSQL Intro & MongoDB 29
Rules for a document
• Documents have the following rules:
• The maximum BSON document size is 16 megabytes.
• The field name _id is reserved for use as a primary key; its value must
be unique in the collection.
• The field names cannot start with the $ character.
• The field names cannot contain the . character.
NOSQL Intro & MongoDB 30
BSON
• JSON has powerful, but limited set of datatypes
• Mongo extends datypes with Date, Int types, Id, …
• MongoDB stores data in BSON
• BSON is a binary representation of JSON
• Optimized for performance and navigational abilities
• Also compression
• See bsonspec.org
Mongo Install
• Windows
• http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/
• MAC
• http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/
• Create Data Directory , Defaults
• C:datadb
• /data/db/ (make sure have permissions)
• Or can set using -dbpath
• C:mongodbbinmongod.exe --dbpath d:testmongodbdata
NOSQL Intro & MongoDB 33{“author”:”kirankumar”}
Start IT!
• Database
• mongod
•
• Shell
• mongo
• show dbs
• show collections
• db.stats()
NOSQL Intro & MongoDB 34{“author”:”kirankumar”}
Basic Operations
• 1_simpleinsert.txt
• Insert
• Find
• Find all
• Find One
• Find with criteria
• Indexes
• Explain()
NOSQL Intro & MongoDB 35{“author”:”kirankumar”}
More Mongo Shell
• 2_arrays_sort.txt
• Embedded documents
• Limit, Sort
• Using regex in query
• Removing documents
• Drop collection
NOSQL Intro & MongoDB 36
Import / Export
• 3_imp_exp.txt
• Mongo provides tools for getting data in and out of the database
• Data Can Be Exported to json files
• Json files can then be Imported
NOSQL Intro & MongoDB 37{“author”:”kirankumar”}
Import / Export
• 3_imp_exp.txt
• Mongo provides tools for getting data in and out of the database
• Data Can Be Exported to json files
• Json files can then be Imported
NOSQL Intro & MongoDB 38{“author”:”kirankumar”}
Conditional Operators
• 4_cond_ops.txt
• $lt
• $gt
• $gte
• $lte
• $or
• Also $not, $exists, $type, $in
• (for $type refer to
http://docs.mongodb.org/manual/reference/operator/query/type/#_S_typ
e )
NOSQL Intro & MongoDB 39{“author”:”kirankumar”}
Admin Commands
• 5_admin.txt
• how dbs
• show collections
• db.stats()
• db.posts.stats()
• db.posts.drop()
• db.system.indexes.find()
NOSQL Intro & MongoDB 40{“author”:”kirankumar”}
Data MODELING
• Remember with NoSql redundancy is not evil
• Applications insure consistency, not the DB
• Application join data, not defined in the DB
• Datamodel is schema-less
• Datamodel is built to support queries usually
NOSQL Intro & MongoDB 41{“author”:”kirankumar”}
Questions to ask
• Your basic units of data (what would be a document)?
• How are these units grouped / related?
• How does Mongo let you query this data, what are the options?
• Finally, maybe most importantly, what are your applications access patterns?
• Reads vs. writes
• Queries
• Updates
• Deletions
• How structured is it
NOSQL Intro & MongoDB 42{“author”:”kirankumar”}
Data Model - Normalized
• Normalized
• Similar to relational model.
• One collection per entity type
• Little or no redundancy
• Allows clean updates, familiar to many SQL users, easier to understand
NOSQL Intro & MongoDB 43{“author”:”kirankumar”}
Other considerations For Data Modeling
• Many or few collections
• Many Collections
• As seen in normalized
• Clean and little redundancy
• May not provide best performance
• May require frequent updates to application if new types added
• Multiple Collections
• Middle ground, partially normalized
• Not many collections
• One large generic collection
• Contains many types
• Use type field
NOSQL Intro & MongoDB 44{“author”:”kirankumar”}
Consideration Continued
• Document Growth – will relocate if exceeds allocated size
• Atomicity
• Atomic at document level
• Consideration for insertions, remove and multi-document updates
• Sharding – collections distributed across mongod instances, uses a shard key
• Indexes – index fields often queries, indexes affect write performance slightly
• Consider using TTL to automatically expire documents
NOSQL Intro & MongoDB 45{“author”:”kirankumar”}
Integrated Search
{“author”:”kirankumar”}
Text Search
• Now production-ready
• Integrated with query engine
• Integrated with aggregation framework
• Multi-language document support
{“author”:”kirankumar”}
Features
• Language-specific tokenization and stemming
• Stop words
• Relevance ranking
• Field boosting
Supported Languages
da – Danish en – English
nl – Dutch fi – Finish
fr – French de – German
hu – Hungarian it – Italian
no – Norwegian pt – Portuguese
ro – Romanian ru – Russian
es – Spanish sv – Swedish
tr - Turkish
{“author”:”kirankumar”}
Integrated within find()
{“author”:”kirankumar”}
More Text Examples
{“author”:”kirankumar”}
Relevance
{“author”:”kirankumar”}
Forcing a Language
Query System Improvements
Query System Improvements
• Index Intersection
• Aggregation Framework
• New Update Operators
Index Intersection
• Simpler ad-hoc queries
• Existing indexes can be combined to optimize a query
– Less Index Maintenance
– Smaller Working Set
– Lower Write Overhead
– MoreAdaptive
– Able to control potential intersections using QueryShape
Index Intersection
New Update Operators
• $mul
• $min/$max
• $bit
• $currentDate
• New modifiers for $push
Security
Security
• Authentication with LDAP (Enterprise only)
• x.509 Certificates
• User defined roles
• Collection level security
• Auditing (Enterprise only)
• Windows Kerberos Support
State of Security in MongoDB 2.6
• Authentication
– Who are you?
– X.509 authentication and Kerberos
• Authorization
– What can you do?
– User Defined Roles, Collection-levelAccess Control
• Auditing
– What have you done?
– DDL, User Manipulation,Authorization failure
Roles and Collection-level Security
{“author”:”kirankumar”}
Auditing
• Schema actions
• Replica Set actions
• Authentication &Authorization actions
• Other actions
{“author”:”kirankumar”}
Auditing – Dropping a collection
{“author”:”kirankumar”}
Auditing – Shutting down the server
{“author”:”kirankumar”}
•Cost
It's free, open source. Can has more scale? Just add hardware. Licensing costs need not apply (can run on Linux)
.
•Schema-less
If you need to support a flexible schema, MongoDB's document storage is a big plus. It doesn't mean you don't
need to think about schema at all, it just means you can very easily model data of this nature and cope with
changes without headaches.
•Quick start & fast learning
Mongodb was quick and easy. There was no entry barrier. I can't fault how quick and easy it was to get up and
running with the basics. Hacking around to pick up the more advanced stuff was also a pretty painless exercise
too. Using the C# driver has been a largely very positive and intuitive experience.
•Replica sets
Configuring is simple, making scaling reads and failover pretty effortless. Want more redundancy or scaling of
reads? Fire up another machine, add to the set and away you go.
Mongo DB Pros
•Auto Sharding
Again, configuring is simple. You do need to give very careful consideration to this up front when deciding on what
keys you want to shard on. Once you've done that, sharding "just does it's stuff".
•Community
It has a good community behind it and that IMHO is very important. I don't like sitting in a cupboard on my own
with the lights off. I like being a part of a bigger community - to learn from, work through issues with and to
contribute back to.
•Rapidly evolving
MongoDB is rapidly changing and it's good to see bugs are being tracked and fixed in good time. There is also a
fast flowing feature enhancement pipeline too, so you typically don't have to wait for a long time to get
something.
•Choose your consistency
You can choose to have data replicated to a configurable number of replicas before returning if you wish to have
stronger level of consistency. Depends on what value you put on certain bits of data, but the choice is yours. So
you can trade off performance for consistency.
Mongo DB Pros
• Data size in MongoDB is typically higher due to e.g. each document has field
names stored it
• less flexibity with querying (e.g. no JOINs)
• no support for transactions - certain atomic operations are supported, at a
single document level
• at the moment Map/Reduce (e.g. to do aggregations/data analysis) is OK, but
not blisteringly fast. So if that's required, something like Hadoop may need to
be added into the mix
• less up to date information available/fast evolving product
Mongo DB cons
Design decisions with Mongo
• Agile incremental releases
• Unstructured data from multiple suppliers
• GridFS : Stores large binary objects
• Spring Data Services
• Embedding and linking documents
• Easy replication set up for AWS
Books
MongoDB: The Definitive Guide, 2nd Edition
By: Kristina Chodorow
Publisher: O'Reilly Media, Inc.
Pub. Date: May 23, 2013
Print ISBN-13: 978-1-4493-4468-9
Pages in Print Edition: 432
MongoDB in Action
By: Kyle Banker
Publisher: Manning Publications
Pub. Date: December 16, 2011
Print ISBN-10: 1-935182-87-0
Print ISBN-13: 978-1-935182-87-0
Pages in Print Edition: 312
The Definitive Guide to MongoDB: The NoSQL Database for Cloud and Desktop Computing
By Eelco Plugge; Peter Membrey; Tim Hawkins
Apress, September 2010
ISBN: 9781430230519
327 pages
NOSQL Intro & MongoDB 70{“author”:”kirankumar”}
Books Cont.
MongoDB Applied Design Patterns
By: Rick Copeland
Publisher: O'Reilly Media, Inc.
Pub. Date: March 18, 2013
Print ISBN-13: 978-1-4493-4004-9
Pages in Print Edition: 176
MongoDB for Web Development (rough cut!)
By: Mitch Pirtle
Publisher: Addison-Wesley Professional
Last Updated: 14-JUN-2013
Pub. Date: March 11, 2015 (Estimated)
Print ISBN-10: 0-321-70533-5
Print ISBN-13: 978-0-321-70533-4
Pages in Print Edition: 360
Instant MongoDB
By: Amol Nayak;
Publisher: Packt Publishing
Pub. Date: July 26, 2013
Print ISBN-13: 978-1-78216-970-3
Pages in Print Edition: 72
NOSQL Intro & MongoDB 71{“author”:”kirankumar”}
Important Sites
• http://www.mongodb.org/
• https://mongolab.com/welcome/
• https://education.mongodb.com/
• http://blog.mongodb.org/
• http://stackoverflow.com/questions/tagged/mongodb
• http://bitnami.com/stack/mean
NOSQL Intro & MongoDB 72
{“author”:”kirankumar”}
{“author”:”kirankumar”}
For more details
{“Linked In” : “in.linkedin.com/pub/kiran-kumar-matam/2b/239/91b/”}
{“catchme on”:
[
{“name” : “kirankumar”,
“website” : [
“techincal”:”www.javaquestionbank.net”,
“personal” :www.matamkirankumar.com ],
“twitter : ” @matamkiran11”
}
]
}
Thank you 

Weitere ähnliche Inhalte

Was ist angesagt?

MongoDB Schema Design
MongoDB Schema DesignMongoDB Schema Design
MongoDB Schema DesignMongoDB
 
The Basics of MongoDB
The Basics of MongoDBThe Basics of MongoDB
The Basics of MongoDBvaluebound
 
Introduction to MongoDB.pptx
Introduction to MongoDB.pptxIntroduction to MongoDB.pptx
Introduction to MongoDB.pptxSurya937648
 
Mongodb introduction and_internal(simple)
Mongodb introduction and_internal(simple)Mongodb introduction and_internal(simple)
Mongodb introduction and_internal(simple)Kai Zhao
 
Webinar: MongoDB Schema Design and Performance Implications
Webinar: MongoDB Schema Design and Performance ImplicationsWebinar: MongoDB Schema Design and Performance Implications
Webinar: MongoDB Schema Design and Performance ImplicationsMongoDB
 
Introducing MongoDB Atlas
Introducing MongoDB AtlasIntroducing MongoDB Atlas
Introducing MongoDB AtlasMongoDB
 
An Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDBAn Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDBLee Theobald
 
Webinar: When to Use MongoDB
Webinar: When to Use MongoDBWebinar: When to Use MongoDB
Webinar: When to Use MongoDBMongoDB
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBMike Dirolf
 
MongoDB Performance Tuning
MongoDB Performance TuningMongoDB Performance Tuning
MongoDB Performance TuningPuneet Behl
 
MongoDB Atlas
MongoDB AtlasMongoDB Atlas
MongoDB AtlasMongoDB
 

Was ist angesagt? (20)

MongoDB Schema Design
MongoDB Schema DesignMongoDB Schema Design
MongoDB Schema Design
 
MongoDB
MongoDBMongoDB
MongoDB
 
MongoDB
MongoDBMongoDB
MongoDB
 
MongoDB 101
MongoDB 101MongoDB 101
MongoDB 101
 
The Basics of MongoDB
The Basics of MongoDBThe Basics of MongoDB
The Basics of MongoDB
 
Introduction to MongoDB.pptx
Introduction to MongoDB.pptxIntroduction to MongoDB.pptx
Introduction to MongoDB.pptx
 
An introduction to MongoDB
An introduction to MongoDBAn introduction to MongoDB
An introduction to MongoDB
 
Mongodb introduction and_internal(simple)
Mongodb introduction and_internal(simple)Mongodb introduction and_internal(simple)
Mongodb introduction and_internal(simple)
 
Webinar: MongoDB Schema Design and Performance Implications
Webinar: MongoDB Schema Design and Performance ImplicationsWebinar: MongoDB Schema Design and Performance Implications
Webinar: MongoDB Schema Design and Performance Implications
 
Introducing MongoDB Atlas
Introducing MongoDB AtlasIntroducing MongoDB Atlas
Introducing MongoDB Atlas
 
Mongo DB Presentation
Mongo DB PresentationMongo DB Presentation
Mongo DB Presentation
 
MongodB Internals
MongodB InternalsMongodB Internals
MongodB Internals
 
Mongodb vs mysql
Mongodb vs mysqlMongodb vs mysql
Mongodb vs mysql
 
An Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDBAn Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDB
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Mongo db dhruba
Mongo db dhrubaMongo db dhruba
Mongo db dhruba
 
Webinar: When to Use MongoDB
Webinar: When to Use MongoDBWebinar: When to Use MongoDB
Webinar: When to Use MongoDB
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
MongoDB Performance Tuning
MongoDB Performance TuningMongoDB Performance Tuning
MongoDB Performance Tuning
 
MongoDB Atlas
MongoDB AtlasMongoDB Atlas
MongoDB Atlas
 

Andere mochten auch

Mongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorials
Mongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorialsMongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorials
Mongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorialsSpringPeople
 
MongoDB for Beginners
MongoDB for BeginnersMongoDB for Beginners
MongoDB for BeginnersEnoch Joshua
 
Intro To MongoDB
Intro To MongoDBIntro To MongoDB
Intro To MongoDBAlex Sharp
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBRavi Teja
 
Connecting NodeJS & MongoDB
Connecting NodeJS & MongoDBConnecting NodeJS & MongoDB
Connecting NodeJS & MongoDBEnoch Joshua
 
Getting Started with MongoDB and Node.js
Getting Started with MongoDB and Node.jsGetting Started with MongoDB and Node.js
Getting Started with MongoDB and Node.jsGrant Goodale
 
Mongo DB on the JVM - Brendan McAdams
Mongo DB on the JVM - Brendan McAdamsMongo DB on the JVM - Brendan McAdams
Mongo DB on the JVM - Brendan McAdamsJAX London
 
MongoDB-Beginner tutorial explaining basic operation via mongo shell
MongoDB-Beginner tutorial explaining basic operation via mongo shellMongoDB-Beginner tutorial explaining basic operation via mongo shell
MongoDB-Beginner tutorial explaining basic operation via mongo shellPriti Solanki
 
Konsep oop pada php dan mvc pada php framework, 1200631047 1200631018 1200631028
Konsep oop pada php dan mvc pada php framework, 1200631047 1200631018 1200631028Konsep oop pada php dan mvc pada php framework, 1200631047 1200631018 1200631028
Konsep oop pada php dan mvc pada php framework, 1200631047 1200631018 1200631028iis dahlia
 
Intro To Mongo Db
Intro To Mongo DbIntro To Mongo Db
Intro To Mongo Dbchriskite
 
Business considerations for node.js applications
Business considerations for node.js applicationsBusiness considerations for node.js applications
Business considerations for node.js applicationsAspenware
 
ConFoo - Migrating To Mongo Db
ConFoo - Migrating To Mongo DbConFoo - Migrating To Mongo Db
ConFoo - Migrating To Mongo DbContext.IO
 
The Spring Data MongoDB Project
The Spring Data MongoDB ProjectThe Spring Data MongoDB Project
The Spring Data MongoDB ProjectMongoDB
 
MongoDB + Java - Everything you need to know
MongoDB + Java - Everything you need to know MongoDB + Java - Everything you need to know
MongoDB + Java - Everything you need to know Norberto Leite
 

Andere mochten auch (20)

Mongo DB
Mongo DBMongo DB
Mongo DB
 
Mongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorials
Mongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorialsMongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorials
Mongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorials
 
MongoDB for Beginners
MongoDB for BeginnersMongoDB for Beginners
MongoDB for Beginners
 
Mongo db
Mongo dbMongo db
Mongo db
 
Intro To MongoDB
Intro To MongoDBIntro To MongoDB
Intro To MongoDB
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Connecting NodeJS & MongoDB
Connecting NodeJS & MongoDBConnecting NodeJS & MongoDB
Connecting NodeJS & MongoDB
 
Mongo DB
Mongo DBMongo DB
Mongo DB
 
Getting Started with MongoDB and Node.js
Getting Started with MongoDB and Node.jsGetting Started with MongoDB and Node.js
Getting Started with MongoDB and Node.js
 
Mongo db basics
Mongo db basicsMongo db basics
Mongo db basics
 
Mongo DB on the JVM - Brendan McAdams
Mongo DB on the JVM - Brendan McAdamsMongo DB on the JVM - Brendan McAdams
Mongo DB on the JVM - Brendan McAdams
 
Mongo db
Mongo dbMongo db
Mongo db
 
MongoDB-Beginner tutorial explaining basic operation via mongo shell
MongoDB-Beginner tutorial explaining basic operation via mongo shellMongoDB-Beginner tutorial explaining basic operation via mongo shell
MongoDB-Beginner tutorial explaining basic operation via mongo shell
 
Administrasi MongoDB
Administrasi MongoDBAdministrasi MongoDB
Administrasi MongoDB
 
Konsep oop pada php dan mvc pada php framework, 1200631047 1200631018 1200631028
Konsep oop pada php dan mvc pada php framework, 1200631047 1200631018 1200631028Konsep oop pada php dan mvc pada php framework, 1200631047 1200631018 1200631028
Konsep oop pada php dan mvc pada php framework, 1200631047 1200631018 1200631028
 
Intro To Mongo Db
Intro To Mongo DbIntro To Mongo Db
Intro To Mongo Db
 
Business considerations for node.js applications
Business considerations for node.js applicationsBusiness considerations for node.js applications
Business considerations for node.js applications
 
ConFoo - Migrating To Mongo Db
ConFoo - Migrating To Mongo DbConFoo - Migrating To Mongo Db
ConFoo - Migrating To Mongo Db
 
The Spring Data MongoDB Project
The Spring Data MongoDB ProjectThe Spring Data MongoDB Project
The Spring Data MongoDB Project
 
MongoDB + Java - Everything you need to know
MongoDB + Java - Everything you need to know MongoDB + Java - Everything you need to know
MongoDB + Java - Everything you need to know
 

Ähnlich wie Mongo DB

MongoDB using Grails plugin by puneet behl
MongoDB using Grails plugin by puneet behlMongoDB using Grails plugin by puneet behl
MongoDB using Grails plugin by puneet behlTO THE NEW | Technology
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBSean Laurent
 
MongoDB: a gentle, friendly overview
MongoDB: a gentle, friendly overviewMongoDB: a gentle, friendly overview
MongoDB: a gentle, friendly overviewAntonio Pintus
 
Big Data, NoSQL with MongoDB and Cassasdra
Big Data, NoSQL with MongoDB and CassasdraBig Data, NoSQL with MongoDB and Cassasdra
Big Data, NoSQL with MongoDB and CassasdraBrian Enochson
 
MongoDB 2.4 and spring data
MongoDB 2.4 and spring dataMongoDB 2.4 and spring data
MongoDB 2.4 and spring dataJimmy Ray
 
Mongo db eveningschemadesign
Mongo db eveningschemadesignMongo db eveningschemadesign
Mongo db eveningschemadesignMongoDB APAC
 
MongoDB Pros and Cons
MongoDB Pros and ConsMongoDB Pros and Cons
MongoDB Pros and Consjohnrjenson
 
Introduction to MongoDB Basics from SQL to NoSQL
Introduction to MongoDB Basics from SQL to NoSQLIntroduction to MongoDB Basics from SQL to NoSQL
Introduction to MongoDB Basics from SQL to NoSQLMayur Patil
 
MongoDB NoSQL database a deep dive -MyWhitePaper
MongoDB  NoSQL database a deep dive -MyWhitePaperMongoDB  NoSQL database a deep dive -MyWhitePaper
MongoDB NoSQL database a deep dive -MyWhitePaperRajesh Kumar
 
Mongo db first steps with csharp
Mongo db first steps with csharpMongo db first steps with csharp
Mongo db first steps with csharpSerdar Buyuktemiz
 
10gen MongoDB Video Presentation at WebGeek DevCup
10gen MongoDB Video Presentation at WebGeek DevCup10gen MongoDB Video Presentation at WebGeek DevCup
10gen MongoDB Video Presentation at WebGeek DevCupWebGeek Philippines
 
NoSQL and MongoDB Introdction
NoSQL and MongoDB IntrodctionNoSQL and MongoDB Introdction
NoSQL and MongoDB IntrodctionBrian Enochson
 

Ähnlich wie Mongo DB (20)

MongoDB using Grails plugin by puneet behl
MongoDB using Grails plugin by puneet behlMongoDB using Grails plugin by puneet behl
MongoDB using Grails plugin by puneet behl
 
Mongo db
Mongo dbMongo db
Mongo db
 
MongoDB_ppt.pptx
MongoDB_ppt.pptxMongoDB_ppt.pptx
MongoDB_ppt.pptx
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
MongoDB Basics
MongoDB BasicsMongoDB Basics
MongoDB Basics
 
MongoDB: a gentle, friendly overview
MongoDB: a gentle, friendly overviewMongoDB: a gentle, friendly overview
MongoDB: a gentle, friendly overview
 
Big Data, NoSQL with MongoDB and Cassasdra
Big Data, NoSQL with MongoDB and CassasdraBig Data, NoSQL with MongoDB and Cassasdra
Big Data, NoSQL with MongoDB and Cassasdra
 
Mongo db basics
Mongo db basicsMongo db basics
Mongo db basics
 
MongoDB 2.4 and spring data
MongoDB 2.4 and spring dataMongoDB 2.4 and spring data
MongoDB 2.4 and spring data
 
Mongo db eveningschemadesign
Mongo db eveningschemadesignMongo db eveningschemadesign
Mongo db eveningschemadesign
 
MongoDB Pros and Cons
MongoDB Pros and ConsMongoDB Pros and Cons
MongoDB Pros and Cons
 
MongoDB
MongoDBMongoDB
MongoDB
 
No sq lv1_0
No sq lv1_0No sq lv1_0
No sq lv1_0
 
mongodb_DS.pptx
mongodb_DS.pptxmongodb_DS.pptx
mongodb_DS.pptx
 
Introduction to MongoDB Basics from SQL to NoSQL
Introduction to MongoDB Basics from SQL to NoSQLIntroduction to MongoDB Basics from SQL to NoSQL
Introduction to MongoDB Basics from SQL to NoSQL
 
MongoDB NoSQL database a deep dive -MyWhitePaper
MongoDB  NoSQL database a deep dive -MyWhitePaperMongoDB  NoSQL database a deep dive -MyWhitePaper
MongoDB NoSQL database a deep dive -MyWhitePaper
 
Mondodb
MondodbMondodb
Mondodb
 
Mongo db first steps with csharp
Mongo db first steps with csharpMongo db first steps with csharp
Mongo db first steps with csharp
 
10gen MongoDB Video Presentation at WebGeek DevCup
10gen MongoDB Video Presentation at WebGeek DevCup10gen MongoDB Video Presentation at WebGeek DevCup
10gen MongoDB Video Presentation at WebGeek DevCup
 
NoSQL and MongoDB Introdction
NoSQL and MongoDB IntrodctionNoSQL and MongoDB Introdction
NoSQL and MongoDB Introdction
 

Kürzlich hochgeladen

Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 

Kürzlich hochgeladen (20)

Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 

Mongo DB

  • 2. The Right database to fit your data {“author”:”kirankumar”}
  • 3. The Right database to fit your Development
  • 5.
  • 7. NoSQL Defining Characteristics – Scaling out on commodity hardware – Aggregate structure – Schema-less attitude – Impedance Mismatch : Relational model in-memory data structures – Big Data : Massive data being stored and transacted – Reduced Data Management and Tuning Requirements – Eventually consistent / BASE (not ACID)
  • 8. NoSQL databases are little different than conventional databases (in terms of storage, reterival, performance, scalability, security, accuracy. They are widely used in web applications (like storing website cache so that results can be fetched on search, for example google). Conventional databases involves storing rows (tables) and then multiple tables might be joined to fetch results for required query. In NoSQL solution data might be stored based on columns or key/value pair. Performance is better in NoSQL databases (again depends how it’s used and setup). To improve performance of conventional databases hardware or database optimization will be required. Understanding NO SQL
  • 9. • Mongo DB is an open source project. • On Github • Licensed under the AGPL • Started and Sponsored by Mongo DB Inc( Formely Know as 10gen) Open source
  • 11. History of the Database • 1960’s – Hierarchical and Network type (IMS and CODASYL) • 1970’s – Beginnings of theory behind relational model. Codd • 1980’s – Rise of the relational model. SQL. E/R Model (Chen) • 1990’s – Access/Excel and MySQL. ODMS began to appear • 2000;’s – Two forces; large enterprise and open source. Google and Amazon. CAP Theorem (more on that to come…) • 2010’s – Immergence of NoSQL as an industry player and viable alternative
  • 12.
  • 14. Why MongoDB • Intrinsic support for agile development • Super low latency access to your data • Very little CPU overhead • No Additional caching layer required • Built in Replication and Horizontal Scaling support {“author”:”kirankumar”}
  • 15. ● A document is the basic unit of data for MongoDB, roughly equivalent to a row in arelational database management system (but much more expressive). ● Similarly, a collection can be thought of as the schema-free equivalent of a table. ● A single instance of MongoDB can host multiple independent databases, each of which can have its own collections and permissions. ● MongoDB comes with a simple but powerful JavaScript shell, which is useful for the administration of MongoDB instances and data manipulation. Overview on Mongo DB
  • 16. 10gen is the company behind MongoDB. Set the direction & contribute code to MongoDB Foster community & ecosystem Provide MongoDB management services Provide commercial services Founded in 2007 • Dwight Merriman, Eliot Horowitz • Doubleclick, Oracle, Marklogic, HP $73M+ in Funding • Flybridge, Sequoia, NEA, Union Square Worldwide Expanding Team • 140+ employees • NY, Palo Alto, London, Dublin, Sydney {“author”:”kirankumar”}
  • 17. Terminology RDBMS Mongo Table, View Collection Row(s) JSON Document Index Index Join Embedded Document Partition Shard Partition Key Shard Key
  • 18. MongoDB is Easy to Use { title: ‘MongoDB’, contributors: [ { name: ‘Eliot Horowitz’, email: ‘eliot@10gen.com’ }, { name: ‘Dwight Merriman’, email: ‘dwight@10gen.com’ } ], model: { relational: false, awesome: true } }
  • 19. • Written in C++ • Extensive use of memory-mapped files i.e. read-through write-through memory caching. • Runs nearly everywhere • Data serialized as BSON (fast parsing) • Full support for primary & secondary indexes • Document model = less work High Performance {“author”:”kirankumar”}
  • 24. Replica set communication breaks down {“author”:”kirankumar”}
  • 28. Document • At its simplest form, Mongo is a document oriented database • MongoDB stores all data in documents, which are JSON-style data structures composed of field-and-value pairs. • MongoDB stores documents on disk in the BSON serialization format. BSON is a binary representation of JSON documents. BSON contains more data types than does JSON. • ** For in-depth BSON information, see bsonspec.org. NOSQL Intro & MongoDB 28{“author”:”kirankumar”}
  • 29. What does a Document Look Like • { • "_id" : "52a602280f2e642811ce8478", • "ratingCode" : "PG13", • "country" : "USA", • "entityType" : "Rating” • } NOSQL Intro & MongoDB 29
  • 30. Rules for a document • Documents have the following rules: • The maximum BSON document size is 16 megabytes. • The field name _id is reserved for use as a primary key; its value must be unique in the collection. • The field names cannot start with the $ character. • The field names cannot contain the . character. NOSQL Intro & MongoDB 30
  • 31. BSON • JSON has powerful, but limited set of datatypes • Mongo extends datypes with Date, Int types, Id, … • MongoDB stores data in BSON • BSON is a binary representation of JSON • Optimized for performance and navigational abilities • Also compression • See bsonspec.org
  • 32.
  • 33. Mongo Install • Windows • http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/ • MAC • http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/ • Create Data Directory , Defaults • C:datadb • /data/db/ (make sure have permissions) • Or can set using -dbpath • C:mongodbbinmongod.exe --dbpath d:testmongodbdata NOSQL Intro & MongoDB 33{“author”:”kirankumar”}
  • 34. Start IT! • Database • mongod • • Shell • mongo • show dbs • show collections • db.stats() NOSQL Intro & MongoDB 34{“author”:”kirankumar”}
  • 35. Basic Operations • 1_simpleinsert.txt • Insert • Find • Find all • Find One • Find with criteria • Indexes • Explain() NOSQL Intro & MongoDB 35{“author”:”kirankumar”}
  • 36. More Mongo Shell • 2_arrays_sort.txt • Embedded documents • Limit, Sort • Using regex in query • Removing documents • Drop collection NOSQL Intro & MongoDB 36
  • 37. Import / Export • 3_imp_exp.txt • Mongo provides tools for getting data in and out of the database • Data Can Be Exported to json files • Json files can then be Imported NOSQL Intro & MongoDB 37{“author”:”kirankumar”}
  • 38. Import / Export • 3_imp_exp.txt • Mongo provides tools for getting data in and out of the database • Data Can Be Exported to json files • Json files can then be Imported NOSQL Intro & MongoDB 38{“author”:”kirankumar”}
  • 39. Conditional Operators • 4_cond_ops.txt • $lt • $gt • $gte • $lte • $or • Also $not, $exists, $type, $in • (for $type refer to http://docs.mongodb.org/manual/reference/operator/query/type/#_S_typ e ) NOSQL Intro & MongoDB 39{“author”:”kirankumar”}
  • 40. Admin Commands • 5_admin.txt • how dbs • show collections • db.stats() • db.posts.stats() • db.posts.drop() • db.system.indexes.find() NOSQL Intro & MongoDB 40{“author”:”kirankumar”}
  • 41. Data MODELING • Remember with NoSql redundancy is not evil • Applications insure consistency, not the DB • Application join data, not defined in the DB • Datamodel is schema-less • Datamodel is built to support queries usually NOSQL Intro & MongoDB 41{“author”:”kirankumar”}
  • 42. Questions to ask • Your basic units of data (what would be a document)? • How are these units grouped / related? • How does Mongo let you query this data, what are the options? • Finally, maybe most importantly, what are your applications access patterns? • Reads vs. writes • Queries • Updates • Deletions • How structured is it NOSQL Intro & MongoDB 42{“author”:”kirankumar”}
  • 43. Data Model - Normalized • Normalized • Similar to relational model. • One collection per entity type • Little or no redundancy • Allows clean updates, familiar to many SQL users, easier to understand NOSQL Intro & MongoDB 43{“author”:”kirankumar”}
  • 44. Other considerations For Data Modeling • Many or few collections • Many Collections • As seen in normalized • Clean and little redundancy • May not provide best performance • May require frequent updates to application if new types added • Multiple Collections • Middle ground, partially normalized • Not many collections • One large generic collection • Contains many types • Use type field NOSQL Intro & MongoDB 44{“author”:”kirankumar”}
  • 45. Consideration Continued • Document Growth – will relocate if exceeds allocated size • Atomicity • Atomic at document level • Consideration for insertions, remove and multi-document updates • Sharding – collections distributed across mongod instances, uses a shard key • Indexes – index fields often queries, indexes affect write performance slightly • Consider using TTL to automatically expire documents NOSQL Intro & MongoDB 45{“author”:”kirankumar”}
  • 47. Text Search • Now production-ready • Integrated with query engine • Integrated with aggregation framework • Multi-language document support {“author”:”kirankumar”}
  • 48. Features • Language-specific tokenization and stemming • Stop words • Relevance ranking • Field boosting
  • 49. Supported Languages da – Danish en – English nl – Dutch fi – Finish fr – French de – German hu – Hungarian it – Italian no – Norwegian pt – Portuguese ro – Romanian ru – Russian es – Spanish sv – Swedish tr - Turkish {“author”:”kirankumar”}
  • 55. Query System Improvements • Index Intersection • Aggregation Framework • New Update Operators
  • 56. Index Intersection • Simpler ad-hoc queries • Existing indexes can be combined to optimize a query – Less Index Maintenance – Smaller Working Set – Lower Write Overhead – MoreAdaptive – Able to control potential intersections using QueryShape
  • 58. New Update Operators • $mul • $min/$max • $bit • $currentDate • New modifiers for $push
  • 60. Security • Authentication with LDAP (Enterprise only) • x.509 Certificates • User defined roles • Collection level security • Auditing (Enterprise only) • Windows Kerberos Support
  • 61. State of Security in MongoDB 2.6 • Authentication – Who are you? – X.509 authentication and Kerberos • Authorization – What can you do? – User Defined Roles, Collection-levelAccess Control • Auditing – What have you done? – DDL, User Manipulation,Authorization failure
  • 62. Roles and Collection-level Security {“author”:”kirankumar”}
  • 63. Auditing • Schema actions • Replica Set actions • Authentication &Authorization actions • Other actions {“author”:”kirankumar”}
  • 64. Auditing – Dropping a collection {“author”:”kirankumar”}
  • 65. Auditing – Shutting down the server {“author”:”kirankumar”}
  • 66. •Cost It's free, open source. Can has more scale? Just add hardware. Licensing costs need not apply (can run on Linux) . •Schema-less If you need to support a flexible schema, MongoDB's document storage is a big plus. It doesn't mean you don't need to think about schema at all, it just means you can very easily model data of this nature and cope with changes without headaches. •Quick start & fast learning Mongodb was quick and easy. There was no entry barrier. I can't fault how quick and easy it was to get up and running with the basics. Hacking around to pick up the more advanced stuff was also a pretty painless exercise too. Using the C# driver has been a largely very positive and intuitive experience. •Replica sets Configuring is simple, making scaling reads and failover pretty effortless. Want more redundancy or scaling of reads? Fire up another machine, add to the set and away you go. Mongo DB Pros
  • 67. •Auto Sharding Again, configuring is simple. You do need to give very careful consideration to this up front when deciding on what keys you want to shard on. Once you've done that, sharding "just does it's stuff". •Community It has a good community behind it and that IMHO is very important. I don't like sitting in a cupboard on my own with the lights off. I like being a part of a bigger community - to learn from, work through issues with and to contribute back to. •Rapidly evolving MongoDB is rapidly changing and it's good to see bugs are being tracked and fixed in good time. There is also a fast flowing feature enhancement pipeline too, so you typically don't have to wait for a long time to get something. •Choose your consistency You can choose to have data replicated to a configurable number of replicas before returning if you wish to have stronger level of consistency. Depends on what value you put on certain bits of data, but the choice is yours. So you can trade off performance for consistency. Mongo DB Pros
  • 68. • Data size in MongoDB is typically higher due to e.g. each document has field names stored it • less flexibity with querying (e.g. no JOINs) • no support for transactions - certain atomic operations are supported, at a single document level • at the moment Map/Reduce (e.g. to do aggregations/data analysis) is OK, but not blisteringly fast. So if that's required, something like Hadoop may need to be added into the mix • less up to date information available/fast evolving product Mongo DB cons
  • 69. Design decisions with Mongo • Agile incremental releases • Unstructured data from multiple suppliers • GridFS : Stores large binary objects • Spring Data Services • Embedding and linking documents • Easy replication set up for AWS
  • 70. Books MongoDB: The Definitive Guide, 2nd Edition By: Kristina Chodorow Publisher: O'Reilly Media, Inc. Pub. Date: May 23, 2013 Print ISBN-13: 978-1-4493-4468-9 Pages in Print Edition: 432 MongoDB in Action By: Kyle Banker Publisher: Manning Publications Pub. Date: December 16, 2011 Print ISBN-10: 1-935182-87-0 Print ISBN-13: 978-1-935182-87-0 Pages in Print Edition: 312 The Definitive Guide to MongoDB: The NoSQL Database for Cloud and Desktop Computing By Eelco Plugge; Peter Membrey; Tim Hawkins Apress, September 2010 ISBN: 9781430230519 327 pages NOSQL Intro & MongoDB 70{“author”:”kirankumar”}
  • 71. Books Cont. MongoDB Applied Design Patterns By: Rick Copeland Publisher: O'Reilly Media, Inc. Pub. Date: March 18, 2013 Print ISBN-13: 978-1-4493-4004-9 Pages in Print Edition: 176 MongoDB for Web Development (rough cut!) By: Mitch Pirtle Publisher: Addison-Wesley Professional Last Updated: 14-JUN-2013 Pub. Date: March 11, 2015 (Estimated) Print ISBN-10: 0-321-70533-5 Print ISBN-13: 978-0-321-70533-4 Pages in Print Edition: 360 Instant MongoDB By: Amol Nayak; Publisher: Packt Publishing Pub. Date: July 26, 2013 Print ISBN-13: 978-1-78216-970-3 Pages in Print Edition: 72 NOSQL Intro & MongoDB 71{“author”:”kirankumar”}
  • 72. Important Sites • http://www.mongodb.org/ • https://mongolab.com/welcome/ • https://education.mongodb.com/ • http://blog.mongodb.org/ • http://stackoverflow.com/questions/tagged/mongodb • http://bitnami.com/stack/mean NOSQL Intro & MongoDB 72
  • 75. For more details {“Linked In” : “in.linkedin.com/pub/kiran-kumar-matam/2b/239/91b/”} {“catchme on”: [ {“name” : “kirankumar”, “website” : [ “techincal”:”www.javaquestionbank.net”, “personal” :www.matamkirankumar.com ], “twitter : ” @matamkiran11” } ] }

Hinweis der Redaktion

  1. Highlight the fact no need to add a new techonology
  2. Take slides from Text Search tech talk
  3. Take slides from Text Search tech talk