Freigeben über


ROX and Data Model Wars.

Dare has written a good section on Dealing
with the Data Access Impedance Mismatch
 effectively
summing up the differences that developers now face when working with data and data
models. This manifests itself in "Data Model Wars" where people now start to argue
over the benefits of the data model X verses Y. Objects have identity XML does not,
XML can handle mixed content models, objects can't, relational is beautifully simplistic,
XML is overly complex...etc. It is all about the data model choice for the application
- ROX - although you could prefer the XOR (eXclusive
OR) acronym, since it has the connotation that if more that one data
model is chosen then the output goes "low".

The .NET CLR and MSIL may have dismissed
many of the languages wars between developers, arguing whether C++ was better or worst
than VB only to now having more of an emphasis on data model wars, the best way to
work with and represent data. As Dare points out, you cannot have your cake and easily
eat it, although it is an aim within .NET to reduce this impedence mismatch to a minimum
for developers, but it can never be complete ignored for all but the simplest of applications.

Although the dominant data model for storage is relational it has been a holy grail
of the IT industry for decades to provide a richer mainstream data model.  There
is demand for data stores which work more naturally with hierarchical, semi-structured,
and graph (object) data models.  However attempts to provide hierarchical or
object data stores have failed to attract broad customer bases and tend to be fragmented
into many incompatible niche players.  XML represents a semi-structured data
model which technologies like the DOM, XSLT, XPath, and XQuery can target in the same
manner that SQL targets relational.  Already, XPath has seen far greater industry
adoption that any of the previous semi-structured niche programming models. With XQuery
enjoying the support of large, it is very likely that XML as the semi-structured data
and programming model will succeed in the mainstream.

It is also very unlikely that semi-structured storage in the long run will be an alternative
to relational, but rather there will be a continued evolution of relational model. 
In other words, XML has challenged the industry to provide more flexible data models
in the mainstream storage engines and industry has stepped up to the challenge by
providing XML type support, such as in "Yukon". As relational DBMS evolve to the semi-structured
data model, there needs to be improvement to the way developers access this data.
This is ones of the main goals of the System.Xml
V2
release in "Whidbey", to provide a rich XML programming model to
work with virtualized XML including relation data in SQL Server.

The XML data model is very expressive in that it is able to represent structure, semi-structure
and totally irregular data and being hierarchical implicitly defines the relationships
between entities within its structure. This means that it is able to represent all
forms of complex data be that flat, tree, recursive and graph like data.  With
the growing number of applications unifying under XML based interfaces, due to decentralized
data, it also promotes a loosely coupled architecture which it turn makes designs
more flexible. With the advent of relational DBMS storing XML natively and better
XML query languages such as XQuery, it looks like the XML data model adoption trend
is set to continue across the IT industry. It will be interesting to see whether the
rise of the XML data model is embraced or suppressed and how much XSD you will really
have to know to survive as an application developer.