3 ms·
I’ve never enjoyed Mongo for a second, not conceptually, not practically. But I don’t understand the people who act like Postgres is the end of everything. SQL
by linkmotif 8y ago
I’ve never enjoyed Mongo for a second, not conceptually, not practically.
But I don’t understand the people who act like Postgres is the end of everything. SQL never felt right for me either. It’s a fine language for business analysis, I guess, but is it actually pleasant for development? Do all of you who so enthusiastically post that it should be the first tool you reach for really never experience object-relational impedance? Do you really enjoy modeling like this?
- acdha 8y agoYes: what you’re really doing is documenting your data structures and access patterns, which is way less work to do consciously rather than trying to bolt it on ad hoc. A really big thing is normalization which some people tend to downplay until they’ve had to write code to recurse complex structures enforcing consistency or making global changes. Similarly, atomicity and isolation are really useful characteristics to be able to take for granted without having to code around the problem everywhere. The usual arc I've seen for document stores, ISAMs, etc. is that people say this is great based on the first 20 minutes and then about a year later realize that they've spent thousands of lines of code implementing a really clunky subset of what they'd get out of the box with a SQL database and the believed ease of use or performance benefits were far less dramatic than promised or even negative.
- linkmotif 8y agoRight, Postgres is better than document stores, but is it actually pleasant to store your data in square tables and then process it to runtime objects from that? Even with battle tested ORMs, it’s never felt right for me.
- chousuke 8y agoI find it very pleasant, but I also tend to avoid ORMs. I can just write SQL queries to get me the data I need in any form I want, and it's not always useful to stuff that into objects when I can just process it as is.
- linkmotif 8y agoProcessing data from format to format is a total drag to me. I just can't do it.
- acdha 8y agoORM design definitely matters — I mostly use the Django ORM which generally feels right and has convenient escape hatches — but I've also seen a fair number of cases where people complaining about the ORM were really reflecting the fact that their project's data model was somewhat off of what it wanted to be and a migration was in order. The real win for me is once you're doing anything more than just loading an object: once you need to do any sort of reporting, filtering, querying, etc. I appreciate the effort spent on normalization.