Created
May 14, 2011 04:35
-
-
Save sri/971922 to your computer and use it in GitHub Desktop.
mongo db
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.10gen.com/video/mongosv2010/intro | |
mongo - shell | |
mongod, mongos - db w/ sharding | |
db has collection of documents | |
bson for fast scanability - think 2mb json string | |
bson can store binary data (no need to do base64) | |
namespace -- fully qualified db name & collection name | |
_id => unique id in system; server can create (12-bytes) | |
guid can be stored as byte-array | |
documents - doesn't have to have same fields; & fields | |
can have diff data types | |
LIKE sql -- give regex | |
no JOINs, no complex TRANSACTIONs | |
atomic on single documents -- strong consistency | |
query: { a: { $gt: 10 } } | |
advanced querys | |
GridFS store large documents | |
pull down & update parts of documents | |
update if present, else insert | |
no rollbacks - hard to scale out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment