3 ms·
There's no reason you can't use MongoDB with relational data. Foreign references? They've got them. https://docs.mongodb.com/manual/reference/database-referenc
by a13n 8y ago
There's no reason you can't use MongoDB with relational data.
Foreign references? They've got them. https://docs.mongodb.com/manual/reference/database-references/ https://docs.mongodb.com/manual/reference/database-reference...
ACID transactions? They've got them. https://www.mongodb.com/transactions https://www.mongodb.com/transactions
- tjpnz 8y agoBut why wouldn't I just use Postgres instead?
- a13n 8y agoBut why wouldn't you just use MongoDB instead?
- felixfbecker 8y agoIf relations are embedded in a document then you favour querying from the "side" of the relation that is the outer document. But usually you cannot anticipate from what sides of the relation you may want to query in the future. As such, MongoDB may scale nicely for performance, but it doesn't scale nicely for business needs. A relational database is completely unbiased in that regard, you do not need to make nor encode any decision on what would be the "outer" document or inner nested objects. It's all just entities and relations.