Cover

Making Sense of Object-to-Relational Mappings

November 17, 2003
No Comments.

I’ve been following some threads on the DevelopMentor .NET Mailing Lists about what is a good solution for O/R Mapping.  I am intrigued by a couple of ideas, especially ones that no one seems to be talking about:

  • Which is the right direction?
    • Do I want to store my object graph in a database?
    • Do I want to expose my Database as an object graph?
  • What 3rd party applications support these?
  • How does ObjectSpaces in Whidbey meet these needs

I have felt a little left out in the cold lately when it comes to O/R mapping.  I have spent the last two years on my soapbox about using DataSets (more specifically Typed DataSets) as the answer to Business Objects.  I have known I am odds with other data-centric authors/speakers out there, but I still think that Typed DataSets are a good solution now and in Whidbey.  But what about ObjectSpaces?

I like what ObjectSpaces is attempting to do.  I am suprised by the relative speed that it is able to achieve.  A lot of smart people have been working on it for a long long time and it shows.  The problem rears its head in a production environment (which no Whidbey code should be in as of now).  In my experience, creating the business object layer (O/R Mapping) was only 20% of the job.  Tuning it for performance always seems to rear its ugly head.  From my experience with ObjectSpaces so far, I am not satisfied that it will be all that tunable.

In addition, I am hesitatant about OPath.  For the uninitated, OPath is ObjectSpaces SQL/XPath hybrid search language.  After talking with many people at Microsoft, I am still not convinced that an XQuery or XPath solution could not have worked.  Why I am worried about OPath?  It’s all about skill sets.  We have asked developers to learn different search skills for years now.  We are at a crossroads where developers are unindated with different skills.  “Do I learn XPath?  XQuery?  Hone my SQL Skills?”  If ObjectSpaces used XPath or XQuery, we could let them know that the skill is useful outside our specific software domain.  “Learn XQuery and you can use that same skill for searching databases (including Yukon and others)”.

So, do I hate ObjectSpaces?  Not at all!  I think for a very specific problem domain where development time is much more important than performance, ObjectSpaces can make things very easy.  This is the case in many corporate development shops.  Many shops simply write app after app to solve very small specific issues for in-house customers.  ObjectSpaces can excel here.  But would I advocate developing a high-performance, online-transactional system with ObjectSpaces?  No.

ObjectSpaces is in competition with commercial O/R mapping software.  The same foibles that 3rd party O/R Mapping software has had to deal with for years (many in the VB Space), ObjectSpace has to deal with as well.  That is, good for time-to-market, bad for tunability.

I want to start a dialogue with the community about these issues.  If I am wrong about Typed DataSets, I want to be convinced.  Please feel free to comment on this blog entry or e-mail me privately…or call me out on the DevelopMentor lists. At the end of the day I want to be able to give the community helpful advice.  If there is a compelling answer here, lets as a community find out what is right.