A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://blog.codinghorror.com/object-relational-mapping-is-the-vietnam-of-computer-science/ below:

Object-Relational Mapping is the Vietnam of Computer Science

Object-Relational Mapping is the Vietnam of Computer Science

I had an opportunity to meet Ted Neward at TechEd this year. Ted, among other things, famously coined the phrase “Object-Relational mapping is the Vietnam of our industy” in late 2004.

It’s a scary analogy, but an apt one. I’ve seen developers struggle for years with the huge mismatch between relational database models and traditional object models. And all the solutions they come up with seem to make the problem worse. I agree with Ted completely; there is no good solution to the object/relational mapping problem. There are solutions, sure, but they all involve serious, painful tradeoffs. And the worst part is that you can’t usually see the consequences of these tradeoffs until much later in the development cycle.

Ted posted a much anticipated blog entry analyzing the ORM problem in minute detail. It’s a long post. But unless you’re a battle-scarred veteran of the ORM wars, I highly recommend at least skimming through it so you’re aware of the many pitfalls you can run into trying to implement an ORM solution. There are a lot of magic bullets out there, and no shortage of naïve developers.

Ted’s post is excellent and authoritative, but it’s a little wordy; I felt like I was experiencing a little slice of Vietnam while reading it. Let’s skip directly to the summary at the end which provides an great list of current (and future) solutions to the ORM problem:

Ted quickly posted a follow up entry which addressed common criticisms of his original post. If you have an itchy left mouse finger poised over the “comment” link right now, you may want to read that first. Personally, I think the only workable solution to the ORM problem is to pick one or the other: either abandon relational databases, or abandon objects. If you take the O or the R out of the equation, you no longer have a mapping problem.

It may seem crazy to abandon the traditional Customer object – or to abandon the traditional Customer table – but picking one or the other is a totally sane alternative to the complex quagmire of classes, objects, code generation, SQL, and stored procedures that an ORM “solution” typically leaves us with.

Both approaches are certainly valid. I tend to err on the side of the database-as-model camp, because I think objects are overrated.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4