Suppose I have the following tables:
____________________ ____________________
| Organisms | | Species |
|--------------------| |--------------------|
|OrganismId (int, PK)| |SpeciesId (int, PK) |
|SpeciesId (int, FK) |∞---------1|Name (varchar) |
|Name (varchar) | |____________________|
|____________________| 1
1 |
| |
| |
∞ ∞
______________________ ____________________ _______________
| OrganismPropsValues | | SpeciesProps | | Props |
|----------------------| |--------------------| |---------------|
|OrganismId (int, FK) | |PropId (int,PK,FK) | ∞-----1|PropId (int,PK)|
|PropId (int, FK) | |SpeciesId(int,PK,FK)| |Name (varchar) |
|Value (varchar) | |____________________| |_______________|
|______________________| 1
∞ |
| |
-----------------------------------------------------------
A quick explanation of what I am trying to present here: suppose we have a list of species such as cat, dog, human, etc. We also have a set of properties (abbreviated details so that I can fit on the diagram more easily) that apply to some, but not necessarily all species - for example, the length of the tail (for species with tails), eye color (for eyes with eyes) etc.
SpeciesProps - , , - {, }, {, }, {, }, {, }, {, }. {Human, Tail Length}, , , .
"" "" . , {, }, {, } {, }.
: OrganismPropsValues "" - , , {, , ). {Rufus, , } {Rufus, , 20} ( ). , , , , , {Bob, Tail Length, 10}, {Human, Tail Length} SpeciesProps. , , SpeciesProps OrganismPropsValues, ?