W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2001

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

From: Weber, Heiko <Heiko.Weber@softwareag.com>
Date: Fri, 2 Feb 2001 12:33:21 +0100
Message-ID: <C23163F98473D311874C0008C7E62107048E5E1B@daemsg02.software-ag.de>
To: "'xmlSchema-dev@w3.org'" <xmlSchema-dev@w3.org>

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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:50 UTC