Hacker News new | ask | show | jobs
by _random_ 4447 days ago
What would be your plan for ensuring referential integrity when working with MongoDB?
1 comments

For me the ORM provided some comfort here but this is one of the concerns that caused me to revert to MySQL.

Essentially you end up with an a lot of linking by item IDs as you would with a traditional relational database but the "eventual consistency" was where I thought there may be issues in the future.

I personally never saw problems stemming from this but my projects using MongoDB never really even hit a million objects in a single collection (not 100% sure on that). Again, at scale is where I'd lose confidence.

This is entirely speculation but when it comes to critical infrastructure I can't leave anything to chance.