5 ms·
"Schemaless databases" are cool. I would rather maintain as little schema as possible in the database and instead keep it in my code. Schema must exist somewher
by robmccoll 11y ago
"Schemaless databases" are cool. I would rather maintain as little schema as possible in the database and instead keep it in my code. Schema must exist somewhere because my data model exists. Since the data model and my program are tightly coupled (since the entire point of the program is to manipulate internal data state due to external and internal stimulus and produce output), keeping them together makes the overall system manageable versus the headache of effectively having code in two places. This is similar for complicated routing configurations pushed to proxies and other external config. They are really part of your code.
- MrBuddyCasino 11y agoIf you can specify those invariants in your code in a concise and declarative way, minimizing the chance for bugs, then great. Thats not how it usually works though. Also, how do you want to perform foreign key checks outside of the db in a way thats fast?
- carapace 11y ago"If you can specify those invariants in your code in a concise and declarative way" ...then you've got a schema. ;-)
- collyw 11y agoTry programming that way for a few more years. It will wear you down.