pg.ddx.io  pgsql-chat@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: is GiST still alive?
16+ messages / 8 participants
[nested] [flat]

* Re: is GiST still alive?
@ 2003-10-22 19:19 Josh Berkus <josh@agliodbs.com>
  2003-10-22 20:48 ` Re: is GiST still alive? Christopher Browne <cbbrowne@libertyrms.info>
  0 siblings, 1 reply; 16+ messages in thread

From: Josh Berkus @ 2003-10-22 19:19 UTC (permalink / raw)
  To: pgsql-hackers@postgresql.org; zeitling@informatik.hu-berlin.de

Gregor,

> I'm developing a native XML database (C++) (which is supposed to become
> open source one day) and I'm wondering wheather I could use GiST for it's
> indexes. Is GiST still alive?

Don't know, sorry.   

> Would PostgreSQL fit that requirement? And are you interested in having a
> fast, scalable XML access method?

We would welcome good XML tools for XML stored in databases.  

However, I'm not sure that PostgreSQL is the appropriate platform for an 
all-XML database; we're pretty dogmatically a relational database ... perhaps 
the grandfather of most relational databases.

-- 
-Josh Berkus
 Aglio Database Solutions
 San Francisco




^ permalink  raw  reply  [nested|flat] 16+ messages in thread

* Re: is GiST still alive?
  2003-10-22 19:19 Re: is GiST still alive? Josh Berkus <josh@agliodbs.com>
@ 2003-10-22 20:48 ` Christopher Browne <cbbrowne@libertyrms.info>
  2003-10-22 21:43   ` Re: is GiST still alive? Andrew Dunstan <andrew@dunslane.net>
  2003-10-22 22:16   ` Re: is GiST still alive? Gregor Zeitlinger <zeitling@informatik.hu-berlin.de>
  0 siblings, 2 replies; 16+ messages in thread

From: Christopher Browne @ 2003-10-22 20:48 UTC (permalink / raw)
  To: pgsql-hackers@postgresql.org

josh@agliodbs.com (Josh Berkus) writes:
> Gregor,
>> I'm developing a native XML database (C++) (which is supposed to become
>> open source one day) and I'm wondering wheather I could use GiST for it's
>> indexes. Is GiST still alive?
>
> Don't know, sorry.   
>
>> Would PostgreSQL fit that requirement? And are you interested in having a
>> fast, scalable XML access method?
>
> We would welcome good XML tools for XML stored in databases.  
>
> However, I'm not sure that PostgreSQL is the appropriate platform for an 
> all-XML database; we're pretty dogmatically a relational database ... perhaps 
> the grandfather of most relational databases.

It leaves open the question of what is the appropriate way of
expressing XML entities and attributes and CDATA in database form.

If the point of the exercise is to have some way of storing XML data
in a database, then you may readily declare it thus:

create table some_table (
   -- key columns omitted
   xml character varying,
   -- additional columns omitted
);

And that's perfectly good at storing XML information.

But I think back to the XML generator I wrote for GnuCash; it has the
notion of building up a hierarchy of entities and attributes, each of
which is visible as an identifyable object of some sort.  Mapping that
onto a set of PostgreSQL relations wouldn't work terribly well.
-- 
let name="cbbrowne" and tld="libertyrms.info" in String.concat "@" [name;tld];;
<http://dev6.int.libertyrms.com/;
Christopher Browne
(416) 646 3304 x124 (land)



^ permalink  raw  reply  [nested|flat] 16+ messages in thread

