Tuesday, December 12, 2017

Trying to Represent a Tree Structure Using Postgres

DZone Database Zone
Trying to Represent a Tree Structure Using Postgres
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:

Fun With SQL: Functions in Postgres

DZone Database Zone Fun With SQL: Functions in Postgres In our previous  Fun with SQL  post on the  Citus Data  blog, we covered w...