[Biojava-l] ontology exception, addSequence & BioSQLSequenceDB
Matthew Pocock
matthew_pocock at yahoo.co.uk
Wed Oct 15 05:03:26 EDT 2003
>> -- Link a triple to a term, giving it a unique identifier. This allows
>> -- arbitrary expressions to be built up by then using the linked-to term
>> -- in another triple.
>> --
>> -- e.g. implies(isa(x, y), hasa(x, z))
>> CREATE TABLE term_relationship_term (
>> term_relationship_id INTEGER NOT NULL,
>> term_id INTEGER NOT NULL,
>> PRIMARY KEY ( term_relationship_id, term_id ),
>> UNIQUE ( term_relationship_id ),
>> UNIQUE ( term_id ) );
>>
>
> I have 3 comments on this.
>
> 1) Given the unique foreign keys, this amounts to a 1-1 relationship
> to both term and term_relationship, and therefore can be tacked on to
> either of the two as a single foreign key.
Yes. I didn't want to break the current schema, so added it this way.
>
> 2) It looks like you want to equate a triple to a term. Likewise, it
> seems what you really want to have is a triple with subject and object
> being triples themselves.
Idealy, I want all triples to be terms themselves. Not all terms are
triples though. The modified schema still supports 'anonymous' triples
as well.
>
> 3) The example is poorly chosen and in fact I don't really understand
> when you'd want all this. If x,y,z are arbitrary, then it can be
> re-written as implies(isa,hasa), which is a 'normal' triple.
This is different to your example because it's scoped by the type 'y'.
Here is a more expressive rule - transitive closure (varables starting
with '_' ):
implies(and(isa(_t, transitive), and(_t(_x, _y), _t(_y, _z))),
_t(_x, _z))
Your example of imples(isa, hasa) is relying (I think) on some semantic
magic - isa and hasa are both atoms, which happen to be relations. As
such, they are not truth values that could be applied to the predicate
implies. They only evaluate to truth values when applied to subject and
object, but you're not specifying these - what do they default to?
Triples in expressions are not needed for pure data representation, but
are needed (I think) for any encoding of rules (e.g. the hyperthetical
rule: all EMBL feature types map to SO terms by looking up the SO term
alias equal to the EMBL feature type).
Chris, am I barking up the wrong tree?
Matthew
>
>
> So I guess I'm missing something and I'd be glad to learn what.
>
> Also, Chris do you have any thoughts on this?
>
> -hilmar
>
More information about the Biojava-l
mailing list