by dkjaudyeqooe · 3y ago · 0 comments
> I can now query multiple databases
This is another thing I disagree with. Wherever possible related data should be centralised to improve ACID properties and to create a reliable single "source of truth". I know this is unfashionable. with everyone claiming they need massive scale (which does cause some issues with this design), but much like microservices, it ends up being mostly busy work for programmers and related professions.
Having said that, multiple databases, if largely orthogonal to each other present no real problems, and the same design concept is applied to each.
My favorite ORM says the same thing: https://sequel.jeremyevans.net/rdoc/files/doc/validations_rd...
I wouldn't be surprised if more people agree with that as well, maybe just using different terms.
No, my view is the opposite of that: the database doesn't allow anything invalid to enter the database.
Things go wrong when the DB trusts the application layer (rather than doing its own validation) -- e.g. the DB should control what is valid data, not the application layer.