After having written my original message (see below) I found the solution to my problem (also explained below). I explicit the solution here first asking the following question:
Would it be possible to change
<word> ::= <word-component>|<word><period><word-component>
to
<word> ::=
<word-component><semicolon>|<word><period><word-component><semicolon>
?
To understand what I'm talking about, I think it's better to read the
original message,
unless you are good -damn good- at those games where given an answer you
have to
guess the question.
Alberto
PS: If you like to play, the subject probably helps ...
Dear UCD builders,
It would be very convenient NOT to allow a word to be a substring of
other words.
Example:
Suppose the following two UCDs existed (I'm inventing here):
(Luckily the second one is just only my invention, but it is just to illustrate the point)
In this case 1. would be a substring of 2.
Why it woud be bad? Because it would unnecessarily complicate a sql query
to a table listing UCDs.
A query like
select * from whatever
where UCD like "%em.IR.H%"
would return not only the UCD I'm really interested in (em.IR.H) but also the em.IT.Hgamma.
The way out, given the fact that UCDs are composed of multiple words
semicolon separated,
would be to use an "OR" but that is not so efficient:
select * from whatever (could be a complicated join) where UCD like "%em.IR.H" or UCD like "%em.IR.H;%"
OR, as said, are not efficiently handled.
To simplify the usage of UCD in RDBMSes it would be nice to see such rule (not allowing substrings) explicited in the UCD document.
I checked the UCD1+ list and I could not find any such case (probably by
design?),
a part from those obvious cases like em.IR being a substring of em.IR.H
where the hierarchy is implied.
Even these cases could be avoided if the high level UCD would be formulated
differently, eg, em.IR.main (or em.IR.def, def for definition or
default) instead of em.IR.
But this is less disturbing then the example cited above.
Actually, another way out would be to always terminate a word with the
semicolon!
even if at the end of UCD.
E.g., "em.IR;" would do the job quite nicely.
This could be avoided quite nicely by change the Backus-Naur <word>
definition
to always end with a semicolon!
Thanks,
Alberto Received on 2004-05-05Z11:45:07