I previously asked a question about this (How to store a Tree Of Life in MySQL? (Phylum, Class, Order, Family, etc)) and I was using MySQL but after someone suggested using MongoDB, I decided to look around and install Couchbase. (Funny thing, geraldss suggested Couchbase in the comment of my previous question after I installed it).
I will store the Kingdom, Phylum, Class, etc for each fish in a document. But I would also like to have document(s) to help with a multilevel dropdown.
I want the first dropdown to be the 5 Kingdom, and then the next dropdown will populate with the Phylum available for this kingdom., Then the third dropdown will be populate with a list of this Phylum's class, and so on.
Right now I'm trying to find the best practical way to store this.
Should I create 1 single huge document called taxonomy or should I create multiple documents about, let say, each Phylum (still huge documents), or something else?
Little PHP array example to help me create the document(s):
"Fungi" => array(
"type"=>"kingdom",
"origin" => "Latin, derived from Greek - sp(h)onges, sponges",
"description" => "Obtain food through absorption, excrete enzymes for digestion",
"example" => "molds, mushrooms, lichens",
"Phylum" => array(),
),
"Plantae" => array(
"type"=>"kingdom",
"origin" => "Latin - plant",
"description" => "Multicellular organisms that are autotrophic",
"example" => "mosses, ferns, grasses, flowers, trees.",
"Phylum" => array(),
),
"Animalia" => array(
"type"=>"kingdom",
"origin" => "Latin - breath, soul",
"description" => "Multicellular organisms that develop from the fertilization of an egg by a sperm",
"example" => "sponges, worms, insects, fish, birds, humans",
"Phylum" => array( //32 total, 12 here
"Porifera" => array(
"name" => "Porifera",
"type" => "Phylum",
"origin" => "Latin - to bear pores",
"description" => "Sponges",
),
"Cnidaria" => array(
"name" => "Cnidaria",
"type" => "Phylum",
"origin" => "Greek - nettle",
"description" => "",
"Class" => array(
"Hydrozoa" => array(
"name" => "Hydrozoa",
"description" => "Hydras",
"Order" => array( //Multiple Order
"Family" => array( //Multiple Family for each Order
"Genus" => array( //Multiple Genus for each Family
),
),
),
),
What should I do? Would it be a good approach to create one single document? How would you store this?
(Please don't close this question, I'm trying very hard to switch my mind from relational to document-based DB and I'm struggling with this)