6 ms·
As a counterpoint I find that nutting out the schema upfront is an incredibly helpful process to define the functionality of the app. Once you have a strict sch
by mulmboy 4y ago
As a counterpoint I find that nutting out the schema upfront is an incredibly helpful process to define the functionality of the app. Once you have a strict schema that models the application well nearly everything else just falls into place. Strong foundation
- HelloNurse 4y agoWith JSON blobs in simple tables a very large part of designing a database schema becomes designing a JSON schema, with different opportunities to make mistakes but (potentially) the same strictness.
- mulmboy 4y agoHow do you enforce the JSON schema?
- HelloNurse 4y agoWe are talking about the internal database of some application: its schema is something that should be designed well, not enforced defensively like a schema for validating undependable inputs.
- tenken 4y agoIn the application layer
- breeze1990 4y agodefine schema with data class and you have tools like protobuf/thrift. And I find it really unnecessary to map every attribute to a SQL column.
- wenus 4y agoNutting?
- Rebelgecko 4y agohttps://www.macmillandictionary.com/us/dictionary/american/nut_2 https://www.macmillandictionary.com/us/dictionary/american/n...
- chris1993 4y agoThinking. British English idiom. Using your nut - your head.
- mulmboy 4y agohttps://idioms.thefreedictionary.com/nutting+out https://idioms.thefreedictionary.com/nutting+out
- freedomben 4y agoI worked at a startup who did the whole "every table schema is "id, data" where data is a JSON blob with all the data." I loved it at first. For initial development, it felt so freeing and so productive. Then one of the devs left and I inherited his code, and started to realize exactly how much the rigid schema helps make an app more robust and more maintainable. I will never, ever take that shortcut again. The production outages/downtime caused by database issues that never should have been an issue in the first place (like a corner case row that missing data? Spreading rampant defensive nil checks out across every function that checks any field of a record since any at any time might be inconsistent or nil) contributed to killing the company by pissing off customers. Elixir/Phoenix does help a lot though because I still treat most rows like JSON objects, but under the hood it's a normal rigid postgres schema. Best of both worlds IMHO.