Sure, however that's counterproductive. Moreover, it isn't really flexible for a tree-like object hierarchy.
Imagine a typical space map: galaxy > clusters/constellations > stars > planets > moons. Some planets may have some moons or none at all, some stars may have no planets or up to dozen etc., there is a lot of dynamic data.
So basically database is a set of sets. Alternatively we could do with a "set" (think javascript Object with a bunch of variables) and implement our own form of database. Perhaps with hashtables. Would require a lot of effort setting up.
The point of a database is quick lookups and changes with tens of thousands or even more objects. I'm not sure it'd be a good idea to manually iterate over each set. Then there is the whole magic with indexes.
Well, I'm not really that knowledgeable, however there is a demand for more flexible data structures capable of handling thousands of entries. We can only go so far with arrays and variables.
Hm, XML object could serve as some sort of database, however I'm not sure about its efficiency.