Joomla uses nested arrays for several things, including menu items and categories.
Wordpress seems to be using a rather unmanaged system, storing its menu items along with other things in its "terms" table. I can only find the βparentβ field, so I assume that it simply stores the identifier of the parent element for modeling hierarchical menus. I did not work with Wordpress though.
source share