* Re: is GiST still alive?
  2003-10-22 19:19 Re: is GiST still alive? Josh Berkus <josh@agliodbs.com>
  2003-10-22 20:48 ` Re: is GiST still alive? Christopher Browne <cbbrowne@libertyrms.info>
@ 2003-10-22 21:43   ` Andrew Dunstan <andrew@dunslane.net>
  2003-10-22 22:22     ` Re: is GiST still alive? Gregor Zeitlinger <zeitling@informatik.hu-berlin.de>
  2003-10-23 01:53     ` Re: is GiST still alive? Christopher Kings-Lynne <chriskl@familyhealth.com.au>
  2003-10-23 13:38     ` Re: is GiST still alive? Makoto Yui <yuin@bb.din.or.jp>
  1 sibling, 3 replies; 16+ messages in thread

From: Andrew Dunstan @ 2003-10-22 21:43 UTC (permalink / raw)
  To: pgsql-hackers@postgresql.org

Christopher Browne wrote:

>But I think back to the XML generator I wrote for GnuCash; it has the
>notion of building up a hierarchy of entities and attributes, each of
>which is visible as an identifyable object of some sort.  Mapping that
>onto a set of PostgreSQL relations wouldn't work terribly well.
>  
>

*nod* I have tried this several times - it just doesn't work well, 
because the maps are too different.

You could do something like this:
   . a table for each element type, fields being the attributes, plus 
the node id.
   . a table to tie everything together (parent_id, child_id, 
child_order, child_type).
In theory you could even generate the DB schema from an XML schema and 
evaluate it with XPath-like expressions.

But why put yourself to such bother? I have never found a good reason to 
do this sort of thing.

cheers

andrew




^ permalink  raw  reply  [nested|flat] 16+ messages in thread

* Re: is GiST still alive?
  2003-10-22 19:19 Re: is GiST still alive? Josh Berkus <josh@agliodbs.com>
  2003-10-22 20:48 ` Re: is GiST still alive? Christopher Browne <cbbrowne@libertyrms.info>
  2003-10-22 21:43   ` Re: is GiST still alive? Andrew Dunstan <andrew@dunslane.net>
@ 2003-10-22 22:22     ` Gregor Zeitlinger <zeitling@informatik.hu-berlin.de>
  2003-10-23 01:39       ` Re: is GiST still alive? Christopher Browne <cbbrowne@acm.org>
  2 siblings, 1 reply; 16+ messages in thread

From: Gregor Zeitlinger @ 2003-10-22 22:22 UTC (permalink / raw)
  To: Andrew Dunstan <andrew@dunslane.net>; +Cc: pgsql-hackers@postgresql.org

On Wed, 22 Oct 2003, Andrew Dunstan wrote:
> But why put yourself to such bother? I have never found a good reason to
> do this sort of thing.
I think there is a huge potential for XML databases once there are good
ones and people start using them more extensively.
But for having real fast xml databases it's too slow to store them in
relational tables. After all, if you were designing a database for xml
data only - would you come up with tables to store them?

-- 
Gregor Zeitlinger
gregor@zeitlinger.de




^ permalink  raw  reply  [nested|flat] 16+ messages in thread

* Re: is GiST still alive?
  2003-10-22 19:19 Re: is GiST still alive? Josh Berkus <josh@agliodbs.com>
  2003-10-22 20:48 ` Re: is GiST still alive? Christopher Browne <cbbrowne@libertyrms.info>
  2003-10-22 21:43   ` Re: is GiST still alive? Andrew Dunstan <andrew@dunslane.net>
  2003-10-22 22:22     ` Re: is GiST still alive? Gregor Zeitlinger <zeitling@informatik.hu-berlin.de>
