Hacker News story: Ask HN: Best practices for modeling B-Trees in SQL?

Ask HN: Best practices for modeling B-Trees in SQL?
What are some best practices for modeling B-Trees and other types of trees in SQL? What does the schema look like? I know I can just store a node value along with it's parent id in a table row, but I'm sure there are more ways of going about this. Also, what are pros, cons, tradeoffs of using enums vs a reference table and foreign keys? I'm after high level principles, no need to think too hard about this. Thanks very much! 1 comments on Hacker News.
What are some best practices for modeling B-Trees and other types of trees in SQL? What does the schema look like? I know I can just store a node value along with it's parent id in a table row, but I'm sure there are more ways of going about this. Also, what are pros, cons, tradeoffs of using enums vs a reference table and foreign keys? I'm after high level principles, no need to think too hard about this. Thanks very much!

Hacker News story: Ask HN: Best practices for modeling B-Trees in SQL? Hacker News story: Ask HN: Best practices for modeling B-Trees in SQL? Reviewed by Tha Kur on April 28, 2021 Rating: 5

No comments:

Powered by Blogger.