> Just imagine, we would like to have the notion of a reaction
> in the model, this reaction has e.g. substrates which are of
> the type compound. Now compound is a baseclass and has lots
> of subclasses like simple_molecule, peptide, dna, rna etc.
> and those subclasses might have subclasses of their own. So
> how would I define this reaction. The easiest would have
> been, if ACEDB knew abou inheritance than I would just say:
>> ?Reaction Substrate ?Compound
>> O.K., but since we all know, this does not work, so I
> thought about using the Unique construct above which just
> lists all subclasses:
Aha, but I think it does work. See below.
> ?Reaction Unique Substrate ?Compound
> Substrate ?SimpleMolecule
> Substrate ?.....
>> Now you suggest to do it like this:
>> ?Reaction Substrate UNIQUE CompoundSubstrate ?Compound
> SimpleMoleculeSubstrate
> ?SimpleMolecule
> ...
>> Although this works, it adds another level of complexety
> when you want to query a reaction. To bad, but since this
> seems to be the only way to do it, I guess I wil have to do
> it this way. But I hope, I could clearify why I tried to do
> it the other way first.
> How would one define ?Reaction the "ACEDB way"? I am still
> facing the problem that a substrate can be a peptide, a dna,
> a rna etc. How could this be solved besides using ID
> numbers?
I would have
?Reaction Substrate ?Compound XREF Reaction
?Compound Type UNIQUE Peptide
Nucleic_acid UNIQUE DNA
RNA
Small_molecule
Reaction ?Reaction XREF Substrate
Then define subclasses of Compound as follows in subclasses.wrm
Class Peptide
Is_a_subclass_of Compound
Filter Peptide
Class Nucleic_acid
Is_a_subclass_of Compound
Filter Nucleic_acid
Class DNA_compound
Is_a_subclass_of Nucleic_acid
Filter DNA
etc.
Does this do what you want? Note that I say DNA_compound because DNA
is a reserved class.
Richard