What is MongoDB? Developed by 10gen It is a NoSQL database A document-oriented database It uses BSON...

7
What is MongoDB? Developed by 10gen It is a NoSQL database A document-oriented database It uses BSON format

Transcript of What is MongoDB? Developed by 10gen It is a NoSQL database A document-oriented database It uses BSON...

Page 1: What is MongoDB? Developed by 10gen It is a NoSQL database A document-oriented database It uses BSON format.

What is MongoDB?

Developed by 10gen It is a NoSQL database A document-oriented database It uses BSON format

Page 2: What is MongoDB? Developed by 10gen It is a NoSQL database A document-oriented database It uses BSON format.

The Basics

A MongoDB instance may have zero or more databases

A database may have zero or more ‘collections’. A collection may have zero or more ‘documents’. A document may have one or more ‘fields’. MongoDB ‘Indexes’ function much like their

RDBMS counterparts.

Page 3: What is MongoDB? Developed by 10gen It is a NoSQL database A document-oriented database It uses BSON format.

MongoDB vs. RDBMS

Collection vs. table Document vs. row Field vs. column Collection isn't strict about what goes in it

(it's schema-less)

Page 4: What is MongoDB? Developed by 10gen It is a NoSQL database A document-oriented database It uses BSON format.

MongoDB in action…

Page 5: What is MongoDB? Developed by 10gen It is a NoSQL database A document-oriented database It uses BSON format.

More actions…

Page 6: What is MongoDB? Developed by 10gen It is a NoSQL database A document-oriented database It uses BSON format.

Using MongoDB with Rails

require 'rubygems' require 'mongo' source 'http://gemcutter.org'

gem "rails", "3.2.1" gem "mongo_mapper"

bundle install

Page 7: What is MongoDB? Developed by 10gen It is a NoSQL database A document-oriented database It uses BSON format.

Why use MongoDB

Simple queries Makes sense with most web applications Easier and faster integration of data Not well suited for heavy and complex

transactions systems.