One of the things that we’re
able to do in Dialog is to enter a rather complex strategy in a single
command line.We do this with
something called “nesting.”The first
command above is just a simple search for two words using an OR Operator
between them.We could have put each
word in a separate select statement and then combined them with an OR, but
this is equivalent.The second command
is simply a search for the word “leukemia.”The third command should look familiar – it would be a way to combine
the concepts of S1 and S2.We could
for all three words in the same select command, but here we have to be
careful.For the fourth command in the
slide, Dialog will always process an AND Operator before an OR Operator.This would mean that all the records of a
database containing both feline AND leukemia would be found, then the result
of that would be combined with the set of all records that contain the word
“cat” using an OR operator.That is
not likely what would be intended.We
would really want either “cat” or “feline” to be present and then the word
“leukemia” to also show up in the record.In Dialog (and most other systems), we can force the system to
interpret our logic correctly with the use parentheses.That’s what I show in the fifth and final
command on the slide.