What is the best software or platform combination to use for storing variable data?
My data is in standard name-value pairs. At the top of the tree are a few broad categories, each of which will have a name and a value (category name) and also may have name-value pairs under it as well. These will have sub-categories and may have sub-sub-categories and sub-(n)-categories so on. Each of those will also have names and values and additionally have properties under each expressed as name-value pairs.
Naturally some flavor of XML makes sense; SQL/Relations DBs (my favorite) do not. As an example, the data may be similar to the below biological taxonomy.
<Kingdom>Animal
<Mammal>Yes
<Legs>
<4Legs>90%
<EyeColor>
<EyeColorBrown>40%
<HairColorBrown>40%</HairColorBrown>
<HairColorBlack>40%</HairColorBlack>
</EyeColorBrown>
<EyeColorBlack>60%
<HairColorBrown>40%</ HairColorBrown>
<HairColorBlack>40%</ HairColorBlack>
</EyeColorBlack>
</EyeColor>
</4Legs>
<2Legs>5%
<EyeColor>
<EyeColorBlue>20%
<HairColorBrown>40%</HairColorBrown>
<HairColorBlack>40%</HairColorBlack>
<HairColorBlonde>40%</HairColorBlonde>
</EyeColorBlue>
<EyeColorBrown>20%</EyeColorBrown>
<EyeColorBlack>60%</EyeColorBlack>
</EyeColor>
</2Legs>
<NoLegs>5%</NoLegs>
</Legs>
</Mammal>
</Kingdom>
So, in my code, I want to create a form where for example if someone chooses 2Legs, it shows the three eye color options and choosing Blue there would show the three hair color options. Then, when the form is submitted, I want to be able to store the username with their set of choices, e.g.
<UserName>John Doe
<Choice1>
<Kingdom>Animal
<Mammal>Yes
<Legs>
<2Legs>
<EyeColorBlue>20%
<HairColorBrown>
<...close each...>
</Choice1>
</UserName>
I have heard of XMLDB, NoDB, NoSQL and a host of others, but don’t know where to start. I would like to be able to use the database with PHP and JavaScript, but beyond that how should I approach this?
Please also note that I want to be able to use different data sets eventually. In other words, I may do the above animal data and then use something similar to build a site for um.. let’s say furniture.