 
 ------------------------------------------------------------------------------------
 --
--- Table structure for table 'protein_tree_names'
+-- Table structure for table 'protein_tree_tag'
 --
 -- overview: 
---    to allow for naming of nodes.  Useful for tagging multiple root nodes
---    Allows for many-many relations
+--    to allow for tagging nodes.
+--    
 -- semantics:
---    node_id             -- the id of node associated with this name
---    name                -- name itself
---    name_class          -- (synonym, common name, ...)
+--    node_id             -- node_id foreign key from protein_tree_node table
+--    tag                 -- tag used to fecth/store a value associated to it
+--    value               -- value associated with a particular tag
 
 CREATE TABLE protein_tree_tag (
   node_id                int(10) unsigned NOT NULL,

--
-- Table structure for table 'protein_tree_node'
--
-- overview: for importing from the ncbi taxonomy taxdump.tar nodes.dmp file
--           tables stores the nodes in a tree formated DB
-- semantics:
--      node_id               -- PRIMARY node id 
--      parent_id             -- parent node id
--      root_id               -- to quickly isolated nodes of the different rooted tree sets
--      left_index            -- for fast nested set searching
--      right_index           -- for fast nested set searching

CREATE TABLE protein_tree_node (
  node_id                         int(10) unsigned NOT NULL auto_increment, # unique internal id

-- Table structure for table 'protein_tree_member'
--
-- overview:
--   to allow certain nodes (leaves) to have aligned protein members attached to them   
-- semantics:
--    node_id                  -- the id of node associated with this name
--    member_id                -- link to member.member_id in many-1 relation (single member per node)
--    method_link_species_set_id -- foreign key from method_link_species_set table
--    cigar_line               -- compressed alignment information 
--    cigar_start              -- protein start (0 if the whole protein is in the alignment)
--    cigar_end                -- protein end (0 if the whole protein is in the alignment)

CREATE TABLE protein_tree_member (
  node_id                     int(10) unsigned NOT NULL,
