Re: What is the logic of storing XML in a Database?

From: Bernard Peek <bap_at_alpha.shrdlu.com>
Date: 27 Mar 2007 16:06:20 GMT
Message-ID: <slrnf0ifsu.2jr.bap_at_alpha.shrdlu.com>


On 2007-03-27, Daniel <danielaparker_at_gmail.com> wrote:
> On Mar 26, 6:15 pm, "Karen Hill" <karen_hil..._at_yahoo.com> wrote:
>> X-No-Archive:yes
>>
>> I see people putting XML documents in databases. Why do they do this,
>> what is the logic behind it? Why not just put the data into tables?
>> Why are the standards committees going along with this (XML SQL/
>> MED)? Why don't people just use tables to store the data.
>
> The question can't be answered without knowing more about the problem
> that is to be solved.
>
> Standardized XML transport formats are commonly used for representing
> messages. Consider a problem space where messages are sent from a
> front office system to a back office system, and middleware needs to
> keep a repository of messages to support auditing and playback. In
> that case it would make perfect sense to strip out any fields required
> for querying, and store them plus the message. Storing all the fields
> relationally would not meet any business objective, and it might not
> be possible to reliably reproduce the original message from the
> relational representation.

I've just posted another message saying that XML has its place. It's invaluable in messaging systems because a message can be validated before being sent. That won't trap every error but it it can a lot. The really neat thing is that the data gets rejected by a machine, so you don't get people phoning and asking you to correct the data they sent you.

-- 
bap_at_shrdlu.com
In search of cognoscenti
Received on Tue Mar 27 2007 - 18:06:20 CEST

Original text of this message