Skip site navigation (1) Skip section navigation (2)

Re: From TODO, XML?

From: mlw <markw(at)mohawksoft(dot)com>
To: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>
Cc: Ken Hirsch <kenhirsch(at)myself(dot)com>, "Frank Ch(dot) Eigler" <fche(at)redhat(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: From TODO, XML?
Date: 2001-07-29 20:09:08
Message-ID: 3B646D64.40EE0152@mohawksoft.com (view raw or flat)
Thread:
Lists: pgsql-hackers
"Ross J. Reedstrom" wrote:
> 
> On Sun, Jul 29, 2001 at 12:19:48PM -0400, mlw wrote:
> >
> > <employee>
> > <name>Bill</name>
> > <position>Programmer</position>
> > <address>
> >       <number>1290</number>
> >       <street>
> >               <name>Canton Ave</name>
> >       </street>
> >
> >       <town>
> >               <name>Milton</name>
> >       </town>
> > </address>
> > </emplyee>
> >
> > The above is almost impossible to convert to a relational format without
> > additional information or a good set of rules. However, we can determine which
> > XML titles are "containers" and which are "data." "employee" is a container
> > because it has sub tags. "position" is "data" because it has no sub tags.
> >
> > We can recursively scan this hierarchy, decide which are containers and which
> > are data. Data gets assigned an appropriate SQL type and containers get
> > separated from the parent container, and an integer index is put in its place.
> > For each container, either a primary key is specified or created on the fly.
> >
> > We insert sub containers first and pop back the primary key value, until we
> > have the whole record. The primary key could even be the OID.
> >
> > A second strategy is to concatenate the hierarchy into the field name, as
> > street_name, town_name, and so on.
> >
> >
> > What do you think?
> 
> What about attributes on tags. They're data, certainly. Do they then
> promote the tag they're in to a container?

Attribute tags are normally something you should know about before hand. There
has to be a number of tags which do not force a container. 

This whole thing depends on a good DTD.

-- 
5-4-3-2-1 Thunderbirds are GO!
------------------------
http://www.mohawksoft.com

In response to

pgsql-hackers by date

Next:From: Hiroshi InoueDate: 2001-07-29 23:55:35
Subject: Re: LIBPQ on Windows and large Queries
Previous:From: Tom LaneDate: 2001-07-29 20:05:49
Subject: Re: LIBPQ on Windows and large Queries

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group