13
Kristina Chodorow OSCON 2009

OSCON 2009 Lightning Talk

Embed Size (px)

Citation preview

Page 1: OSCON 2009 Lightning Talk

Kristina Chodorow

OSCON 2009

Page 2: OSCON 2009 Lightning Talk
Page 3: OSCON 2009 Lightning Talk

collection

Page 4: OSCON 2009 Lightning Talk

logs

pie

database

eaters

fruit

Page 5: OSCON 2009 Lightning Talk

name : Burt

home : Kenya

born : Date(“2 years ago”)

price : 29.99

color : black

fromTheSixties : true

Page 6: OSCON 2009 Lightning Talk

captain : “Kirk”

ship : “NCC 1701”

stardate : 2634.3

space.star.trek.save(obj)

Page 7: OSCON 2009 Lightning Talk

Querying

db.star.trek.find({stardate : {$gt : 1234.0},

$where : function(obj) {

illogicalFunc = function() {/*…*/};

if (illogicalFunc(obj.spock)) { /* … */ }

else { /* … */ }

}})

Page 8: OSCON 2009 Lightning Talk

Indexes

• Ascending/Descending

• Single/Multiple Key

• Unique/Non-unique

Page 9: OSCON 2009 Lightning Talk
Page 10: OSCON 2009 Lightning Talk

Getting It

$ curl -O

http://downloads.mongodb.org/linux/mongodb-

linux-i686-latest.tgz

$ tar zxvf

http://downloads.mongodb.org/linux/mongodb-

linux-i686-latest.tgz

$ mkdir ~/db

$ mongodb-linux-i686-latest/bin/mongod –-

dbpath ~/db

www..mongodb.org/display/DOCS/Downloads

Page 11: OSCON 2009 Lightning Talk

JavaScript Shell

$ mongodb-linux-i686-

latest/bin/mongo

url: test

connecting to: test

type “help” for help

>

Page 12: OSCON 2009 Lightning Talk
Page 13: OSCON 2009 Lightning Talk

http://www.mongodb.org

Google Groups: mongodb-user

irc.freenode.net#mongodb

@mongodb, @kchodorow

[email protected]

http://www.slideshare.net/kchodorow