Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I thought the main advantage of document-oriented schema-less databases (I haven't used MongoDB but I have used CouchDB) was that they are supposed to give more flexibility in the early stages of projects.

Depends on your requirements, I guess. If you want to maintain even eventual consistency, any update that crosses document boundaries has to be thought about very seriously in order to avoid breakages in the face of concurrent modifications. So, ideally you design your documents such that any one logical operation only has to hit one document.

This is pretty easy for very simple tasks, but can get rapidly more difficult in the face of more complex or changing requirements. I suspect a substantial proportion of Mongo or Couch based applications simply ignore this problem, and are lucky that they don't have enough concurrent activity that stuff breaks frequently.

Using Postgres/JSON neatly avoids this problem because you get ACID back, and you can do cross-document updates all you like.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: