David Blomstrom wrote:
I just thought of a possible solution. Instead of
listing all the phyla, orders, classes, families,
genera and species in one big table, create separate
tables for each taxonomic level.
Each taxon would then have two parents. the genus Sus'
(pigs) parents would be both the subfamily Suinae and
family Suidae. But the genus Panthera doesn't belong
to a subfamily, so its family (Felidae) would be
listed as both Parent and Parent2.
NAME | PARENT | PARENT2
Sus | Suinae | Suidae
Panthera | Felidae | Felidae
Then I could write PHP scripts focusing on either
Parent or Parent2, depending on what I want to do.
Does this sound sensible?
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
I'll be honest, I forgot most of that stuff from Biology. However, in
general if an item can have two or more parents, then you can use a
separate table to represent that relationship.
For example:
ParentTable
-----------
ParentId
Attribute1
Attribute2
...
RelationshipTable
----------------
ParentId
ChildId
ChildTable
------------
ChildId
Attribute1
Attribute2
...
Now, the RelationshipTable can have zero to many relationships between a
child and a parent. You can even add a "Label" column in there if you
want to label the relationship type somehow.
And it may be better to create separate tables for each taxonomic level,
like you said. Eventually one day you may want to have attributes
(columns) of a species, that may be different from attributes (columns)
of a genus.
--
http://www.douglassdavis.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]