4 ms·
The thing is, you still have a schema. You always have a schema. It's just defined implicitly in your application rather than explicitly in your database. I
by AlisdairO 13y ago
The thing is, you still have a schema. You always have a schema. It's just defined implicitly in your application rather than explicitly in your database. I agree that during dev time Mongo conveniently eliminates the hassle of recreating your DB all the time, but I just don't see how it makes the problem of schema easier. And even if you desire this flexibility, I can't see the advantage over using Postgres with a JSON type for the flexible parts of your data, and relational data for the bits you know about.
And without knowing your schema in advance, how do you ensure consistency? If you want consistency with mongo you basically need to either group all data that will get modified in any one logical operation into a single document, or you need to have (potentially extremely complex) strategies for resolving conflicts in between modifications to groups of documents. Achieving either implies a decent bit of domain knowledge.