Search Postgresql Archives

Re: SQL trees and other nonsense...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Trilobite Trilobite wrote:
I'm playing with tree structures in SQL. It's kinda cool and definitely a big hack.

Anyway, there are a few things in our database that are more hierarchal then they are relational. The problem I'm working with is accounting, as in, "accounts > owners equity > expense accounts > rent > shop rent"

Since when does Expense become a subcategory of Equity? :)


Btw, trees have been discussed so many times. Peruse the archive and you'll find many bits of wisdom...

As for meself, currently I tend to use MP (materialized path). It's space expensive but most of my trees are not very deep and MP makes most queries easy.

After all, NS (nested set) is a special form of MP anyway.

--
dave


---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux