Intro To MongoDB
Upcoming SlideShare
Loading in...5
×
 

Intro To MongoDB

on

  • 40,514 views

Slides for a talk I gave at the LA WebDev meetup on 02/23/2010.

Slides for a talk I gave at the LA WebDev meetup on 02/23/2010.

Statistics

Views

Total Views
40,514
Views on SlideShare
38,238
Embed Views
2,276

Actions

Likes
36
Downloads
829
Comments
4

26 Embeds 2,276

http://nosql.mypopescu.com 1849
http://www.mongodb.org 221
http://www.slideshare.net 96
https://twitter.com 32
http://rpupa.wordpress.com 23
http://teamco-anthill.blogspot.com 16
http://teamco-anthill.blogspot.in 6
http://digitalforest.se 3
http://bender 3
https://tasks.crowdflower.com 3
http://bender.radada.gruik.org 2
http://teamco-anthill.blogspot.hu 2
http://teamco-anthill.blogspot.fr 2
http://teamco-anthill.blogspot.co.uk 2
https://www.linkedin.com 2
http://teamco-anthill.blogspot.com.br 2
http://teamco-anthill.blogspot.sk 2
http://www.linkedin.com 2
http://teamco-anthill.blogspot.jp 1
http://feeds.feedburner.com 1
http://teamco-anthill.blogspot.cz 1
http://teamco-anthill.blogspot.de 1
http://wiki.mongodb.org 1
http://teamco-anthill.blogspot.it 1
http://translate.googleusercontent.com 1
http://teamco-anthill.blogspot.ch 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Intro To MongoDB Intro To MongoDB Presentation Transcript

  • Intro to MongoDB Alex Sharp twitter: @ajsharp email: ajsharp@frothlogic.com Monday, February 22, 2010
  • So what is MongoDB? Monday, February 22, 2010
  • First and foremost... Monday, February 22, 2010
  • IT’S THE NEW HOTNESS!!! Monday, February 22, 2010
  • omgomgomg SHINY OBJECTS omgomgomg Monday, February 22, 2010
  • MongoDB (from "humongous") is a scalable, high-performance, open source, schema-free, document-oriented database. - mongodb.org Monday, February 22, 2010
  • Philosophy Monday, February 22, 2010
  • Philosophy “One size fits all” approach no longer applies Monday, February 22, 2010
  • Philosophy Non-relational DBs scale more easily, especially horizontally Monday, February 22, 2010
  • Philosophy Focus on speed, performance, flexibility and scalability Monday, February 22, 2010
  • Philosophy Not concerned with transactional stuff and relational semantics Monday, February 22, 2010
  • Philosophy DBs should be an on-demand commodity, in a cloud- like fashion Monday, February 22, 2010
  • Philosophy Mongo tries to achieve the performance of traditional key-value stores while maintaining functionality of traditional RDBMS Monday, February 22, 2010
  • Features Monday, February 22, 2010
  • Features Standard database stuff Monday, February 22, 2010
  • Features Standard database stuff Indexing Monday, February 22, 2010
  • Features Standard database stuff Indexing replication/failover support Monday, February 22, 2010
  • Features: Document Storage Documents are stored in BSON (binary JSON) Monday, February 22, 2010
  • Features: Document Storage BSON is a binary serialization of JSON-like objects Monday, February 22, 2010
  • Features: Document Storage This is extremely powerful, b/c it means mongo understands JSON natively Monday, February 22, 2010
  • Features: Document Storage Any valid JSON can be easily imported and queried Monday, February 22, 2010
  • Features Schema-less; very flexible Monday, February 22, 2010
  • Features Schema-less; very flexible no more blocking ALTER TABLE Monday, February 22, 2010
  • Features Auto-sharding (alpha) Monday, February 22, 2010
  • Features Makes for easy horizontal scaling Monday, February 22, 2010
  • Features Map/Reduce Monday, February 22, 2010
  • Features Very, very fast Monday, February 22, 2010
  • Features Super easy to install Monday, February 22, 2010
  • Features Strong with major languages Monday, February 22, 2010
  • Features Document-oriented = flexible Monday, February 22, 2010
  • Features: Querying Rich, javascript-based query syntax Monday, February 22, 2010
  • Features: Querying Rich, javascript-based query syntax Allows us to deep, nested queries Monday, February 22, 2010
  • Features: Querying Rich, javascript-based query syntax Allows us to do deep, nested queries db.order.find( { shipping: { carrier: "usps" } } ); Monday, February 22, 2010
  • Features: Querying Rich, javascript-based query syntax Allows us to deep, nested queries db.order.find( { shipping: { carrier: "usps" } } ); shipping is an embedded document (object) Monday, February 22, 2010
  • Features: Binary Object Store Efficient binary large object store via GridFS Monday, February 22, 2010
  • Features: Binary Object Store Efficient binary large object store via GridFS i.e. store images, videos, anything Monday, February 22, 2010
  • Concepts Monday, February 22, 2010
  • Concepts: Document-oriented Think of “documents” as database records Monday, February 22, 2010
  • Concepts: Document-oriented Think of “documents” as database records Documents are basically just JSON objects that Mongo stores in binary Monday, February 22, 2010
  • Concepts: Document-oriented Think of “collections” as database tables Monday, February 22, 2010
  • Concept Mapping RDBMS (mysql, postgres) MongoDB Tables Collections Monday, February 22, 2010
  • Concept Mapping RDBMS (mysql, postgres) MongoDB Tables Collections Records/rows Documents/objects Monday, February 22, 2010
  • Concept Mapping RDBMS (mysql, postgres) MongoDB Tables Collections Records/rows Documents/objects Queries return record(s) Queries return a cursor Monday, February 22, 2010
  • Concept Mapping RDBMS (mysql, postgres) MongoDB Tables Collections Records/rows Documents/objects Queries return record(s) Queries return a cursor Monday, February 22, 2010 ???
  • Concepts: Cursors Queries return “cursors” instead of collections Monday, February 22, 2010
  • Concepts: Cursors Queries return “cursors” instead of collections A cursor allows you to iterate through the result set Monday, February 22, 2010
  • Concepts: Cursors Queries return “cursors” instead of collections A cursor allows you to iterate through the result set A big reason for this is performance Monday, February 22, 2010
  • Concepts: Cursors Queries return “cursors” instead of collections A cursor allows you to iterate through the result set A big reason for this is performance Much more efficient than loading all objects into memory Monday, February 22, 2010
  • Concepts: Cursors The find() function returns a cursor object Monday, February 22, 2010
  • Concepts: Cursors The find() function returns a cursor object var cursor = db.logged_requests.find({ 'status_code' : 200 }) cursor.hasNext() // "true" cursor.forEach( function(item) { print(tojson(item)) } ); cursor.hasNext() // "false" Monday, February 22, 2010
  • Cool Features Monday, February 22, 2010
  • Cool Features Capped collections Monday, February 22, 2010
  • Cool Features Capped collections Fixed-sized, limited operation, auto-LRU age-out collections Monday, February 22, 2010
  • Cool Features Capped collections Fixed-sized, limited operation, auto-LRU age-out collections Fixed insertion order Monday, February 22, 2010
  • Cool Features Capped collections Fixed-sized, limited operation, auto-LRU age-out collections Fixed insertion order Super fast Monday, February 22, 2010
  • Cool Features Capped collections Fixed-sized, limited operation, auto-LRU age-out collections Fixed insertion order Super fast Ideal for logging and caching Monday, February 22, 2010
  • Cool Uses Data Warehouse Mongo understands JSON natively Monday, February 22, 2010
  • Cool Uses Data Warehouse Mongo understands JSON natively Very powerful for analysis Monday, February 22, 2010
  • Cool Uses Data Warehouse Mongo understands JSON natively Very powerful for analysis Query a bunch of data from some web service Monday, February 22, 2010
  • Cool Uses Data Warehouse Mongo understands JSON natively Very powerful for analysis Query a bunch of data from some web service Import into mongo (mongoimport -f filename.json) Monday, February 22, 2010
  • Cool Uses Data Warehouse Mongo understands JSON natively Very powerful for analysis Query a bunch of data from some web service Import into mongo (mongoimport -f filename.json) Analyze to your heart’s content Monday, February 22, 2010
  • Cool Uses Harmonyapp.com Large rails app for building websites (kind of a CMS) Monday, February 22, 2010
  • Cool Uses Hardcore debugging Spit out large amounts of data Monday, February 22, 2010
  • Limitations Transaction support Monday, February 22, 2010
  • Limitations Transaction support Relational integrity Monday, February 22, 2010
  • Resources http://mongodb.org http://www.mongodb.org/display/DOCS/Tutorial http://www.mongodb.org/display/DOCS/Use+Cases http://blog.mongodb.org/post/172254834/mongodb- is-fantastic-for-logging http://github.com/ajsharp/mongo-conf Monday, February 22, 2010