Introduction To MongoDB Presentation
Introduction To MongoDB Presentation
Application PHP
Apache
Linux
Database
Application PHP
IIS
Windows
Application PHP
Apache
Linux
Application PHP
Apache
Linux
Application PHP
Apache
Linux
Application PHP
Apache
Linux
Application PHP
Apache
Linux
The world's most advanced open source database
server
databases
contain tables contain rows
server
schema
databases
contain tables contain rows
server
schema
databases
contain tables contain rows
joins
server
schema
databases
contain tables contain rows
joins
Application Perl
Apache
Linux
getting started
www.mongodb.org
$ mysqld
$ mongod
$ mysql
$ mongo
$ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help" for help >
$ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help" for help > db
$ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help" for help > db test >
$ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help" for help > db test >
$ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help" for help > db test > table = db.foo
server
server
databases
server
databases
contain tables
server
databases
contain tables
server
databases
contain tables
server
databases
contain tables contain rows
server
databases
contain tables contain rows
server
databases
contain tables contain rows
server
schema
databases
contain tables contain rows
server
schema
databases
contain tables contain rows
joins
server
databases
contain collections contain documents
$ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help" for help > db test > collection = db.foo
$ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help" for help > db test > collection = db.foo
> doc = { ... "name" : "kristina", ... "contact info" : { ... "twitter" : "@kchodorow", ... "email" : "[email protected]" ... }, ... "friends" : 400232, ... "pic" : BinData(...) ... "member since" : new Date()}
> db.foo.insert(doc)
> db.foo.findOne({"name" : "kristina"}) > db.foo.findOne({ ... "contact.twitter" : "@kchodorow"}) > db.foo.find({ ... "member since" : { ... "$gt" : yesterday, ... "$lt" : today ... }})
> 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)
some features
> db.system.js.insert({ "_id" : "x", "value" : 3}); > db.system.js.insert({ "_id" : "y", "value" : 4}); > db.eval("return x+y")
> db.system.js.insert({_id : "log", ... value : function(msg, level) { ... var date = "[" + new Date() + "] "; ... var lvl = level ? level+" " : ""; ... print(date + lvl + msg); ... }})
capped collections
indexes
geospatial indexes
MapReduce
Harumph.
Insert this.
Write this to disk I know better than he does, I'll just let this sit in a buffer for a while.
trust no one!
prod1.example.com
prod2.example.com
prod1.example.com
prod2.example.com
prod1.example.com
prod2.example.com
prod2.example.com
prod1.example.com
prod1.example.com prod2.example.com
prod1.example.com prod2.example.com
prod1.example.com
prod2.example.com
prod1.example.com prod2.example.com
prod1.example.com prod2.example.com
prod1.example.com prod2.example.com
prod1.example.com prod2.example.com
primary secondary
secondary
passive
My priority is 2
My priority is 1
secondary
secondary
passive
primary
secondary
passive
secondary
secondary
passive
secondary
primary
passive
passive
okay
all set
scaling
(rdbms)
A-E
F-J
K-O
P-T
U-Z
A-E
F-J
K-O
P-T
U-Z
A-E
F-J
K-O
P-T
U-Z
A-E
F-J
K-O
P-T
U-Z
A-E
F-J
K-O
P-T
U-Z
Insert Linus
A-E
F-J
K-O
P-T
U-Z
Insert Linus
A-E
F-J
K-O
P-T
U-Z
$ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help" for help >
$ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help" for help > db.foo.insert({x:1})
thank you!
@kchodorow
http://www.snailinaturtleneck.com