Attention: We are retiring the ASP.NET Community Blogs. Learn more >

Objects & Databases

I've been reading Practical Issues in Database Management by Fabian Pascal.

The book gives you what it promises, focusing on some common issues when working with relational databases.

If you read his articles, you'll see that he is a strong supporter of the relational theory, and dismisses every other data modeling technique.

Even if his points of view are quite radical, I liked his explanation on why and when you want to store objects in a database.

His point is that a type is defined by some data and some operations you can apply to it. Sometimes, the data and the operations are quite stable and cross-domain. The operations that an application needs to do with it are similar to the ones that another application needs. A 'Point' type is in that category. You can store this kind of type as an object.

Other types, as a 'Customer' or an 'Order' are not agreed neither in its structure nor in the operations you want to perform on them. Both structure and operations usually change during the lifetime of an application. So you need to represent them in a way that you can easily change the structure and perform any operation with it.  You cannot store these types as an object. You should take advantage of the excellent support in relational databases for changing the structure or operating with data.

 

No Comments