MongoDB Is A Breath of Fresh Air
Overall Satisfaction with MongoDB
Since we're using the Meteor/Node.js "stack", MongoDB is a given (it is currently the only database supported by Meteor). I'm currently juggling three start-ups using Meteor/MongoDB. Two of them are SaaS start-up involving both websites and hand-held devices (multi-tenant/cloud), and one is a B2C website. MongoDB provides primary data storage for all three projects.
Pros
- No schema. The flexibility is incredible, I'm still getting used to this coming from decades of experience with relational databases. MongoDB gives you incredible flexibility for modeling. By comparison, working with relational databases feels like wearing a straight-jacket.
- Performance. One of our projects involves a MongoDB collection with tens of millions of records. Doing some tests on this, MongoDB doesn't seem to care, those supposedly "large" collections are nothing to this database. Given sufficient memory, Mongo will maintain most everything in memory and memory is now cheap.
- JSON-friendly. Because the actual storage format closely matches the object format used by both client and server, there is no "impedance mismatch" which is a big problem with relational databases. This is a big topic so if you don't know the issue Google "impedance mismatch" to learn more.
Cons
- The text-search feature is embryonic and needs some work. For technical reasons, text-search is done outside of the normal "find" mechanism used for traditional searches. This makes it tricky to use. It is also not possible to combine text with geo-spatial searches, which is something we need to do (we have to resort to two steps).
- Triggers are not yet supported. Virtually all relational databases support this, and it would be handy if MongoDB did support triggers written in JavaScript. Note that for us, this isn't a show stopper since our Meteor/Node.js system has support functionally-equivalent to triggers.
- Nothing measurable, all of my projects are still under development. I can attest that not having to maintain a fixed schema is an advantage in terms of development efficiency.
Comments
Please log in to join the conversation