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

When the values are changed as they are entered, the defaults will 
only be defaults that apply to inserting the data and not for 
reading the data.  But isn't this also the case for defaults that 
are specified for tables in SQL?  Maybe we should have an attribute 
for the Schema which specifies if the Schema should be applied for 
inserting or retrieving data or both?

If I change the default values in a Schema, the data that was entered
at the time when the default was still another value, might have
assumed that the default at that time be used, so if I change the
default at later point in time, all the values would change, which
might not be wanted.  Maybe only all the new data entered from that
point in time is inteded to take the new default values.

Since the Schema-Information is most likely also used for creating 
indexes for the database there will only be one single Schema that 
describes a dataset, so the data will not be accessible via different
Schemas at the same time.

It would be interesting to find out how current databases have solved
this problem...

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



-----Original Message-----
From: Eric van der Vlist [mailto:vdv@dyomedea.com]
Sent: Friday, February 02, 2001 12:09 PM
To: Weber, Heiko
Cc: 'xmlSchema-dev@w3.org'
Subject: 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

Received on Friday, 2 February 2001 06:33:33 UTC