MongoDB and RDBMS

  • 1,050 views
Uploaded on

A look into the distinctions between MongoDB and RDBMS by Nuri Halperin.

A look into the distinctions between MongoDB and RDBMS by Nuri Halperin.

More in: Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
1,050
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
15
Comments
0
Likes
2

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. RDBMS / MongoDBNuri HalperinFeb 2012
  • 2. >outline();[ {layerisms: where is your app?}, {engine: notes about engine}, {dataStructure: internals data structures}, {schema: less and more}, {index: type and applicability}, {update: semantics and mechanics}, {transaction: dread no more}, {security: just a touch}]
  • 3. >layerisms> db.rdbms.find({_id:layerisms});{ "_id" : "layerisms", "tiers" : [ "App", "Service","DB" ], "dblogic" : { "exists" : true } }> db.mongo.find({_id:layerisms});{ "_id" : "layerisms", "tiers" : [ "App", "Service","DB" ], "dblogic" : { "exists" : false } }// practice: let your service layer do the logic.
  • 4. >engine> db.rdbms.find({_id:engine});{ "_id" : "engine", "language" : [ "C++", "C","Other?" ] }> db.mongo.find({_id:engine});{ "_id" : "engine", "language" : "C++" }// hardly the issue.// performance due to other factors
  • 5. >dataStructure> db.rdbms.find({_id:dataStructure});{ "_id" : "dataStructure", "type" : [ "BTree","Hashset", "bitmap" ] }> db.mongo.find({_id:dataStructure});{ "_id" : "dataStructure", "type" : "BTree" }// MongoDB has very low memory mgmtoverhead. Most RDBMS do more memory mgmg
  • 6. >schema> db.rdbms.find({_id:schema});{ "_id" : "schema", "_" : { "schama" : true,"tables" : true, "udt" : true, "types" : [ "sqltypes", "native" ], "namespace" : true } }> db.mongo.find({_id:schema});{ "_id" : "schema", "_" : { "schema" : false,"tables" : false, "udt" : false, "types" : [ "BSON"], "namespace" : true } }// Most significant. This is why dev loves NoSql.// Good drivers alleviate need for ORM.
  • 7. >index> db.rdbms.find({_id:index});{ "_id" : "index", "pk" : "auto", "ak" : true,"subObject" : false, "fulltext" : "*", "array" : false}> db.mongo.find({_id:index});{ "_id" : "index", "pk" : "auto", "ak" : true,"subObject" : true, "fulltext" : false* , "array" :true }// fulltext = think lucene, not regex.// may be coming to MongoDB
  • 8. >update> db.rdbms.find({_id:update});{ "_id" : "update", "multirecord" : true,"singlerecord" : true, "atomic" : "*", "fluent" :true, "crosstable" : true }> db.mongo.find({_id:update});{ "_id" : "update", "multirecord" : true,"singlerecord" : true, "atomic" : "*", "fluent" :true, "crosstable" : false }// the existance of cross-table cross-record locksis a major source of RDBMS slowness
  • 9. >transaction> db.rdbms.find({_id:transaction});{ "_id" : "transaction", "crossRecord" : true,"optimistic" : true, "pessimistic" : true }> db.mongo.find({_id:transaction});{ "_id" : "transaction", "crossRecord" : false,"optimistic" : "dev", "pessimistic" : false }// RDBMS let you choose consistency model.// MongoDB supports optimistic model withupdate syntax.
  • 10. >security> db.rdbms.find({_id:security});{ "_id" : "security", "transport" : true, "identity": true, "objectLevel" : true }> db.mongo.find({_id:security});{ "_id" : "security", "transport" : false, "identity": true, "objectLevel" : false }// RDBMS offer schema level security.// MongoDB has no schema: r, rw
  • 11. Looking forward toAggregation++Full text indexGeo++I love quartely releases..