Is MS Solving ORM from the Wrong End?
On my drive home this afternoon I listened to episode 102 of Hanselminutes, where Scott talks to Mike Pizzo from the ADO.NET Entity Framework team.
Mike's description of the EF was great - it was a much better show than the recent .NET Rocks! episode on the same topic. Something that Mike said, however, really caught my attention. He talked about the impedance mismatch between the way we code our objects and the way relational databases store data. The fact that relational databases just have tables and constraints, and don't have concepts for relationships, inheritance etc.
It's an old problem, and one that countless ORM (object-relational mapping) products have tried to solve over the years. The Entity Framework is just the latest in a long string of attempts from Microsoft to make object-oriented coding against a relational database easier.
But is Microsoft attacking the problem from the wrong end?
Is there a reason that SQL Server, or (better still) a new database product from Microsoft, couldn't introduce concepts like relationships and inheritance? I mean, I know that such concepts aren't supported by standard SQL ... but is that a big deal? Unless I'm writing a product that can support multiple database back-ends, do I really care if the access method for the database is standard SQL?
What if Microsoft were to bring out a product whose only means of access, rather than SQL, was via the CLR? A database with object-oriented properties like inheritance and relationships, but also relational features we've come to depend on like indexes and constraints? Wouldn't that be worth something to all us .NET developers?
I know there are object-based and hierarchical databases out there, but really Microsoft is in the unique position of being able to bring such an animal into the mainstream, with full .NET support. Is it too much to ask?
# Trackback from Jason Haley on 4/03/2008 12:51 AM
Comments
# Julie Lerman
5/03/2008 5:34 AM
While I probably shouldn't expect to be able to explain EF as well as one of the top program managers on the Data Programmability team at Microsoft who has been instrumental in E.F.s design, I'd definitely be interested in hearing how I can improve my explanation. What was it about Mike's scripted talk that spoke to you vs. my conversation with Richard and Carl, that, driven their questions, was definitley all over the map?
Feel free to email me directly. info@thedatafarm.com.
Thanks.
Julie
# mabster
5/03/2008 7:34 AM
Hi Julie,
First, let me say this:
JULIE LERMAN POSTED A COMMENT ON MY BLOG!!!!!!!!!!!!!!!!!!
Now, onto your question! :)
Don't get me wrong - I found the show entertaining. It just didn't explain to me in great enough detail the differences that the Entity Framework has over technologies like Typed DataSets or LINQ to SQL.
Like, if I remember right you mentioned early in the show about LINQ to SQL not working well across tiers, and the guidance from MS steering people away from it for anything other than RAD development, but Carl and Richard never pursued that line of questioning. That would have been very interesting to me.
I would love to see you do a dnrtv episode with Carl where you create an EF application and show us some of the more advanced features.
Thanks for commenting! Still getting over the shock!
(I'll email this too just in case.)
# Dimitris-Ilias Gkanatsios
9/03/2008 10:06 PM
"Is there a reason that SQL Server, or (better still) a new database product from Microsoft, couldn't introduce concepts like relationships and inheritance? "
I think that what you refer to is Object Databases ODBMS
en.wikipedia.org/.../Object_database
If I am not mistaken, though, these kinds of data stores never made it into the market...
# mabster
10/03/2008 5:43 PM
Yes, Dimitris, I was referring to both object databases and the lesser-known hierarchical databases:
en.wikipedia.org/.../Hierarchical_database
In much the same way that MS are introducing functional-language features into C#, I'd like to see them introduce object- and hierarchical-database features into SQL Server, or bring out an all-new franchise.