XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
[main] SQL instead of XQuery

Michael,

>> I'm agreed about effect on existing application - but i'm 
>> implying all time, that we are making comparison of XML and 
>> relational situation (instead of discussing of only one of 
>> them). If we move to XML databases, effect on existing 
>> application remains (non-triviality is not disappear !).
>> MK> XML is far more flexible in this regard.
MK> Well, if an <employee> has <nationality> as a child, then it can always have
MK> two <nationality> children by a minor change to the schema.
MK> This has far less impact on applications ...

create table Employee (
  id     int      primary key,
  family varchar
);

create table Nationality (
  id     int      primary key,
  nation varchar
);

create table E2N (
  e      int      references Employee(id),
  n      int      references Nationality(id)
);

select Employee.Nationality
from   Employee.E2N.Nationality;

OUTPUT:
<employee      id= family= >
  <nationality id= nation= >
  <nationality id= nation= >
</employee>

MK> ... than creating a separate table.

Changing of XML-database  <!attlist Employee Nationality>
to                        <!element Employee (Nationality*) >
(or even removal DTD at all) is less :) than to add two tables,
but not in principal.
And changing of request on SQL+XTree and on XQuery for new scheme
is quite identical (no any language require much job).

P.S.
Maybe it's necessary to append auto-alter-table into R-DBMS
and append DTD to control auto-alter-table
to remove this little divergence in quantity of job ??

>> MK> It's also much easier to hold properties-of-properties
MK> <employee>
MK>   <nationality date-acquired="2001-05-06" checked="no">British</nationality>
MK> Adding attributes like this will very rarely affect existing applications.

Like for the 'select * ...';



Dmitry Turin
HTML6     (6. 5.4)  http://html60.euro.ru
SQL5      (5.11.1)  http://sql50.euro.ru
Unicode7  (7. 2.1)  http://unicode70.euro.ru
Computer2 (2. 0.2)  http://computer20.euro.ru



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS