5 ms·
I disagree, the relational model is very incongruous with the object model that nearly all LOB applications use. Which is where 99% of the usage issues lie.
by achr2 6y ago
I disagree, the relational model is very incongruous with the object model that nearly all LOB applications use. Which is where 99% of the usage issues lie.
- wtetzner 6y agoThat doesn't make the relation model bad, it just means there's an impedance mismatch. FWIW, I find the relational model to be much nicer than typical object models. Even in Java, which I write every day at work, I've found it to be much clearer to use immutable objects representing records. Not just for interacting with the database, but just for handling information in general. Of course, it would be extremely painful to do without Lombok's @Value, @Builder, and @With annotations.
- achr2 6y agoI agree that the mismatch is not a direct failing of SQL or the relational model - but we continue to use it without adopting a better approach or developing a common abstraction layer. With all of the syntax growth, SQL could certainly have a join syntax that understands object composition and returns structured data.
- wtetzner 6y ago> With all of the syntax growth, SQL could certainly have a join syntax that understands object composition and returns structured data. I mean, many RDBMS's have support for JSON and/or XML, so you can sort of get it. However, I wonder if we'd be better of as an industry if we dealt with our data in code in a more relation-y way than an object-y way.
- nine_k 6y agoIt's the problem with the object model. Yes, I think ORMs are an anti-pattern, ActiveRecord-style especially.
- scarface74 6y agoAnd then you end up inventing your own ORM and “helpers” because eventually the results end up in objects. I do hate most ORMs. The only oneS I like are Linq based ORMs. The “ORM” is actually well integrated into the language. You might as well use something like Dapper. But yes agreed about ActiveRecord.