Re: Should data be changed according to defaults in Schema?

"Weber, Heiko" wrote:
> 
> We just came across the following problem:
> 
> Should an XML-database, into which data is inserted according to a
> Schema, automatically insert the defined default values or should the
> data be stored unchanged as it was entered and the defaults should
> only be provided according to the Schema when data is retrieved via
> queries?

Shouldn't the database mimic the behavior of a "normal" XML document ?

In a document, the default values will only apply when the values are
not provided and they will then change if the default values are changed
in the schema (or if you apply another schema).

I guess your users would be confused if this was not the case with a XML
database.

> If the database does not insert the defaults, the data will be different
> when queried against the Schema, as when accessing the data directly.

Like it is the case if you read a document without using any schema.

Hope this helps.

Eric

> However the data which is retrieved from the database is not the same
> as the data which was entered, if the database inserts the defaults.
>
> Are there any specifications for this question and if not, what would
> you think is the better solution?  Or should there be an option for telling
> the database whether to change the data or not?  Does anyone know how
> other databases handle this?
> 
> thanks,
>     Heiko Weber
> 
> > --- --- --- --- --- --- --- --- --- --- ---
> >
> > Software AG Germany
> DBMS Open Systems Development (XML)
> > Uhlandstrasse 12
> > D-64297  Darmstadt
> > Germany
> >
> > Email:  mailto:Heiko.Weber@softwareag.com
> > Web:     http://www.softwareag.com
> >
> >

-- 
------------------------------------------------------------------------
Eric van der Vlist       Dyomedea                    http://dyomedea.com
http://xmlfr.org         http://4xt.org              http://ducotede.com
------------------------------------------------------------------------

Received on Friday, 2 February 2001 06:09:34 UTC