Re: Modeling Data for XML instead of SQL-DBMS

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Thu, 26 Oct 2006 15:20:22 GMT
Message-ID: <Wm40h.10673$cz.165611_at_ursa-nb00s0.nbnet.nb.ca>


Volker Hetzer wrote:

> dawn schrieb:
> 

>> Volker Hetzer wrote:
>>
>>> dawn schrieb:
>>>
>>>> If working on a software project where all data are persisted in XML
>>>> documents and not in an SQL-DBMS, the tools would not require that the
>>>> data model be in 1NF or the use of the SQL NULL.
>>>>
>>>> How would an excellent logical data model designed for this XML
>>>> implementation differ from the corresponding data model developed for
>>>> an SQL-DBMS? What would be some best practices for modeling data in
>>>> this environment?
>>>>
>>>> I'm guessing some will think that the exact same logical data model
>>>> would be appropriate for both targets, but hopefully many will agree
>>>> that it is unlikely that the best implemented data model would be
>>>> identical in each environment. In that case, what would the
>>>> differences be? What best practices would apply to data modeling for
>>>> XML documents compared to data modeling for a SQL-DBMS?
>>>
>>> Depends on what came first. If you've got a nice XML model, you can
>>> probably
>>> model it straight a way as a bunch of one to many or whatever
>>> relations in the
>>> database.
>>
>>
>> Using a broad definition of "database" the XML documents, in this case,
>> are the database.
> 
> When I'm talking about the database I'm talking about the type of database
> generally accepted as "database" in this group.

A generally accepted "database" in this group is a set of facts represented suitably for some kind of machine processing. In this respect, a card catalog at a library is a database as is a set of facts encoded in an xml document.

Choosing xml documents effectively hinders any pretense of managing the database, impedes any sort of data independence, and is generally pretty stupid from a data management point of view. Only self-aggrandizing ignorants like Dawn are sufficiently perverse to want to explore the theoretical aspects of such blatant stupidity. Nevertheless, your argument is misguided.

  I suggest you adapt to the
> terminology in this group too, for discussions within this group.

Indeed.

>> They are going to come first and there is no
>> SQL-DBMS as a target. So, the question is what theory and practical
>> tips are there from the past 50 years of computing to help build a good
>> data model for this XML "database' or data repository, if you prefer.

A good practical tip supported by theory is to use the relational model instead of representing data as a physical stream of characters.

[snip] Received on Thu Oct 26 2006 - 17:20:22 CEST

Original text of this message