Welcome to MSDN Blogs Sign in | Join | Help

Randy Holloway at Microsoft

Blogging from the field.
Object-relational Mappings in Yukon/Whidbey
From the recent interview with Euan Garden, SQL Server Tools Product Unit Manager.


"[Objectspaces is] an object-relational mapping layer. For example, you could have Customers and Orders, and Customers could be mapped to 20 or 30 tables. You don't know and you don't have to know. At some point you have to design your app and say, 'here's an object and here's how it maps into the relational data', but the actual meat and potatoes of worrying about how those two talk to each other is handled for you by the Objectspaces API."

Posted: Tuesday, July 29, 2003 8:31 PM by RandyHolloway

Comments

Frans Bouma said:

That statement of 20 or 30 tables for 1 entity is of course bull. What he means is that you have a customer entity object which holds f.e. a collection of orders, which each hold a collection of order items etc. These are physically part of the customer entity OBJECT, but are not part of the definition of 'customer'. However his statement wants you to believe otherwise.

THe reason it is bull is because no database is set up in such a way that a theoretical element like an entity is spread over several tables. If you then put these tables together in 1 entity (they all have to have a 1:1 relationship also to do that) you can load it but you can't create new ones: what if you fill in the information in the new customer object that can fill 2/3 of the fields of all the 20 tables? That won't work if the rest of the fields aren't accepting NULL's :)
# July 30, 2003 2:52 AM

Randy said:

Frans, I think you're right. I read it and began to think of real world scenarios for the use of such an abstraction, and I'm interested to see this API. I'm sure that 20 or 30 tables is a gross exaggeration though.
# July 30, 2003 5:47 PM
New Comments to this post are disabled
Page view tracker