Re: Adjacency List or Nested Sets to model file system hierarchy?

Поиск
Список
Период
Сортировка
От Alban Hertroys
Тема Re: Adjacency List or Nested Sets to model file system hierarchy?
Дата
Msg-id 45D17F69.4000202@magproductions.nl
обсуждение исходный текст
Ответ на Re: Adjacency List or Nested Sets to model file system hierarchy?  (Bill Moseley <moseley@hank.org>)
Список pgsql-general
Bill Moseley wrote:
> On Mon, Feb 12, 2007 at 05:36:37PM +0000, Ian Harding wrote:
>> You don't mention the ltree contrib module, have you looked at it?  It
>> can easily meet your requirements without having to reinvent anything.
>> It may be what you're referring to as Nested Sets, I don't know.  I
>> use it and like it a lot.
>
> Yes, I have seen it.  I just thought it seemed like a very large
> "hammer" to use form my task -- quite a few more query methods than I
> need .  But, perhaps I should look at it again and get a better
> understanding of what it can do.

What it can do is add indexed paths to your records ;)

You will still have to check consistency on updates to paths (fe. if the
root node changes name, all nodes need updating) though, but that's true
for any method including the entire path. And on delete (remove child
nodes as well) and insert (check parents existence), of course.

--
Alban Hertroys
alban@magproductions.nl

magproductions b.v.

T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
   7500 AK Enschede

// Integrate Your World //

В списке pgsql-general по дате отправления:

Предыдущее
От: "Ashish Karalkar"
Дата:
Сообщение: How to append tables in a view
Следующее
От: Shane Ambler
Дата:
Сообщение: Re: Testing embedded SQL in C