An example of database query result in XML

Don Park donpark at
Wed Mar 25 00:28:19 GMT 1998

Jim wrote

>the XML for the result. First, rows generally aren't that interesting, its
>meaning of the data in the row that's important. Taking a more object (or

Rows are not interesting because they are anonymous elements designed to
fire rules.

>example given, it looks like the rows are instances of an Order, but I'm
>sure without looking at the query.

Rows are result of a query which just happens to involve Order only.  It
could just as well involved many other tables as well as databases.

>Finally, using fixed attributes to capture the schema meta-data, and
>for the data is an interesting idea, but a better solution is to do what
>does. Treat the schema as just another database providing data about data.
>you need that data, go get it. If you don't, then don't bother. The DTD in
>example is attempting to describe two different, but related subject areas
>the same internal DTD. One is the structure of the data, and another is the
>structure of its meta-data. Although mixing these subject areas may be
>convenient for some applications, it's generally better to keep separate
>concerns separate.

You are right if the example was meant to be stored somewhere.  However, if
XML is used for communication only and not for storage, you have a problem.
Where do you store the DTD file if XML file itself is temporary?  In XDO, I
had to store the metadata within the XML because it had to be standalone.

>Note that the DTD for the example would allow empty rows, and rows that
>contained 15 ShipPhoneNumbers! Rows have ID attributes that are likely
>redundant with the ID of the order in them.

You are right there.

>It might be possible to shortened some of the names because since they're
>attributes, its less likely they'll get confused with similar names in
>elements. So ShipCity could just be City. You'd need to know more about the
>problem domain to make this decision though.

Ah.  Now we are back to TagNet.

Don Park

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as:
To (un)subscribe, mailto:majordomo at the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at

More information about the Xml-dev mailing list