@ 2003-10-23 01:39       ` Christopher Browne <cbbrowne@acm.org>
  2003-10-23 03:37         ` Re: [HACKERS] is GiST still alive? Kurt at DBC <kurtw@dbc.co.nz>
  2003-10-23 11:03         ` Re: is GiST still alive? Gregor Zeitlinger <zeitling@informatik.hu-berlin.de>
  0 siblings, 2 replies; 16+ messages in thread

From: Christopher Browne @ 2003-10-23 01:39 UTC (permalink / raw)
  To: pgsql-hackers@postgresql.org

In the last exciting episode, zeitling@informatik.hu-berlin.de (Gregor Zeitlinger) wrote:
> On Wed, 22 Oct 2003, Andrew Dunstan wrote:
>> But why put yourself to such bother? I have never found a good reason to
>> do this sort of thing.
> I think there is a huge potential for XML databases once there are good
> ones and people start using them more extensively.
> But for having real fast xml databases it's too slow to store them in
> relational tables. After all, if you were designing a database for xml
> data only - would you come up with tables to store them?

No, "tables" wouldn't be the right way to do it.

But it's going to be troubled, in any case, because of the
every-popular mixtures of:

 a) Often weird declarations of what character sets are in use;

 b) Pointers to other parts of a document;

 c) What's a "database" going to consist of?  One XML document?  Or
    many?  And if many, then then how do you have a centralized
    reference point to navigate from to find the document that you
    want?

And "navigate" was a carefully chosen word; what you then have is
essentially a network database system, and have to then start making
up ways of describing queries.  XQuery may be better than CODASYL of
yesteryear, but you're still left writing a lot of recursive code.
(Thus making those that understand the Lambda Nature more powerful...)

At the end, do you have a "database?"  Or just a set of documents?
It's hard to tell, a priori.

And do you think this is likely to be useful because:

 a) You have some clear notion as to why this ought to be useful?

   or merely because

 b) XML is a big buzzword, and people have been able to succesfully
    attract "research funds" or "vulture capital" on the basis of
    having that acronym in a proposal?

The latter seems to have been really common the last few years, as
people seem often to add "Java" and "XML" to proposals in order to
attract unwary investors in much the same way that a "lady of the
evening" wears scanty clothing in order to attract her customers.
-- 
wm(X,Y):-write(X),write('@'),write(Y). wm('aa454','freenet.carleton.ca').
http://www3.sympatico.ca/cbbrowne/lisp.html
Eagles may soar, but weasels don't get sucked into jet engines.



^ permalink  raw  reply  [nested|flat] 16+ messages in thread

* Re: [HACKERS] is GiST still alive?
  2003-10-22 19:19 Re: is GiST still alive? Josh Berkus <josh@agliodbs.com>
  2003-10-22 20:48 ` Re: is GiST still alive? Christopher Browne <cbbrowne@libertyrms.info>
  2003-10-22 21:43   ` Re: is GiST still alive? Andrew Dunstan <andrew@dunslane.net>
  2003-10-22 22:22     ` Re: is GiST still alive? Gregor Zeitlinger <zeitling@informatik.hu-berlin.de>
  2003-10-23 01:39       ` Re: is GiST still alive? Christopher Browne <cbbrowne@acm.org>
@ 2003-10-23 03:37         ` Kurt at DBC <kurtw@dbc.co.nz>
  1 sibling, 0 replies; 16+ messages in thread

From: Kurt at DBC @ 2003-10-23 03:37 UTC (permalink / raw)
  To: Christopher Browne <cbbrowne@acm.org>; +Cc: pgsql-chat

Christopher Browne wrote:

> No, "tables" wouldn't be the right way to do it.
> 
> But it's going to be troubled, in any case, because of the
> every-popular mixtures of:
>  a) Often weird declarations of what character sets are in use;
>  b) Pointers to other parts of a document;
>  c) What's a "database" going to consist of?  One XML document?  Or
>     many?  And if many, then then how do you have a centralized
>     reference point to navigate from to find the document that you
>     want?
> And "navigate" was a carefully chosen word; what you then have is
> essentially a network database system, and have to then start making
> up ways of describing queries.  XQuery may be better than CODASYL of
> yesteryear, but you're still left writing a lot of recursive code.
> (Thus making those that understand the Lambda Nature more powerful...)
> 
> At the end, do you have a "database?"  Or just a set of documents?
> It's hard to tell, a priori.
> 
[Trimmed comments on utility of such features]

transferred from pgsql-hackers to pgsql-chat.

Coincidentally, just recently looked at Fongs "The design
and implementation of the POSTGRES query optimizer2"  (referenced in the
Developers Guide) which implies that one of the initial goals of
postquel and postgres was to handle similar structures :

"The basic problem here is that the relational model is not well-suited
for representing hierarchical relationships. As a solution, Stonebraker
has proposed embedding queries within data fields and using these
queries to express the hierarchical relationship between the
corresponding tuple and information elsewhere in the database [STON84].
Using this idea, which POSTGRES supports, our complex object example is
now represented as shown in figure 2.5. To retrieve information executed
by the queries embedded within this data field, the user would issue the
following query:

execute (COBJECT.components) where COBJECT.coid = 1.

Thus, n join queries reduce to a single execute query. In addition, 
users can selectively retrieve information
linked through these hierarchies by nesting attributes"

Go's around, comes around.
Cheers, Kurt.




^ permalink  raw  reply  [nested|flat] 16+ messages in thread

* Re: is GiST still alive?
  2003-10-22 19:19 Re: is GiST still alive? Josh Berkus <josh@agliodbs.com>
  2003-10-22 20:48 ` Re: is GiST still alive? Christopher Browne <cbbrowne@libertyrms.info>
  2003-10-22 21:43   ` Re: is GiST still alive? Andrew Dunstan <andrew@dunslane.net>
  2003-10-22 22:22     ` Re: is GiST still alive? Gregor Zeitlinger <zeitling@informatik.hu-berlin.de>
  2003-10-23 01:39       ` Re: is GiST still alive? Christopher Browne <cbbrowne@acm.org>
