Then he'd have to use Data::Grouper, or something like that to build his hierarchical format. Yes, using CDBI results in N+1
queries to the RDBMS, where N = the number of records returned
by the initial
Areas->retrieve_all(). However, the real glory of CDBI has to do with the amazing code reduction it achieves (especially in conjuction with Template Toolkit for example), not the performance.
Moral: use CDBI where reusability, portability and ease of coding take a priority over performance (almost everywhere). Use hand coded SQL and DBI when you need to sacrifice everything for speed.