Upgrade to Pro — share decks privately, control downloads, hide ads and more …

MongoDB KNPLabs GeekTime

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.

MongoDB KNPLabs GeekTime

Avatar for Oleg Zinchenko

Oleg Zinchenko

August 08, 2014
Tweet

More Decks by Oleg Zinchenko

Other Decks in Programming

Transcript

  1. JS console ➜ bin ./mongo MongoDB shell version: 2.6.3 connecting

    to: test > var a = 10 > var b = 20 > a + b 30 >
  2. Entities Relational DB MongoDB database database table collection row document

    index index primary key _id Sharding partition shard partition key shard key
  3. Special _id type 5033ea5c e84df1 110f 000001 Timestamp Hostname PID

    Sequence 12-byte, binary string Easily generated in cluster environments Timestamp prefix useful for sorting
  4. Document Example { "_id": 1, "title": "Praesent ante dui", "body":

    "Lorem ipsum…", "author": { "name": "Bob", "email": "[email protected]" }, "comments": [ { "body": "Morbi libero erat…", "author": { "name": "John", "email": "[email protected]" } }, { "body": "Dapibus quis…", "author": { "name": "Tom", "email": "[email protected]" } } ], "tags": [ "luctus", "rhoncus" ] }