News for hackers. Stuff that matters.
Re:We Can Do Better Than SQL by achr2 on Tuesday August 11, 2020 @10:32AM (#24120644)
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.
Re:We Can Do Better Than SQL by wtetzner on Tuesday August 11, 2020 @12:09PM (#24121959)
That 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.

Re:We Can Do Better Than SQL by achr2 on Tuesday August 11, 2020 @01:18PM (#24122860)
I 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.
Re:We Can Do Better Than SQL by wtetzner on Thursday August 13, 2020 @02:17PM (#24146391)
> 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.

Re:We Can Do Better Than SQL by nine_k on Tuesday August 11, 2020 @04:42PM (#24125737)
It's the problem with the object model. Yes, I think ORMs are an anti-pattern, ActiveRecord-style especially.
Re:We Can Do Better Than SQL by scarface74 on Wednesday August 12, 2020 @11:16AM (#24132875)
And 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.