@ 2003-10-23 11:03         ` Gregor Zeitlinger <zeitling@informatik.hu-berlin.de>
  1 sibling, 0 replies; 16+ messages in thread

From: Gregor Zeitlinger @ 2003-10-23 11:03 UTC (permalink / raw)
  To: Christopher Browne <cbbrowne@acm.org>; +Cc: PostgreSQL Hackers Mailing List <pgsql-hackers@postgresql.org>

On Wed, 22 Oct 2003, Christopher Browne wrote:
> No, "tables" wouldn't be the right way to do it.
>
> But it's going to be troubled, in any case, because of the
> every-popular mixtures of:
>
>  a) Often weird declarations of what character sets are in use;
I gotta admit that I haven't spend too much attention on that specific
part. But couln't you just store it in the character set that was
originally used to populate the document?

>  b) Pointers to other parts of a document;
do you mean to the parent element and the child elements?
This is specifially what my custom format is designed for.

>  c) What's a "database" going to consist of?  One XML document?  Or
>     many?
many, each of which can be up to about 1TB

> And if many, then then how do you have a centralized
>     reference point to navigate from to find the document that you
>     want?
This one could be a table, or another xml document.

> And "navigate" was a carefully chosen word; what you then have is
> essentially a network database system, and have to then start making
> up ways of describing queries.  XQuery may be better than CODASYL of
> yesteryear, but you're still left writing a lot of recursive code.
> (Thus making those that understand the Lambda Nature more powerful...)
I don't get your point? XQuery works on one document, IIRC.

> At the end, do you have a "database?"  Or just a set of documents?
> It's hard to tell, a priori.
OK, know waht you mean. I'd say it's a database, because the information
is stored not plain - but in pages and in an optimized format for
insertion, deletion and querying.

> And do you think this is likely to be useful because:
>
>  a) You have some clear notion as to why this ought to be useful?
yes. Modyfing and querying plain xml files sucks performancewise once your
documents get a little larger (100 MB+)

>  b) XML is a big buzzword, and people have been able to succesfully
>     attract "research funds" or "vulture capital" on the basis of
>     having that acronym in a proposal?
That time's over anyways, isn't it?

-- 
Gregor Zeitlinger
gregor@zeitlinger.de




^ permalink  raw  reply  [nested|flat] 16+ messages in thread

* Re: is GiST still alive?
  2003-10-22 19:19 Re: is GiST still alive? Josh Berkus <josh@agliodbs.com>
  2003-10-22 20:48 ` Re: is GiST still alive? Christopher Browne <cbbrowne@libertyrms.info>
  2003-10-22 21:43   ` Re: is GiST still alive? Andrew Dunstan <andrew@dunslane.net>
@ 2003-10-23 01:53     ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>
  2003-10-23 11:06       ` Re: is GiST still alive? Gregor Zeitlinger <zeitling@informatik.hu-berlin.de>
  2003-10-23 11:40       ` Re: is GiST still alive? Andrew Dunstan <andrew@dunslane.net>
  2 siblings, 2 replies; 16+ messages in thread

From: Christopher Kings-Lynne @ 2003-10-23 01:53 UTC (permalink / raw)
  To: Andrew Dunstan <andrew@dunslane.net>; +Cc: pgsql-hackers@postgresql.org

Do this:

1. Create a new type called 'xml', based on text.

2. The xmlin function for that type will validate what you are 
enterering is XML

3. Create new functions to implement XPath, SAX, etc. on the xml type.

4. Extend the contrib/ltree gist-based tree indexing scheme to work on 
xml and hence the operations in no.3 above are really fast...

Chris


Andrew Dunstan wrote:

> Christopher Browne wrote:
> 
>> But I think back to the XML generator I wrote for GnuCash; it has the
>> notion of building up a hierarchy of entities and attributes, each of
>> which is visible as an identifyable object of some sort.  Mapping that
>> onto a set of PostgreSQL relations wouldn't work terribly well.
>>  
>>
> 
> *nod* I have tried this several times - it just doesn't work well, 
> because the maps are too different.
> 
> You could do something like this:
>   . a table for each element type, fields being the attributes, plus the 
> node id.
>   . a table to tie everything together (parent_id, child_id, 
> child_order, child_type).
> In theory you could even generate the DB schema from an XML schema and 
> evaluate it with XPath-like expressions.
> 
> But why put yourself to such bother? I have never found a good reason to 
> do this sort of thing.
> 
> cheers
> 
> andrew
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings




^ permalink  raw  reply  [nested|flat] 16+ messages in thread

* Re: is GiST still alive?
  2003-10-22 19:19 Re: is GiST still alive? Josh Berkus <josh@agliodbs.com>
  2003-10-22 20:48 ` Re: is GiST still alive? Christopher Browne <cbbrowne@libertyrms.info>
  2003-10-22 21:43   ` Re: is GiST still alive? Andrew Dunstan <andrew@dunslane.net>
  2003-10-23 01:53     ` Re: is GiST still alive? Christopher Kings-Lynne <chriskl@familyhealth.com.au>
