<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Using the ltree module in PostgreSQL</title>
	<atom:link href="http://foobar.lu/wp/2007/06/27/using-the-ltree-module-in-postgresql/feed/" rel="self" type="application/rss+xml" />
	<link>http://foobar.lu/wp/2007/06/27/using-the-ltree-module-in-postgresql/</link>
	<description>coding should be fun</description>
	<lastBuildDate>Thu, 10 Mar 2011 18:39:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
	<item>
		<title>By: exhuma.twn</title>
		<link>http://foobar.lu/wp/2007/06/27/using-the-ltree-module-in-postgresql/comment-page-1/#comment-3</link>
		<dc:creator>exhuma.twn</dc:creator>
		<pubDate>Fri, 29 Jun 2007 18:45:44 +0000</pubDate>
		<guid isPermaLink="false">http://foobar.lu/wp/2007/06/27/using-the-ltree-module-in-postgresql/#comment-3</guid>
		<description>What you see here in the postgres queries is probably not how it&#039;s stored internally. The simple text-content separating the nodes with dots, is simply a convenience notation.

Under the hood it uses some C-code which I did not look at. I don&#039;t like reading C ;)

But I suspect it&#039;s a simple linked list. The reason &quot;ltree&quot; exists is simply because querying a tree using database tables is painfully slow. The ltree module aleviates this.

How it&#039;s represented internally is not (and should not be) the concern of the database designer.</description>
		<content:encoded><![CDATA[<p>What you see here in the postgres queries is probably not how it&#8217;s stored internally. The simple text-content separating the nodes with dots, is simply a convenience notation.</p>
<p>Under the hood it uses some C-code which I did not look at. I don&#8217;t like reading C <img src='http://foobar.lu/wp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>But I suspect it&#8217;s a simple linked list. The reason &#8220;ltree&#8221; exists is simply because querying a tree using database tables is painfully slow. The ltree module aleviates this.</p>
<p>How it&#8217;s represented internally is not (and should not be) the concern of the database designer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GenTr1</title>
		<link>http://foobar.lu/wp/2007/06/27/using-the-ltree-module-in-postgresql/comment-page-1/#comment-2</link>
		<dc:creator>GenTr1</dc:creator>
		<pubDate>Thu, 28 Jun 2007 13:07:45 +0000</pubDate>
		<guid isPermaLink="false">http://foobar.lu/wp/2007/06/27/using-the-ltree-module-in-postgresql/#comment-2</guid>
		<description>Looks Very interesting...
Gonna have a look on that if that can help me to store populations generated during Genetic Programming.

One thing I am not to sure is the performance issue. 

They represent the tree as a whole nested structure. It is actually in spirit quite close to a nested list (python style- assumption: First element of a list or a nested list is always a head node)
tree = [&#039;A&#039;, [&#039;B&#039;, [&#039;D&#039;, &#039;H&#039;, &#039;I&#039;], &#039;E&#039;], [&#039;C&#039;,&#039;F&#039;, &#039;G&#039;]]

I am totally crap with data bases in general, so my question might seem a bit naive, but...
Is it not much quicker to store it in the data base as paired elements of a hash map ?
(python-style dictionary):
tree = { &#039;A&#039;:[&#039;B&#039;,&#039;C&#039;], &#039;B&#039;:[&#039;D&#039;,&#039;E&#039;], &#039;C&#039;:[&#039;F&#039;,&#039;G&#039;], &#039;D&#039;:[&#039;H&#039;,&#039;I&#039;] }
Reconstruction of a nested structure would be something done separately, and this way, you can not only store trees but graphs and it should not get too slow to store larger trees.</description>
		<content:encoded><![CDATA[<p>Looks Very interesting&#8230;<br />
Gonna have a look on that if that can help me to store populations generated during Genetic Programming.</p>
<p>One thing I am not to sure is the performance issue. </p>
<p>They represent the tree as a whole nested structure. It is actually in spirit quite close to a nested list (python style- assumption: First element of a list or a nested list is always a head node)<br />
tree = ['A', ['B', ['D', 'H', 'I'], &#8216;E&#8217;], ['C','F', 'G']]</p>
<p>I am totally crap with data bases in general, so my question might seem a bit naive, but&#8230;<br />
Is it not much quicker to store it in the data base as paired elements of a hash map ?<br />
(python-style dictionary):<br />
tree = { &#8216;A&#8217;:['B','C'], &#8216;B&#8217;:['D','E'], &#8216;C&#8217;:['F','G'], &#8216;D&#8217;:['H','I'] }<br />
Reconstruction of a nested structure would be something done separately, and this way, you can not only store trees but graphs and it should not get too slow to store larger trees.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

