Exercise 1: Why the Five-Level URL Only Costs One Lookup — Possible Solution ==================================================================== WHY IT'S ONE LOOKUP, NOT FIVE ------------------------------ Per this chapter, visiting the five-level-deep URL resolves through Chapter 3's pattern, which passes the entire remaining path as a single string to the view. That view queries Page.objects.get(full_path=full_path) directly - one indexed lookup against the exact stored value, not a walk up through five separate parent relationships one level at a time. THE CHAPTER 2 DECISION THIS TRACES BACK TO ------------------------------ Per this chapter, this traces directly back to Chapter 2's own design decision to store a materialized full_path field alongside the real adjacency-list parent structure, specifically because a pure adjacency list alone would have required one query per level to reconstruct a deep path - exactly the read-heavy cost Chapter 2 identified as unacceptable for this site's own actual traffic pattern. Storing full_path as an indexed column was chosen specifically so that resolving any URL, no matter how deep, costs exactly one lookup - which is precisely what Step 3 demonstrates actually happening, five levels deep, with no extra cost for the extra depth. WHY THIS WORKS AS AN ANSWER ------------------------------ It correctly explains that the single indexed full_path lookup is what resolves the URL in one query, and correctly traces this back to Chapter 2's own explicit reasoning for choosing the materialized-path hybrid design in the first place.