@ 2003-10-23 11:06       ` Gregor Zeitlinger <zeitling@informatik.hu-berlin.de>
  2003-10-23 13:09         ` Re: is GiST still alive? Christopher Kings-Lynne <chriskl@familyhealth.com.au>
  1 sibling, 1 reply; 16+ messages in thread

From: Gregor Zeitlinger @ 2003-10-23 11:06 UTC (permalink / raw)
  To: Christopher Kings-Lynne <chriskl@familyhealth.com.au>; +Cc: Andrew Dunstan <andrew@dunslane.net>; pgsql-hackers@postgresql.org

On Thu, 23 Oct 2003, Christopher Kings-Lynne wrote:
> 4. Extend the contrib/ltree gist-based tree indexing scheme to work on
> xml and hence the operations in no.3 above are really fast...
but then, the plain xml data is still stored in a database colum, if I
understand correctly?

-- 
Gregor Zeitlinger
gregor@zeitlinger.de




^ permalink  raw  reply  [nested|flat] 16+ messages in thread

* Re: is GiST still alive?
  2003-10-22 19:19 Re: is GiST still alive? Josh Berkus <josh@agliodbs.com>
  2003-10-22 20:48 ` Re: is GiST still alive? Christopher Browne <cbbrowne@libertyrms.info>
  2003-10-22 21:43   ` Re: is GiST still alive? Andrew Dunstan <andrew@dunslane.net>
  2003-10-23 01:53     ` Re: is GiST still alive? Christopher Kings-Lynne <chriskl@familyhealth.com.au>
  2003-10-23 11:06       ` Re: is GiST still alive? Gregor Zeitlinger <zeitling@informatik.hu-berlin.de>
@ 2003-10-23 13:09         ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>
  0 siblings, 0 replies; 16+ messages in thread

From: Christopher Kings-Lynne @ 2003-10-23 13:09 UTC (permalink / raw)
  To: Gregor Zeitlinger <gregor@zeitlinger.de>; +Cc: Andrew Dunstan <andrew@dunslane.net>; pgsql-hackers@postgresql.org

>>4. Extend the contrib/ltree gist-based tree indexing scheme to work on
>>xml and hence the operations in no.3 above are really fast...
> 
> but then, the plain xml data is still stored in a database colum, if I
> understand correctly?

Yep - which to me seems to be the most useful way to store it :)

Chris





^ permalink  raw  reply  [nested|flat] 16+ messages in thread

