Click here to Skip to main content
15,892,059 members
Articles / Database Development

How to Manipulate Hierarchical Information in Flat Relational Database Tables

Rate me:
Please Sign up or sign in to vote.
3.18/5 (29 votes)
21 May 2020CPOL18 min read 105.9K   60  
This article describes a technique to quickly retrieve and present hierarchical information from a flat relational database table with only one table scan.
Given a parent-child relationship in a database table (hierarchical/tree data structure), most methods require multiple table scans to draw the hierarchical/tree data on the client-side. The method I have invented in 2002 can do the same in one table scan.

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
India India
I have been coding since 1983ish in a variety of languages. I originally started as a game programmer and then switched to business programming from 1990. I still program games.

Comments and Discussions