Loading presentation...

Present Remotely

Send the link below via email or IM


Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.


MongoDB Intro

No description

Chantal Bisson

on 26 March 2013

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of MongoDB Intro

Rich Querying (CRUD) Document-Oriented Storage JSON-Style Documents Features Replication & High Availability Supports asynchronous replication of data between servers for failover and redundancy.
Needs a majority of votes to elect a new primary.
Replica Sets increases read scalability. Auto-Sharding & Scalability Distributes a single logical database system across a cluster of machines.
Offers easy addition of new machines.
Zero single points of failure architecture.
Increases read and write
Automatic balancing for
changes in load and data
Adds additional complexity
to the system.
Impacts aggregation
performance. Use Cases Simple queries
Easier and faster integration of data
RDBMS replacement for Web Applications.
Semi-structured Content Management.
Real-time analytic and High-Speed Logging.
Caching and High Scalability. Document-Oriented Storage
Rich Querying (CRUD)
Replication & High Availability
Auto-Sharding & Scalability
Full Index Support
Fast In-Place Updates
GridFS MongoDB (from "humongous") is an open source document database, and the leading NoSQL database. Written in C++. Example: { _id: '47cc67093475061e3d95369d'
author: 'joe',
created : new Date('03/28/2009'),
title : 'Yet another blog post',
text : 'Here is the text...',
tags : [ 'example', 'joe' ]
} Collections Logical groups of documents
No document structure enforced
Indexes are per-collection Divers C, C++, C#, Erlang, Java, JavaScript, Node.js, Perl, PHP, Python, Ruby, Scala, etc. BSON documents
GridFS for large binary files
Memory-mapped files Comparison Operators
($all, $gt, $gte, $in, $lt, $lte, $ne, $nin, $regex)
Logical Operators ($and, $nor, $not, $or)
Result Projections
Geospacial Datatypes Array, Binary, Boolean, DateTime, DB Reference, Embedded Object, Integer, Null, ObjectId, RegExp, String, Symbol, Timestamp Great for Not Great for Highly Transactional Applications.
Problems requiring SQL. Read Update Insert Delete use cookbook;
'name': 'Cherry Pie
'ingredients': ['cherries', 'pie'],
'cooking_time': 30
'name': 'Apple Pie',
'ingredients': ['apples', 'pie'],
'cooking_time': 30
}); Simple Queries
'cooking_time': {'$gte': 10, '$lt': 30}

Counting Results

Skipping & Limiting Results
db.recipes.find().skip(5).limit(10); Sorting Results
'cooking_time': -1

var cur = db.recipies.find().cursor();
cur.forEach(function(x) {
}); db.recipes.update({
'name': 'Apple Pie',
{'$set': {'cooking_time': 45}},
}); $inc increment value {$inc: {field: value}}
$set set field to value {$set: {field: value}}
$unset delete field {$unset: {field: 1}}
$push add value to field {$push: {field: value}}
$pushAll add array to field {$pushAll: {field: array}}
$pop remove last / first element from array {$pop: {field: 1/-1}}
$pull remove all values from array {$pull: {field: value}}
$rename rename field {$rename: {old_name: new_name}} db.recipes.remove({
'name': 'Apple Pie'
Full transcript