3 ms·
Don't feel bad: databases and object-oriented programming are also at odds. It's no accident that object-relational mappers are so leaky.
by RyanMcGreal 14y ago
Don't feel bad: databases and object-oriented programming are also at odds. It's no accident that object-relational mappers are so leaky.
- bni 14y agoI agree. Especially if you are trying to have a 1:1 mapping between tables and classes. The convenience you gain in the short term will be paid by complexity, performance, and code base lock in 100 times in the middle and far term. The relational database and your imperative program are two different things, trying to "unify" them will not work.
- FuzzyDunlop 14y agoI'm of the opinion that the obsession with these ORMs is, in some small part, the result of an abject fear of using SQL directly. There's a certain incompatibility that prevents them being truly powerful without bending your schema to the will of the ORM, or without sacrificing a lot of the potential functionality SQL has to offer (and thus the readability of your code as you try to shoehorn these things in). I suppose NoSQL solutions help fill that niche, though.