4 ms·
It's not a simple yes/no question. For instance, is a database not ultimately a single mutable global state?
by aphextron 6y ago
It's not a simple yes/no question. For instance, is a database not ultimately a single mutable global state?
- baq 6y agoA database connection perhaps, but different connections to the same database will see different states of the database depending on the isolation level of the current transaction.
- chousuke 6y agoDatabases are also designed for safe concurrent access with enforceable constraints on data. Would you like your application behaviour to depend on a transient "database" someone made up on the fly? :) I think the key is that your database stores data that lives outside your application, making it observable outside any particular application instance and allowing you to perform ad-hoc queries to validate consistency and fix problems. If you have such mutable state inside a process, it can be very difficult to debug problems when a series of interactions sends your process into an inconsistent state that is only detected some hours later when (if) it finally crashes.