[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Tag for every column in every row

  • From: THOMAS PASSIN <tpassin@i...>
  • To: <xml-dev@x...>
  • Date: Mon, 10 Apr 2000 21:49:07 -0400

column row
Yihpyng Kuan ask about redundancy in xml documents:

> I am new to XML, I have a question here, I wonder if
> anyone can shed some light on it, many thanks.
> If I have a table T1(F1 char(10), F2 char(10));
> I have 3 rows for this table.
> The XML representation of this would like this -
> <Table>T1
>  <Metadata>
>   <Column>F1
>      <Datatype>CHAR
>         <Length>10
>         </Length>
>      </Datatype>
>   </Column>
>   <Column>F2
>      <Datatype>CHAR
>         <Length>10
>         </Length>
>      </Datatype>
>   </Column>
>  </Metadata>
>  <Data>
>    <Row 1>
>      <F1>data 1</F1>
>      <F2>data 2</F2>
>    </Row>
>    <Row 2>
>      <F1>data 3</F1>
>      <F2>data 4</F2>
>    </Row>
>    <Row 3>
>      <F1>data 3</F1>
>      <F2>data 4</F2>
>    </Row>
>  </Data>
> </Table>
> I probably have some typo here. But, the problem I see
> here is "if I have 100 rows of data, the above XML
> would repeat this row information with those redundant
> tags 100 times", isn't this a waste ? or, it actually
> is not efficient ? Any better alternative ?
Yes, there is redundancy.  XML was developed for other purposes, but not for
maximum compaction.  XML was intended to 1) make it fairly easy to describe
structure in data, 2) make it fairly easy to extract that structure, and 3)
be reasonably human-readable (among other things).  There have been ongoing
discussions on this list about various approaches to compressing xml data.
There is no single, definitive answer.  But for many purposes, there is no
need for the utmost in redundancy reduction.

If you want smaller structures, of  course, there are many ways to go.  But
you would have found it hard to type an example for us to look at in, say,
ASN.1 binary form.  Or your tables could have been cast into comma-separated
form.  But then, it would be hard to have structure inside of table cells,
for example, which you could easily have with XML.

Tom Passin

This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@x...&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.

Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.