r/programming • • Oct 10 '26

What's the Cost of Object-Relational Mapping?

https://pvrlabs.xyz/java-performance/experiments/spring-boot-jpa-vs-jdbc.html
0 Upvotes

12 comments sorted by

-1

u/AllCowsAreBurgers Oct 10 '26

And the cost of not doing it is uglier and less maintainable code. But the age of AI has taken some of the arguments for ORM's

0

u/fykup Oct 10 '26

That's fair. My experiment measures the runtime costs, not the maintainability benefits of ORM.

Personally, I've rarely found full ORMs useful outside larger enterprise projects, where consistency across teams can matter more. For small teams and personal projects, I've always preferred simpler abstractions like Spring JDBC or MyBatis. They provide enough convenience while keeping SQL explicit.

And yes, with AI making SQL and mapping code easier to write, that approach becomes even more attractive without the overhead of a full ORM.

5

u/simon_o Oct 11 '26

I think there is a big difference between what many people actually want – shuffling results from database queries into Java records without raw-dogging JDBC – and buying into the whole entity-manager live-object hidden-proxy Hibernate bullshit.

2

u/fykup Oct 11 '26

Exactly. There’s a good middle ground between raw JDBC and a full ORM. Libraries like Jdbi 3 and MyBatis give you convenient SQL mapping without the complexity of entity lifecycle management, lazy loading, and hidden queries. For many small services, that’s all you need.

-1

u/everyday847 Oct 12 '26

Fabulous caption to your first bar chart, informing the y-axis-blind reader that both charts start at zero. Maybe your target audience is your fellow LLMs.

1

u/fykup Oct 12 '26

Fixed, thanks for catching it. The intent was to make the zero baseline explicit, since truncated axes can exaggerate differences. But the axes already show that, so it was redundant.

Funny how traditional grammar nitpicking has evolved into hunting for traces of LLMs. One redundant sentence doesn't make an entire experiment AI-generated.

1

u/everyday847 Oct 12 '26

The experiment isn't, but the writing plainly is! If it were a marker of high quality output that would be one thing, but it's instead a marker of something that's been quite lazily thrown together.

1

u/fykup Oct 12 '26

You made a fair point about the caption, and I fixed it. But I'm interested in substantive criticism of the experiment, its methodology, results, or conclusions, not speculation about how the article was written.

If you see actual flaws in the experiment or have a better interpretation of the results, I'm happy to discuss them. Otherwise, I think we've exhausted this topic.

-1

u/everyday847 Oct 12 '26

Yes, it is very clear you are unwilling to discuss how you produce articles.

0

u/Hacnar Oct 13 '26

I am tired of this pointless nitpicking. Is the writing bad? Discuss its shortcomings. It isn't bad? Then better stay quiet and leave the room in the discussion for topics with substance.

1

u/everyday847 Oct 14 '26

Amusingly, the very first thing I offered was in fact a shortcoming of the bad writing! That's what I led with!

0

u/Hacnar Oct 14 '26

Unfortunately, that one important sentence is only ~10% of your comments here, essentially lost in the sea of nothingness.