OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: XQL Challenge (also, Design for Queryability)

[ Lists Home | Date Index | Thread Index ]
  • From: "Steve Muench" <SMUENCH@us.oracle.com>
  • To: costello@mitre.org
  • Date: 05 Jul 1999 07:12:03 -0700

Roger,  
 
Probably not the answer you were looking for, but here 
goes... 
 
If your data is already in a database, and you already 
know the SQL that gets you the info you need, why not 
combine these two pieces of info with a utility like 
the Oracle XML SQL Utility for Java and... 
 
 -> Query the data with full speed and power of your database 
 -> Query it from any point of view required for the app at hand 
 -> Return on-the-fly XML results from what you find 
 
Using something like an Object View you can predefine 
a rich structure to your data, query it using SQL3 object 
query syntax, and get the rich structure back in the XML 
for the results. You can see the "Insurance Claim" demo 
that comes with the Oracle XSQL Servlet for an example. 
 
I'm assuming there are a lot of Nokia cell-phone models 
out there... :-) 
 
http://technet.oracle.com/tech/xml 
 
Take care. 
     
_________________________________________________________ 
Steve Muench, Consulting Product Manager & XML Evangelist 
Business Components for Java Dev't Team 
http://www.oracle.com/xml


  • From: Roger Costello <costello@mitre.org>
  • To: xml-dev@ic.ac.uk, "Cote,Matthew S." <mscote@mitre.org>
  • Date: 05 Jul 1999 06:28:36
Hi Folks,

I have created an XML document that contains Cellphone data.  
I have organized the data in this XML document similar to how
it might be organized in a database:

      - one subtree contains Cellphone hardware data (weight,
        battery, etc).
      - one subtree contains Cellphone feature data (caller id, one
        touch dialing, etc).
      - one subtree maps Cellphone hardware data to Cellphone feature
        data (in databases this would be called an "association
        table").

Why am I organizing the data in this fashion?  My hope is that
this approach will facilitate queryability of the data. That 
remains to be seen ...

Here's a sample query that I would like to perform:

"What features does the NOKIA 252 Cellphone have?"

If the data were in a database, such a query would be simple:

    SELECT features.name 
    FROM features, cellphones, cellphone-features
    WHERE features.id = cellphone-features.feature-id AND
          cellphone-features.cellphone-id = cellphones.id AND
          cellphones.brand = "NOKIA" AND
          cellphone.model = "252"

I am thinking (hoping) that I can perform a similar type of 
query using XQL.  Here's what I tried (among many other attempts):

cellphone-catalog/features
 [cellphone-catalog/cellphone-features/cellphone-feature/@feature-idref
= @id 
  $and$ 
 
cellphone-catalog/cellphone-features/cellphone-feature/@cellphone-idref
= 'NOKIA-252']

This XQL query doesn't work (it returns the empty set).

Below is sample data from my Cellphone XML document.  Any thoughts
on how to structure the XQL query?  /Roger

<?xml version="1.0"?>
<cellphone-catalog>
    <cellphones>
        <model brand="NOKIA" name="252" technology="analog"
id="NOKIA-252">
            <dimension units="inches">
                <height>6 5/8</height>
                <width>1 7/8</width>
                <thickness>1</thickness>
            </dimension>
            <weight units="ounces">6</weight>
            <battery type="nickel-cadmium">1100 mAh</battery>
            <talk-time units="minutes">132</talk-time>
            <standby-time units="hours">32</standby-time>
            <price currency="$US" with-contract="false">400</price>
            <price currency="$US" with-contract="true">180</price>
        </model>
    </cellphones>
    <features>
        <Authentication id="Authentication"/>
        <RingerAndEarpieceVolumeControl
id="RingerAndEarpieceVolumeControl"/>
        <BatteryStrengthIndicator id="BatteryStrengthIndicator"/>
        <AudibleKeypadControls id="AudibleKeypadControls"/>
        <DTMF-KeytoneSignalling id="DTMF-KeytoneSignalling"/>
        <One-YearPartsAndLaborWarranty
id="One-YearPartsAndLaborWarranty"/>
        <StoresNamesAndNumbers id="StoresNamesAndNumbers"/>
        <OneTouchDialing id="OneTouchDialing"/>
        <CallerID id="CallerID"/>
    </features>
    <cellphone-features>
        <cellphone-feature cellphone-idref="NOKIA-252"
feature-idref="OneTouchDialing"/>
        <cellphone-feature cellphone-idref="NOKIA-252"
feature-idref="CallerID"/>
    </cellphone-features>
</cellphone-catalog>


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)







 

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

Copyright 2001 XML.org. This site is hosted by OASIS