March 2009
Intermediate to advanced
832 pages
23h 49m
English
Throughout the chapter, I will use three scenarios: Employee Organizational Chart (tree, hierarchy); Bill Of Materials, or BOM (DAG); and Road System (undirected cyclic graph). Note what distinguishes a (directed) tree from a DAG. All trees are DAGs, but not all DAGs are trees. In a tree, an item can have at most one parent; in some management hierarchies, an employee can have more than one manager.
The employee organizational chart that I will use is depicted graphically in Figure 12-2.

Figure 12-2. Employee organizational chart
To create the Employees table and populate it with sample data, run the code in ...