DZone Database Zone
Trying to Represent a Tree Structure Using Postgres
Suppose you had a hierarchical data structure in your application. How would you save it in a database? How would you represent a complex tree structure using flat rows and columns?
There are a few different, equally valid, options. In this series of blog posts, I'll take a close look at one option that Postgres provides: the LTREE extension. If you install and enable LTREE on your Postgres server, it will add powerful SQL operators and functions that support tree operations.
No comments:
Post a Comment