Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to...
Transcript of Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to...
![Page 2: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/2.jpg)
![Page 3: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/3.jpg)
Application
PHP
Linux
DatabaseApache
![Page 4: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/4.jpg)
Application
PHP
Windows
IIS
![Page 5: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/5.jpg)
Application
PHP
Linux
Apache
![Page 6: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/6.jpg)
Application
PHP
Linux
Apache
![Page 7: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/7.jpg)
Application
PHP
Linux
Apache
![Page 8: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/8.jpg)
Application
PHP
Linux
Apache
The world's mostpopular open source
database
![Page 9: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/9.jpg)
Application
PHP
Linux
Apache
The world's mostadvanced open source
database
![Page 10: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/10.jpg)
![Page 11: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/11.jpg)
databases
contain tables
contain rows
server
![Page 12: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/12.jpg)
databases
contain tables
contain rows
schemaserver
![Page 13: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/13.jpg)
databases
contain tables
contain rows
joins
schemaserver
![Page 14: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/14.jpg)
databases
contain tables
contain rows
joins
schemaserver
![Page 15: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/15.jpg)
![Page 16: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/16.jpg)
![Page 17: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/17.jpg)
![Page 18: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/18.jpg)
![Page 19: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/19.jpg)
Application
Perl
Linux
Apache
![Page 20: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/20.jpg)
getting started
![Page 21: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/21.jpg)
www.mongodb.org
![Page 22: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/22.jpg)
$ mysqld
![Page 23: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/23.jpg)
$ mongod
![Page 24: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/24.jpg)
$ mysql
![Page 25: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/25.jpg)
$ mongo
![Page 26: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/26.jpg)
$ mongo
MongoDB shell version 1.5.5
url: test
connecting to: test
type "help" for help
>
![Page 27: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/27.jpg)
$ mongo
MongoDB shell version 1.5.5
url: test
connecting to: test
type "help" for help
> db
![Page 28: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/28.jpg)
$ mongo
MongoDB shell version 1.5.5
url: test
connecting to: test
type "help" for help
> db
test
>
![Page 29: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/29.jpg)
$ mongo
MongoDB shell version 1.5.5
url: test
connecting to: test
type "help" for help
> db
test
>
![Page 30: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/30.jpg)
$ mongo
MongoDB shell version 1.5.5
url: test
connecting to: test
type "help" for help
> db
test
> table = db.foo
![Page 31: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/31.jpg)
server
![Page 32: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/32.jpg)
databases
server
![Page 33: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/33.jpg)
databases
contain tables
server
![Page 34: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/34.jpg)
databases
contain tables
server
![Page 35: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/35.jpg)
databases
contain tables
server
![Page 36: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/36.jpg)
databases
contain rows
server
contain tables
![Page 37: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/37.jpg)
databases
contain rows
server
contain tables
![Page 38: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/38.jpg)
databases
contain rows
server
contain tables
![Page 39: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/39.jpg)
databases
contain rows
server
contain tables
schema
![Page 40: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/40.jpg)
databases
contain rows
server
contain tables
schema
joins
![Page 41: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/41.jpg)
databases
contain collections
contain documents
server
![Page 42: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/42.jpg)
$ mongo
MongoDB shell version 1.5.5
url: test
connecting to: test
type "help" for help
> db
test
> collection = db.foo
![Page 43: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/43.jpg)
$ mongo
MongoDB shell version 1.5.5
url: test
connecting to: test
type "help" for help
> db
test
> collection = db.foo
![Page 44: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/44.jpg)
> doc = {
... "name" : "kristina",
... "contact info" : {
... "twitter" : "@kchodorow",
... "email" : "[email protected]"
... },
... "friends" : 400232,
... "pic" : BinData(...)
... "member since" : new Date()}
![Page 45: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/45.jpg)
> db.foo.insert(doc)
![Page 46: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/46.jpg)
> db.foo.findOne({"name" : "kristina"});
![Page 47: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/47.jpg)
> db.foo.findOne({"name" : "kristina"})
> db.foo.findOne({
... "contact.twitter" : "@kchodorow"})
![Page 48: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/48.jpg)
> db.foo.findOne({"name" : "kristina"})
> db.foo.findOne({
... "contact.twitter" : "@kchodorow"})
> db.foo.find({
... "member since" : {
... "$gt" : yesterday,
... "$lt" : today
... }})
![Page 49: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/49.jpg)
> db.foo.findOne({"name" : "kristina"})
> db.foo.findOne({
... "contact.twitter" : "@kchodorow"})
> db.foo.find({
... "member since" : {
... "$gt" : yesterday,
... "$lt" : today
... }}).sort({friends : 1}).limit(10).
... skip(100)
![Page 50: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/50.jpg)
db.people.update(
{name : "kristina"},
![Page 51: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/51.jpg)
db.people.update(
{name : "kristina"},
{$set :
![Page 52: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/52.jpg)
db.people.update(
{name : "kristina"},
{$set :
{"contact.website" :
"snailinaturtleneck.com"
}});
![Page 53: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/53.jpg)
> db.pageviews.update(
{url : "example.com"},
{$inc : {pageviews : 1}},
true)
![Page 54: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/54.jpg)
![Page 55: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/55.jpg)
![Page 56: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/56.jpg)
some features
![Page 57: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/57.jpg)
I suddenly have a deep love for stored procedures
![Page 58: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/58.jpg)
I suddenly have a deep love for stored procedures
![Page 59: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/59.jpg)
> db.system.js.insert({
"_id" : "x",
"value" : 3});
> db.system.js.insert({
"_id" : "y",
"value" : 4});
> db.eval("return x+y")
![Page 60: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/60.jpg)
> db.system.js.insert({_id : "log",
... value : function(msg, level) {
... var date = "[" + new Date() + "] ";
... var lvl = level ? level+" " : "";
... print(date + lvl + msg);
... }})
![Page 61: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/61.jpg)
> db.eval("log('all your base are
belong to us', 'FATAL');");
![Page 62: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/62.jpg)
> db.eval("log('all your base are
belong to us', 'FATAL');");
[Fri May 19 18:34:57] FATAL all your
base are belong to us
![Page 63: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/63.jpg)
![Page 64: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/64.jpg)
![Page 65: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/65.jpg)
J J J
J J J
J J J
![Page 66: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/66.jpg)
![Page 67: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/67.jpg)
capped collections
![Page 68: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/68.jpg)
indexes
![Page 69: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/69.jpg)
geospatial indexes
![Page 70: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/70.jpg)
![Page 71: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/71.jpg)
MapReduce
![Page 72: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/72.jpg)
what did we leave out?
![Page 73: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/73.jpg)
![Page 74: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/74.jpg)
I say, we should get a mainframe, old chap.
Harumph.
![Page 75: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/75.jpg)
![Page 76: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/76.jpg)
![Page 77: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/77.jpg)
![Page 78: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/78.jpg)
are you practicing safedata storage?
![Page 79: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/79.jpg)
![Page 80: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/80.jpg)
Insert this.
Okay, got it.
Phew, my data's safe.
![Page 81: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/81.jpg)
Write this to disk
All over it!
I know better than
he does, I'll just
let this sit in a
buffer for a while.
![Page 82: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/82.jpg)
![Page 83: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/83.jpg)
? I have no idea what
you're talking about.
![Page 84: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/84.jpg)
trust no one!
...trust a bunch of ones. Mostly.
![Page 85: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/85.jpg)
prod1.example.com
prod2.example.com
![Page 86: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/86.jpg)
prod1.example.com
prod2.example.com
![Page 87: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/87.jpg)
prod1.example.com
prod2.example.com
![Page 88: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/88.jpg)
prod1.example.com
prod2.example.com
![Page 89: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/89.jpg)
![Page 90: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/90.jpg)
prod1.example.com
prod2.example.com
![Page 91: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/91.jpg)
prod1.example.com
prod2.example.com
![Page 92: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/92.jpg)
prod1.example.com ?
prod2.example.com
![Page 93: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/93.jpg)
prod2.example.com
prod1.example.com
![Page 94: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/94.jpg)
prod2.example.com
prod1.example.com
?
![Page 95: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/95.jpg)
prod2.example.com
prod1.example.com
![Page 96: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/96.jpg)
prod2.example.com
prod1.example.com
![Page 97: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/97.jpg)
primary
secondary
passive
secondary
![Page 98: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/98.jpg)
secondary
passive
secondary
My priority is 2
My priority is 1
![Page 99: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/99.jpg)
primary
passive
secondary
![Page 100: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/100.jpg)
secondary
passive
secondary
I'm 5 minutes behind the master
I'm 3 seconds behind the master
![Page 101: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/101.jpg)
secondary
passive
primary
![Page 102: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/102.jpg)
passive
I'll still take reads.
![Page 103: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/103.jpg)
![Page 104: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/104.jpg)
![Page 105: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/105.jpg)
![Page 106: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/106.jpg)
![Page 107: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/107.jpg)
okay
![Page 108: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/108.jpg)
?
![Page 109: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/109.jpg)
make sure two slaves have this
![Page 110: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/110.jpg)
![Page 111: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/111.jpg)
![Page 112: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/112.jpg)
![Page 113: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/113.jpg)
all set
![Page 114: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/114.jpg)
![Page 115: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/115.jpg)
![Page 116: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/116.jpg)
![Page 117: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/117.jpg)
![Page 118: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/118.jpg)
![Page 119: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/119.jpg)
![Page 120: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/120.jpg)
scaling
![Page 121: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/121.jpg)
![Page 122: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/122.jpg)
(rdbms)
![Page 123: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/123.jpg)
U - ZK - OA - E F - J P - T
![Page 124: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/124.jpg)
U - ZK - OA - E F - J P - T
I want Mark through Sarah.
![Page 125: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/125.jpg)
U - ZK - OA - E F - J P - T
![Page 126: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/126.jpg)
U - ZK - OA - E F - J P - T
![Page 127: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/127.jpg)
U - ZK - OA - E F - J P - T
Insert Linus
![Page 128: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/128.jpg)
U - ZK - OA - E F - J P - T
Insert Linus
![Page 129: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/129.jpg)
U - ZK - OA - E F - J P - T
![Page 130: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/130.jpg)
$ mongo
MongoDB shell version 1.5.5
url: test
connecting to: test
type "help" for help
>
![Page 131: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/131.jpg)
$ mongo
MongoDB shell version 1.5.5
url: test
connecting to: test
type "help" for help
> db.foo.insert({x:1})
![Page 132: Introduction to MongoDB - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Introduction to MongoDB... · $ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help"](https://reader034.fdocuments.in/reader034/viewer/2022050807/5aa2784d7f8b9a07758d0ce8/html5/thumbnails/132.jpg)
thank you!
@kchodorow
http://www.snailinaturtleneck.com