3 ms·
>Even when using ACID compliant databases I am genuinely sad that such a statement would ever be uttered. "Even when"? Why would you choose to use a database
by SomeOtherGuy 15y ago
>Even when using ACID compliant databases
I am genuinely sad that such a statement would ever be uttered. "Even when"? Why would you choose to use a database that isn't reliable?
>Consistency check should be replicated in your application layer, atleast for mission critical data.
Maybe if there were some way to do that, but there isn't. It doesn't get replicated, it gets re-implemented, which is quite different. And it results in application code in app X that says data is bad while the DB says it is ok, and then application Y also says it is ok and inserts it fine, and then app X pukes getting it back out later, etc. Leave the DB in charge of the rules and when it gives you an error, you can go ahead and relay that error to the user (in a nicer format one would assume).
- x3c 15y ago>I am genuinely sad that such a statement would ever be uttered. "Even when"? Why would you choose to use a database that isn't reliable? How many NoSQL DBs are guaranteed ACID compliant? They are reliable but not ACID. And consistency checks are put in application layer >Maybe if there were some way to do that, but there isn't. It doesn't get replicated, it gets re-implemented,.... I want to ensure that X is always equal to the sum of Y and Z. I can achieve consistency at Database. But It would be a waste of resources to query DB for consistency on each request when such check can be implemented at application level only, or even better at client side (assuming web application).