Re:MongoDB queries don’t always return all matching documents
by NateDad on Wednesday June 08, 2016 @12:05PM
(#11863184)
That sounds horrible. No wonder you've never done a migration - it's been made impossible. Why would you not hide the database behind an API, so that you CAN migrate it, change it, etc? This is like not having a separate data layer in your application, except it's across many applications all at once.
[ Parent
| on HN ]
Re:MongoDB queries don’t always return all matching documents
by gaius on Wednesday June 08, 2016 @12:30PM
(#11863445)
What API do you suggest? Bear in mind it needs to provide the same results and enforce the same constraints for everything from COBOL to Java to Excel to ColdFusion to Python to R and any other future language. I mean you could write your business logic in all of them, and maintain it in all of them, but that would be insane.
These are solved problems, have been for decades.
Re:MongoDB queries don’t always return all matching documents
by NateDad on Wednesday June 08, 2016 @12:53PM
(#11863634)
Yes, and the way you solve it is by having an API that holds your business logic. That's how you avoid duplicating business logic in all those applications. Is your database just chock full of insane triggers and functions?
Business logic doesn't belong in a database. data does.