Derek,

Sorry, my post could have been clearer.

What I am describing is a means for symmetrically processing data in and out of the database. Similar to what might be done with a pure XML database. So when I say "submit queries using that format" what I meant was that if you are using one of the employee examples that I showed if you submit the following as a query:
<department>
<name>accounting</name>
<employee>
<firstName></firstName>
<lastName></lastName>
<employeeId></employeeId>
</employee>
</department>

the application would return all of the employees in the accounting department in the following format:
<department>
<name>accounting</name>
<employee>
<firstName>John</firstName>
<lastName>Doe</lastName>
<employeeId>1234</employeeId>
</employee>
<employee>
...
</employee>
</department>

This works by providing a relational-to-XML mapping description that my code parses along with the query document. The relational-to-XML mapping description has definitions for each of the tables that can be generated from the sql create scripts (or conversely, could generate them), definitions of the relationships between tables, and definitions of the fields and how they map into the XML. This provides the information for developing the queries and creating the result document.

When I said that no XSLT is used, what I meant is that I don't create any intermediate state XML file that must be translated using XSLT. I directly create the result format which is ready for further processing. The further processing could involve translating it with XSLT for display as HTML or it could involve packaging it into a SOAP response.

I hope that clears up my message some. If there is interest, I would be willing to share my schema for the relational-to-XML mapping as well as some of my decidedly rudimentary (and at this point undocumented) code for generating queries.

Glenn


On Tuesday, March 19, 2002, at 01:26 AM, Derek Hohls wrote:

Glenn

I would definitely be interested in this - tho' I am not sure that I
fully understand the approach you have taken eg. " submit
queries using that format"?

I am also curious as to how you format your output to make it
human-readable if you do not use XSLT?

Cheers
Derek

[EMAIL PROTECTED] 18/03/2002 05:38:08 >>>
I have been working on a similar problem but approaching it in a
slightly different way. I have taken more of an object-relational
mapping approach similar to products such as TopLink. Using this
approach you define your database schema and your XML result schema
separately and then map them together. For instance, the SQL tables
for
Employees (i.e. Employee, Department, Person) will be mapped directly
to
your resulting XML document and that document can be structured like:
<department>
<name>accounting</name>
<employee>
<firstName>John</firstName>
<lastName>Doe</lastName>
<employeeId>1234</employeeId>
</employee>
<employee>
.
</employee>
</department>

or it could be structured like:
<employee deptName="accounting" id="1234">
<firstName>John</firstName>
<lastName>Doe</lastName>
</employee>

or any other variation.

The mapping (created against a defined mapping schema as an XML
document) provides the information that is needed to build the queries
and create the resulting documents. XSLT is not used and the typical
result type from an XML query (<table name="department"><row><column
name="deptId">360</column>.</row>.</table><table>.</table>) is not
used.
The query is truly symmetric. You can define the result format, submit
queries using that format, and receive responses in that format. To
qualify your query you include the known data elements and the query
will be built to find those.

I have been working on this independently and would be interested in
comments. I currently have the query definition, submit, and response
working for moderately complex data sets (involving many-to-many
relations that can be brought to multiple places in the XML document)
and will work on defining insert and update as well.

- Glenn


Reply via email to