[XML-SIG] SQL -> XML ?

Michael Sanborn michael@graphion.com
Mon, 15 Feb 1999 12:45:04 -0800


"Paul Prescod" wrote:


> "Steven R. Newcomb" wrote:
> >
> > Would you consider the grove paradigm a
> > "brute-force" method?  It seems to me to answer
> > the impedance-mismatch problem, here.  It also
> > seems to me much too elegant to be describable as
> > "brute-force".
>
> As is often the case on mailing lists, I think that we have lost some
> context. Steve has described a paradigm for *representing* tables as
> trees. That paradigm must still be *implemented*. Michael's original
> question was about implementation strategies. I don't know of an
> implementation strategy that overcomes the basic impedence mismatch
> between relational data and tree data.
>

Thanks to everyone for the comments so far.

I found the Grove material interesting, but it's true that I didn't
gather a lot that helps me solve my problem. I'm surprised that there
doesn't seem to be more material on the subject.

So, I've posted my original rickety solution to:

http://www.graphion.com/michael/SQL2DOM.py

in the hopes that someone might be able to offer me suggestions
regarding it.

Disclaimer: I'm not an experienced programmer, but I'm aware that this
code isn't so much designed as flung about. I recognized the name of
Builder.py from the Gang of Four book, and thought that what I needed to
do was to try to implement a Director of some sort. So I've got Director
objects constructing themselves recursively to manipulate the Builder as
needed. One question might be, am I better off writing this as a
recursive method of a Director object?

The result of this effort was that, once the tree was built, I was able
to convert it to my company's proprietary markup with only a couple of
lines of code (not included in my posting), which was most pleasing. But
as soon as I tried to re-use this approach on a similar structure, it
fell apart like a house of cards. It was then that I realized I needed
help.

Michael Sanborn
Graphion