4 ms·
Mongo's really great for rapid prototyping. You don't need to worry about updating the schema at the db level, it can store any type of document in any collecti
by bkanber 13y ago
Mongo's really great for rapid prototyping. You don't need to worry about updating the schema at the db level, it can store any type of document in any collection without complaining, it's really easy to install and configure, the query language is simple and only takes a couple of minutes to learn, it's pretty fast in most use cases, it's pretty safe in most use cases, and it's easy to create a replica set once your prototype gets usage and starts scaling.
Mongo does everything well up until you reach the level where you need heavy-hitting, at-scale, mission-critical performance and reliability. Most projects out there (99 in 100?) will never reach the level of scale that requires better tools than mongo. And since the rest of it is so easy to use, it makes mongo a great starting point. You can always switch databases later, but mongo gives you the flexibility to concentrate on more important things in the early stages of a project.
- MichaelGG 13y agoWhat does it offer over using Postgres (or others) with a JSON column? Or MS SQL with an XML column?
- bkanber 13y agoEase of use.
- deleted 13y ago[deleted]
- integraton 13y ago> You don't need to worry about updating the schema at the db level What's your magic non-db level, supposedly-easier-than-updating-a-schema approach to renaming a field common to all existing documents in a collection, eg, rename an "author" field to "writer"?
- dodyg 13y agoThis is where a nice query/manipulation language come handy http://www.rethinkdb.com/api/#js http://www.rethinkdb.com/api/#js
- integraton 13y agoAgreed. PostgreSQL: ALTER TABLE posts RENAME COLUMN author TO writer; MongoDB: db.posts.update({}, {$rename:{"author":"writer"}}, false, true); (I'm excluding RethinkDB since it's still under development and doesn't have a rename command yet)
- orthecreedence 13y agoI don't think it really needs a `rename` command. The query language supports it without: r.table('posts').replace(function(item) { return item.without('author').merge({writer: item('name')}); })
- coffeemug 13y agoThat works, but it is a bit annoying to type. We'll add a porcelain command for this soon. See https://github.com/rethinkdb/rethinkdb/issues/881 https://github.com/rethinkdb/rethinkdb/issues/881.