DJANGO <3 MONGODB <br />Django-MongoDB Integration Comparison<br />
Official Recommendation<br />“It is our recommendation that new users begin by working directly with PyMongo, as described...
The Candidates (With ORM-like Layer)<br /><ul><li>Django </li></ul>https://github.com/aparo/django <br />Official but stil...
Schema Design Comparison<br />MongoKit<br />classBlogPost(Document):<br />       structure = {<br />'title': unicode,<br /...
Field Type Comparison<br />MongoKit<br />MongoEngine<br />type(None)<br />bool<br />int<br />float<br />Long<br />unicode<...
Performance Benchmark Comparison<br />S<br />E<br />C<br />O<br />N<br />D<br />S<br />
Schema Design<br /><ul><li>Many to many relationship</li></ul>http://www.mongodb.org/display/DOCS/Schema+Design<br /><ul><...
SQL Mapping<br /><ul><li>SQL to Mongo</li></ul>http://www.mongodb.org/display/DOCS/SQL+to+Mongo+Mapping+Chart<br />
Tools<br /><ul><li>MongoHub (MongoDB GUI for MAC)</li></ul>http://mongohub.todayclose.com/<br />
More References<br />PyMongo Documentation - Tools<br />http://api.mongodb.org/python/1.9%2B/tools.html<br />Sample Applic...
Upcoming SlideShare
Loading in …5
×

Django and MongoDB Integration Analysis

3,887 views

Published on

Resource guide for integrating MongoDB with Django framework

Published in: Technology
  • Be the first to comment

Django and MongoDB Integration Analysis

  1. 1. DJANGO <3 MONGODB <br />Django-MongoDB Integration Comparison<br />
  2. 2. Official Recommendation<br />“It is our recommendation that new users begin by working directly with PyMongo, as described in the rest of this documentation. Many people have found that the features of PyMongo are enough for their needs. Even if you eventually come to the decision to use one of these layers, the time spent working directly with the driver will have increased your understanding of how MongoDB actually works.” – MongoDB<br />
  3. 3. The Candidates (With ORM-like Layer)<br /><ul><li>Django </li></ul>https://github.com/aparo/django <br />Official but still in fork, unstable version<br /><ul><li>MongoDJ</li></ul>https://github.com/ixc/mongodj <br />direct integration, backs on django-nonrel, but outdated<br /><ul><li>MiniMongo</li></ul>https://github.com/slacy/minimongo<br />Lightweight, very active, less features<br />MongoEngine <br />https://github.com/hmarr/mongoengine<br />Feature ready, top performance, active development<br />MongoKit <br />https://github.com/namlook/mongokit <br />Feature heavy, very active development<br />DjanMon <br />https://github.com/mdirolf/djanMon/ <br />dev from 10gen, outdated<br />
  4. 4. Schema Design Comparison<br />MongoKit<br />classBlogPost(Document):<br /> structure = {<br />'title': unicode,<br />  'body': unicode,<br />'author': pymongo.objectid.ObjectId,<br />         'created_at': datetime.datetime,<br />         'tags': [unicode],<br />}<br />     required_fields = ['title','author’,'date_creation']<br />MongoEngine<br />classBlogPost(Document):<br />title = StringField(required=True) body = StringField()<br />author = ReferenceField(User)<br />created_at = DateTimeField(required=True)<br />tags = ListField(StringField())<br />
  5. 5. Field Type Comparison<br />MongoKit<br />MongoEngine<br />type(None)<br />bool<br />int<br />float<br />Long<br />unicode<br />list<br />Dict<br />datetime.datetime<br />pymongo.binary.Binary<br />pymongo.objectid.ObjectId<br />pymongo.dbref.DBRef<br />pymongo.code.Code<br />type(re.compile(""))<br />CustomType<br />StringField<br />URLField<br />IntField<br />FloatField<br />DecimalField<br />DateTimeField<br />ListField<br />DictField<br />ObjectIdField<br />EmbeddedDocumentField<br />ReferenceField<br />GenericReferenceField<br />
  6. 6. Performance Benchmark Comparison<br />S<br />E<br />C<br />O<br />N<br />D<br />S<br />
  7. 7. Schema Design<br /><ul><li>Many to many relationship</li></ul>http://www.mongodb.org/display/DOCS/Schema+Design<br /><ul><li>DBRef</li></ul>http://www.mongodb.org/display/DOCS/Database+References<br />
  8. 8. SQL Mapping<br /><ul><li>SQL to Mongo</li></ul>http://www.mongodb.org/display/DOCS/SQL+to+Mongo+Mapping+Chart<br />
  9. 9. Tools<br /><ul><li>MongoHub (MongoDB GUI for MAC)</li></ul>http://mongohub.todayclose.com/<br />
  10. 10. More References<br />PyMongo Documentation - Tools<br />http://api.mongodb.org/python/1.9%2B/tools.html<br />Sample Application using MongoEngine<br />http://rezmuh.sixceedinc.com/2010/02/create-a-simple-app-with-django-and-mongodb-part-1.html<br />Related discussions (check out related questions too)<br />http://www.quora.com/If-I-dont-use-ORMs-and-templates-whats-the-benefit-to-using-Django<br />

×