 
 ------------------------------------------------------------------------------------
 --
--- 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_member'
--
-- overview:
--   to allow certain nodes to have aligned 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)
--    cigar_line               -- (synonym, common name, ...)

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

--
-- Table structure for table 'protein_tree_node'
--
-- overview:
--   This table holds the protein tree data structure, such as root, relation between 
--   parent and child, leaves
--
-- 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
--      distance_to_parent    -- distance between node_id and its parent_id

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