Saturday, May 17, 2008

Deep Entity Framework

Visual Studio 2008 SP1 Beta was released in the last week, which is great news for users of ADO.NET since the service pack includes the much anticipated ADO.NET Entity Framework and ADO.NET Services (formerly Astoria). If you're interested in learning more about these technologies, I recommend you start out by visiting to the Data Programmability team blog and the Astoria team blog. Otherwise, Wikipedia has a thorough article on ADO.NET Entity Framework.

However, if you want to take a deep dive into the inner workings of Entity Framework, I highly recommend watching Sam Druker's channel9 screencast. Sam talks about the relationship between object oriented and relational data, and describes the need for inheritance, composition and associations.

Sam also takes the time to differentiate between object data and relational data. He uses the example of calendar data and notes that it is very difficult to use in a purely relational form. He goes on to talk about object databases as a means to work with hierarchical data.

However, Sam also points out that object databases suffer because you get bogged down with encoding and decoding pointers based on object identity. Object oriented databases actually miss the point of data modelling because, through encapsulation, you build walls around your ability to interpret the underlying data. You can't perform any set based operations on OO data so it's very difficult for external applications to interrogate your data in alternative ways.

A final point is that databases typically outlive applications because historical data is fundamental to warehousing and represents valuable intellectual property. Relational databases and set theory offer a means to abstract data from your applications in a way that is not possible with object databases.

No comments:

Post a Comment