Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL
Help

8.3 Hybrid Models > 8.3.1 Adjacency and Nested Sets Model - Pg. 184

8.3 Hybrid Models 175 Personnel_OrgChart boss_emp_name `Albert' `Bert' `Albert' `Chuck' `Chuck' `Chuck' `Donna' `Eddie' `Fred' emp_name `Bert' NULL `Chuck' `Donna' `Eddie' `Fred' NULL NULL NULL This avoids a NULL in the root, but gives you more NULLs in the table. Finding all the leaf nodes is easy: SELECT P1.emp_name FROM Personnel_OrgChart AS P1 WHERE P1.subordinate_emp_name IS NULL;