* Re: is GiST still alive?
  2003-10-22 19:19 Re: is GiST still alive? Josh Berkus <josh@agliodbs.com>
  2003-10-22 20:48 ` Re: is GiST still alive? Christopher Browne <cbbrowne@libertyrms.info>
  2003-10-22 21:43   ` Re: is GiST still alive? Andrew Dunstan <andrew@dunslane.net>
  2003-10-23 01:53     ` Re: is GiST still alive? Christopher Kings-Lynne <chriskl@familyhealth.com.au>
@ 2003-10-23 11:40       ` Andrew Dunstan <andrew@dunslane.net>
  2003-10-23 11:51         ` Re: is GiST still alive? Gregor Zeitlinger <zeitling@informatik.hu-berlin.de>
  1 sibling, 1 reply; 16+ messages in thread

From: Andrew Dunstan @ 2003-10-23 11:40 UTC (permalink / raw)
  To: PostgreSQL-development <pgsql-hackers@postgresql.org>


Storing the XML text has problems - you have to parse it every time you 
want something - that has to cause a huge performance hit.

I use XML a lot for all sorts of purposes, but it is appropriate for 
data transfer rather than data storage, IMNSHO.

cheers

andrew

Christopher Kings-Lynne wrote:

> Do this:
>
> 1. Create a new type called 'xml', based on text.
>
> 2. The xmlin function for that type will validate what you are 
> enterering is XML
>
> 3. Create new functions to implement XPath, SAX, etc. on the xml type.
>
> 4. Extend the contrib/ltree gist-based tree indexing scheme to work on 
> xml and hence the operations in no.3 above are really fast...
>
> Chris
>
>
> Andrew Dunstan wrote:
>
>> Christopher Browne wrote:
>>
>>> But I think back to the XML generator I wrote for GnuCash; it has the
>>> notion of building up a hierarchy of entities and attributes, each of
>>> which is visible as an identifyable object of some sort.  Mapping that
>>> onto a set of PostgreSQL relations wouldn't work terribly well.
>>>  
>>>
>>
>> *nod* I have tried this several times - it just doesn't work well, 
>> because the maps are too different.
>>
>> You could do something like this:
>>   . a table for each element type, fields being the attributes, plus 
>> the node id.
>>   . a table to tie everything together (parent_id, child_id, 
>> child_order, child_type).
>> In theory you could even generate the DB schema from an XML schema 
>> and evaluate it with XPath-like expressions.
>>
>> But why put yourself to such bother? I have never found a good reason 
>> to do this sort of thing.
>>
>> cheers
>>
>> andrew
>>
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 7: don't forget to increase your free space map settings
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>




^ permalink  raw  reply  [nested|flat] 16+ messages in thread

* Re: is GiST still alive?
  2003-10-22 19:19 Re: is GiST still alive? Josh Berkus <josh@agliodbs.com>
  2003-10-22 20:48 ` Re: is GiST still alive? Christopher Browne <cbbrowne@libertyrms.info>
  2003-10-22 21:43   ` Re: is GiST still alive? Andrew Dunstan <andrew@dunslane.net>
  2003-10-23 01:53     ` Re: is GiST still alive? Christopher Kings-Lynne <chriskl@familyhealth.com.au>
  2003-10-23 11:40       ` Re: is GiST still alive? Andrew Dunstan <andrew@dunslane.net>
@ 2003-10-23 11:51         ` Gregor Zeitlinger <zeitling@informatik.hu-berlin.de>
  2003-10-23 13:10           ` Re: is GiST still alive? Christopher Kings-Lynne <chriskl@familyhealth.com.au>
  0 siblings, 1 reply; 16+ messages in thread

From: Gregor Zeitlinger @ 2003-10-23 11:51 UTC (permalink / raw)
  To: Andrew Dunstan <andrew@dunslane.net>; +Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>

On Thu, 23 Oct 2003, Andrew Dunstan wrote:
> Storing the XML text has problems - you have to parse it every time you
> want something - that has to cause a huge performance hit.
You couldn't have said better what I meant.
I store the xml already parsed. You can navigate right along. To the
parent, the previous, the next elemnt or the first or last child.

> I use XML a lot for all sorts of purposes, but it is appropriate for
> data transfer rather than data storage, IMNSHO.
Right now, you're quite right. But I want to change that.

-- 
Gregor Zeitlinger
gregor@zeitlinger.de




^ permalink  raw  reply  [nested|flat] 16+ messages in thread

* Re: is GiST still alive?
  2003-10-22 19:19 Re: is GiST still alive? Josh Berkus <josh@agliodbs.com>
  2003-10-22 20:48 ` Re: is GiST still alive? Christopher Browne <cbbrowne@libertyrms.info>
  2003-10-22 21:43   ` Re: is GiST still alive? Andrew Dunstan <andrew@dunslane.net>
  2003-10-23 01:53     ` Re: is GiST still alive? Christopher Kings-Lynne <chriskl@familyhealth.com.au>
  2003-10-23 11:40       ` Re: is GiST still alive? Andrew Dunstan <andrew@dunslane.net>
  2003-10-23 11:51         ` Re: is GiST still alive? Gregor Zeitlinger <zeitling@informatik.hu-berlin.de>
