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

Re: XML Schema generation questions [was SQL schema to XML schema...]

  • From: "Mike Sharp" <msharp@l...>
  • To: xml-dev@x...
  • Date: Fri, 23 Jun 2000 21:18:31 -0700

sql transport schema generation


Forgive me for responding without snipping the posting I'm replying to, but I'm
unfortunately challenged with Lotus Notes, which does not allow inline
quoting...so I must do it manually.

<<<Therefore, it is natural - nearly mandatory - to represent a row as an
element. >>>

I suppose that if you wanted to represent the _schema_ of the database, it would
indeed be mandatory.  But if, rather, you were interested in the data for it's
own sake, you may want to represent it differently.  Relational databases are
limited to data in two dimensions--rows and columns.  They use the relationships
between tables to get the extra-dimensional aspects that real data has.  In my
opinion, you shouldn't hamstring your XML into a two dimensional world.  Of
course, if your goal is to simply pack the data in a database into XML for
transport, then this approach would work.  But you need some more stuff for the
metadata such as this column is a foreign key into that table. XML does provide
a mechanism for that, but I've never used it.

When I send data from the client to the server, because I've diagrammed the
relationship physically in the XML, I don't need to relate groups of tags, like
you would in the database.  The object layer infers those relationships.  I'm
pretty much of the opinion that you should hide linking tables and other
relational aspects of databases from the XML, unless there's a reason for it.

<<<- If you plan to try the Microsoft SQL Server 2000 Technology Preview, plan
for attributes, because that's what you will get.>>>

This was true for the early releases, but a demo of a new version that I
recently saw allowed you to specify either elements or attributes.  It also had
a mechanism to specify a combination of the two, but that seemed too complex to
me.  However, it could be done, and I haven't spent any real time on it.  I
believe they were actually calling it the SQL Server 8 Beta or pre-release
candidate or something, to differentiate it from the Tech Preview.  The original
tech preview also began to expose an API that you could call directly...but that
approach has been postponed to my knowledge.  They do have a thing called an
"XML View" which looked very interesting.  It was a way of exposing the data of
your database without exposing the schema, and seemed very object oriented to
me, at least in regards to the data representation.

I'm otherwise pretty much in agreement with the rest--not that my opinion
matters!  ;^)

Regards,
Mike Sharp

---------------------
Does killing time damage eternity? --KPIG





tpassin@h... on 06/23/2000 06:35:11 PM

To:   xml-dev@x...
cc:    (bcc: Mike Sharp/Lante)

Subject:  Re: XML Schema generation questions [was SQL schema to XML schema...]



Bob DeRemer asked about table schemas -

>... I've generated "BizTalk" compatible schemas for each type (i.e.
> element-based and attribute-based).  I'm not sure yet, which approach is
> best.
>
> Being fairly new to XML (i.e. 3 months), I'm curious if others have done
> this before.  If so, what they have learned along the way.  My gut
instinct
> is to keep all columns as attributes, and each table is an element.
>

If you are concerned with relational database type tables, the fundamental
organizing feature is the row.  All queries return sets of rows, which in
turn may contain subsets of all the columns.  Joins produce sets of rows.
Views produce sets of rows.  Query conditions usually involve properties on
a row-by-row basis.

Therefore, it is natural - nearly mandatory - to represent a row as an
element.  This element would be inside another element representing the
table itself.

...

- If you plan to try the Microsoft SQL Server 2000 Technology Preview, plan
for attributes, because that's what you will get.
- If you plan to apply namespaces to a field, make it an element.  There is
no ambiguity about whether the namespace applies as there can be for an
attribute.

Overall, I favor using elements.  But there is no one answer.

Cheers,

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/
***************************************************************************

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.