3 ms·
Also, consider the fact that Mongo is a document database, where each document has it's own schema. Postgres (and most other relational databases), has a single
by binspace 16y ago
Also, consider the fact that Mongo is a document database, where each document has it's own schema. Postgres (and most other relational databases), has a single schema for the table.
There are tradeoffs with each approach. I've found that that migrating Mongo documents tends to require more software for easy migrations, but also tends to be more flexible.
For example, you can lazily cache data from services and since the schema is flexible, a single collection can seamlessly hold different types of records.
Replication is also more natural with Mongo.
Of course, reporting and getting aggregate data is easier with Postgres.