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

From: Daniel <danielaparker_at_gmail.com>
Date: 28 Mar 2007 07:43:09 -0700
Message-ID: <1175092989.557688.55240_at_p15g2000hsd.googlegroups.com>


On Mar 28, 9:55 am, "Cimode" <cim..._at_hotmail.com> wrote:
> On Mar 28, 1:21 pm, Bernard Peek <b..._at_alpha.shrdlu.com> wrote:> On 2007-03->
> > Data can be validated before it's transmitted.
>
> Does that mean that CSV data with a header can't be validated?

Of course not, an application at the endpoint can employ custom code to check the contents of the file, using a custom description of the flat file (the header isn't enough.) Or a vendor can define a proprietary schema format for flatfiles and sell a proprietary tool for validating a CSV file that conforms to the flat file.

But nobody can write and sell (or give away as open source) a CSV validator that validates an arbitrary CSV file against a standard schema describing that CSV file, for the simple reason that no such standard schema exists. No tools exist in this category, in contrast, many such tools exist in the XML space.
>
> > Validation against a schema
> > will trap most major errors. It will trap most of the minor errors that
> > would normally require action by an expensive and extremely bored human being.
>
> In what a header does constitute a schema.

If you're suggesting that the header in a CSV file is like an XML Schema or a Relax NG Schema, then you clearly need to do some homework.
>
> > Code to handle XML is standardised and therefore doesn't need to be
> > rewritten for each individual application. This makes it more reliable and
> > cheaper to develop and maintain.
>
> How is standardized? What is a standard for coding XML?

Do you know about XML Schema? Do you know about domains like life insurance that standardize on a schema such as ACCORD, so that they have a standard way of representing data?
>
> > It is difficult to extend CSV systems boyond the simple flat-file system
> > with a single record type. Traditionally, at least in the systems I've
> > worked with, the solution is to denormalise the data from more than one
> > table. Therefore CSV is usually more verbose than XML and can take up much
>
> So what you are saying is that an XML file takes less space (less
> verbose) than a flat CSV file?
>
This is the only point on which I would be inclined to differ from Bernard :-)

Regards,
Daniel Parker Received on Wed Mar 28 2007 - 16:43:09 CEST

Original text of this message