@ 2003-10-23 13:10           ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>
  2003-10-23 13:59             ` Re: is GiST still alive? Gregor Zeitlinger <zeitling@informatik.hu-berlin.de>
  0 siblings, 1 reply; 16+ messages in thread

From: Christopher Kings-Lynne @ 2003-10-23 13:10 UTC (permalink / raw)
  To: Gregor Zeitlinger <gregor@zeitlinger.de>; +Cc: Andrew Dunstan <andrew@dunslane.net>; PostgreSQL-development <pgsql-hackers@postgresql.org>

> You couldn't have said better what I meant.
> I store the xml already parsed. You can navigate right along. To the
> parent, the previous, the next elemnt or the first or last child.

Which is the whole point of indexing it...

>>I use XML a lot for all sorts of purposes, but it is appropriate for
>>data transfer rather than data storage, IMNSHO.
> 
> Right now, you're quite right. But I want to change that.

No point, it's a data exchange format, it's not usefull for data storage.

Chris





^ permalink  raw  reply  [nested|flat] 16+ messages in thread

* Re: is GiST still alive?
  2003-10-22 19:19 Re: is GiST still alive? Josh Berkus <josh@agliodbs.com>
  2003-10-22 20:48 ` Re: is GiST still alive? Christopher Browne <cbbrowne@libertyrms.info>
  2003-10-22 21:43   ` Re: is GiST still alive? Andrew Dunstan <andrew@dunslane.net>
  2003-10-23 01:53     ` Re: is GiST still alive? Christopher Kings-Lynne <chriskl@familyhealth.com.au>
  2003-10-23 11:40       ` Re: is GiST still alive? Andrew Dunstan <andrew@dunslane.net>
  2003-10-23 11:51         ` Re: is GiST still alive? Gregor Zeitlinger <zeitling@informatik.hu-berlin.de>
  2003-10-23 13:10           ` Re: is GiST still alive? Christopher Kings-Lynne <chriskl@familyhealth.com.au>
@ 2003-10-23 13:59             ` Gregor Zeitlinger <zeitling@informatik.hu-berlin.de>
  0 siblings, 0 replies; 16+ messages in thread

From: Gregor Zeitlinger @ 2003-10-23 13:59 UTC (permalink / raw)
  To: Christopher Kings-Lynne <chriskl@familyhealth.com.au>; +Cc: Andrew Dunstan <andrew@dunslane.net>; PostgreSQL-development <pgsql-hackers@postgresql.org>

On Thu, 23 Oct 2003, Christopher Kings-Lynne wrote:
> > You couldn't have said better what I meant.
> > I store the xml already parsed. You can navigate right along. To the
> > parent, the previous, the next elemnt or the first or last child.
>
> Which is the whole point of indexing it...
not quite. Indexing can solve some of the problems, not all.
1) You have to update the index every time you modify the data. My custom
format serves as an index for some queries.

2) The page format is designed in such a way that modifications
(insertion, deletion) are as fast as the original parsing. I'm not sure
how that stacks up to modifying data in a column. I guess it depens on the
strategy to store very large strings in columns.

> >>I use XML a lot for all sorts of purposes, but it is appropriate for
> >>data transfer rather than data storage, IMNSHO.
> >
> > Right now, you're quite right. But I want to change that.
>
> No point, it's a data exchange format, it's not usefull for data storage.
Well, neither one is a data exchange format only or a data storage format
only.
Rather, the difference is that relations are designed to store structued
data while xml is desinged to store semi-structued (not so regular) data.

Which is better suited for data exchange is a matter of convention (where
xml seems to be good), while efficiency and other features of an
implementation determine, which one is suited for data storage.

If your point is that currently xml is not suited for storage, because
there are more efficent RDBMS than xml databases, I agree. Otherwise, I
don't see your point.

-- 
Gregor Zeitlinger
gregor@zeitlinger.de




^ permalink  raw  reply  [nested|flat] 16+ messages in thread

* Re: is GiST still alive?
  2003-10-22 19:19 Re: is GiST still alive? Josh Berkus <josh@agliodbs.com>
  2003-10-22 20:48 ` Re: is GiST still alive? Christopher Browne <cbbrowne@libertyrms.info>
  2003-10-22 21:43   ` Re: is GiST still alive? Andrew Dunstan <andrew@dunslane.net>
