TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Object-Relational Mapping Is the Vietnam of Computer Science (2006)

3 pointsby coryfklein3 months ago

1 comment

bob10293 months ago
Relational is often at odds with OO due to its ability to handle circular dependencies. This also makes it superior when modeling the more complex domains.<p>The best solution is to execute the SQL as close to the dependent call site as possible. For example, instead of defining a common User model that will satisfy 100% of the codebase by pulling a wide row every time, define a query per application view or other logical area of the product.<p>After you get used to the idea of doing things this way, it completely unshackles your ability to build things. You no longer have to trip over the hard boundaries of centralized domain types. This is a mental prison. You can go <i>way</i> faster without these tools. Joining tables together will become 2nd nature. You&#x27;ll begin to push problems into the RDBMS instead of belaboring them in code. That 400 line method (despite heavy use of LINQ) probably could have been 20 lines of recursive CTEs.<p>Also think of much faster the data operations are when they are carried out in the same place the data lives. Much of the code slop out there is just a really elaborate way to implement an ETL script.