Re: Modeling Data for XML instead of SQL-DBMS
Date: 26 Oct 2006 10:15:18 -0700
Message-ID: <1161882918.660942.133320_at_m7g2000cwm.googlegroups.com>
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. I suggest you adapt to the
> terminology in this group too, for discussions within this group.
I try very hard to do that, Volker. The definition in the cdt glossary is
<glossaryEntry>
[Database]
"A logically coherent collection of related real-world data
assembled for a specific purpose." -- rephrased from
"Fundamentals of Database Systems", Elmasri & Navathe.
- Deluxe file system
- Shared databank (E. Codd)
</glossaryEntry>
The definition in quotations above is the preferred def for this ng with the other two listed as alternatives. I am trying to be sure to align with that definition. With the Codd definition, a clarification is required for the meaning of "shared" as discussed with David, so that I am talking about a databank shared with different languages and products, but all under the same "control" structures, which would be the difference between the databases I'm talking about and those often put under the head of "relational databases."
> > 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.
> No.
> There are three ways, depending on what you want to do:
> 1) Understand the XML contents and do a database model from scratch as if
> there was no XML
> 2) Translate into a simple tree like ERD
Yes, we can assume an ERD exists in this case (conceptual data model)
> 3) store it as native XML datatype in any modern database.
>> > industry best practices for designing data for a non-1NF repository
> > Yes, that is the thought process I want to tap into. What are the
> > such as these XML documents?
> The industry best practice is to to one of the three things above.
> Point one usually implies at least N3.
> >> Most modern databases can store XML as it is, either as blob or in separate
> >> tables.
> >
> > Think of the XML docs as a collection that constitutes a base of data
> > for this app.
> This doesn't change that "most modern databases..." see the bit of mine you
> quoted.
>> > be, but with no requirement to ever be persisted by way of a SQL-DBMS,
> >
> >> If all you're concerned is the amount of XML data but would like
> >> to stay as XML'ish as possible (i.e. using xpath/xquery only not on the doc
> >> but on the database), that's the way I'd go.
> >
> > I'm looking for the theory and practice that would yield the best
> > results for the design of this data repository if it is exclusively in
> > XML documents, with web services taking it anywhere else it needs to
> > for example. I hope that makes some sense.
> Not to me, sorry.
> If there is no need to have the data persist,
I'm definitely referring to data that must be persisted.
> theory and practice yields
> the suggestion not to put it into a database at all. That is so, because
> usually the effort to load and unload it outweigh any benefits from faster
> querying for example.
Yup, there are tradeoffs between temporary workfiles on SSDs vs memory. Thanks. --dawn
> Lots of Greetings!
> Volker
> --
> For email replies, please substitute the obvious.
Received on Thu Oct 26 2006 - 19:15:18 CEST