@ 2003-10-23 13:38     ` Makoto Yui <yuin@bb.din.or.jp>
  2 siblings, 0 replies; 16+ messages in thread

From: Makoto Yui @ 2003-10-23 13:38 UTC (permalink / raw)
  To: pgsql-hackers@postgresql.org

> *nod* I have tried this several times - it just doesn't work well, 
> because the maps are too different.
> 
> You could do something like this:
>    . a table for each element type, fields being the attributes, plus 
> the node id.
>    . a table to tie everything together (parent_id, child_id, 
> child_order, child_type).
> In theory you could even generate the DB schema from an XML schema and 
> evaluate it with XPath-like expressions.

Although bits separated from a topic, I am developing XML database enviroment 
based on PostgreSQL, XpSQL.
http://gborg.postgresql.org/project/xpsql/

The enviroment decompose XML documents into fragments and uses PostgreSQL 
to store them in a set of relations. 
Users do not have to know that they are stored as relations.

It provides a variety of means to access XML Documents;
(a) DOM functions to build and traverse XML Documents
(b) XPath engine to extract infomation from documents
(c) update functions to modify documents

Although the development is on going, 
the performance is better than Apache Xindice.
#if you require, I'll send you the result after.

- points -
* node labeling is based on dewey decimal classification,  
 so updating performance is well.
* The index method is general (postgres) B-tree.

this is a programing image.
http://gborg.postgresql.org/project/xpsql/cvs/co.php/XpSQL/doc/USAGE?r=1.4

+-------------------------------------------------------------------+
Makoto Yui <yuin@bb.din.or.jp>
Key fingerprint = 6462 E285 97D8 1323 40C4  F9E5 EB0F 9DE6 1713 219E
+-------------------------------------------------------------------+



^ permalink  raw  reply  [nested|flat] 16+ messages in thread

* Re: is GiST still alive?
  2003-10-22 19:19 Re: is GiST still alive? Josh Berkus <josh@agliodbs.com>
  2003-10-22 20:48 ` Re: is GiST still alive? Christopher Browne <cbbrowne@libertyrms.info>
@ 2003-10-22 22:16   ` Gregor Zeitlinger <zeitling@informatik.hu-berlin.de>
  1 sibling, 0 replies; 16+ messages in thread

From: Gregor Zeitlinger @ 2003-10-22 22:16 UTC (permalink / raw)
  To: Christopher Browne <cbbrowne@libertyrms.info>; +Cc: pgsql-hackers@postgresql.org

On Wed, 22 Oct 2003, Christopher Browne wrote:
> It leaves open the question of what is the appropriate way of
> expressing XML entities and attributes and CDATA in database form.
<snip>

Thanx for your advise, but that's not what I had in mind. The original
idea to have a native xml database was that I doesn't work too well in a
relational database.
I was just wondering wheater I have to reinvent the wheel of database
technology when it comes to transaction processing, ACID, and Indexes,
which a native xml database ought to have as well.

-- 
Gregor Zeitlinger
gregor@zeitlinger.de




^ permalink  raw  reply  [nested|flat] 16+ messages in thread


end of thread, other threads:[~2003-10-23 13:59 UTC | newest]

Thread overview: 16+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-10-22 19:19 Re: is GiST still alive? Josh Berkus <josh@agliodbs.com>
2003-10-22 20:48 ` Christopher Browne <cbbrowne@libertyrms.info>
2003-10-22 21:43   ` Andrew Dunstan <andrew@dunslane.net>
2003-10-22 22:22     ` Gregor Zeitlinger <zeitling@informatik.hu-berlin.de>
2003-10-23 01:39       ` Christopher Browne <cbbrowne@acm.org>
2003-10-23 03:37         ` Kurt at DBC <kurtw@dbc.co.nz>
2003-10-23 11:03         ` Gregor Zeitlinger <zeitling@informatik.hu-berlin.de>
2003-10-23 01:53     ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2003-10-23 11:06       ` Gregor Zeitlinger <zeitling@informatik.hu-berlin.de>
2003-10-23 13:09         ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2003-10-23 11:40       ` Andrew Dunstan <andrew@dunslane.net>
2003-10-23 11:51         ` Gregor Zeitlinger <zeitling@informatik.hu-berlin.de>
2003-10-23 13:10           ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2003-10-23 13:59             ` Gregor Zeitlinger <zeitling@informatik.hu-berlin.de>
2003-10-23 13:38     ` Makoto Yui <yuin@bb.din.or.jp>
2003-10-22 22:16   ` Gregor Zeitlinger <zeitling@informatik.hu-berlin.de>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox