| A lot of database searching is based
on the principles of Boolean logic. Boolean logic, named for the
British mathematician George Boole, refers to the logical relationship
among search terms.
Boolean logic consists of three logical
operators:
Venn diagrams are often used to help
in understanding these operations better.
Query Using OR:
I would like information about college
OR university.
OR
college OR university
-
This search will retrieve records in
which AT LEAST ONE of the search terms is present.
-
The shaded circle with the word college
represents all the records that contain the word "college" and the shaded
circle with the word university represents all the records that
contain the word "university."
-
OR logic is most commonly used to search
for synonymous terms or concepts.
| Search terms |
Results |
| college |
17,320,770 |
| university |
33,685,205 |
| college OR university |
33,702,660 |
-
The more terms or concepts we
combine in a search with OR logic, the more records we will retrieve.
Query using AND:
I'm interested in the relationship
between poverty AND crime.
AND
poverty AND crime
-
This search will retrieve records in
which BOTH of the search terms are present.
-
The shaded area is the overlap of the
two circles representing all the records that contain both the word "poverty"
and the word "crime."
-
Note: records with only "poverty" or
only "crime" are not retrieved.
| Search terms |
Results |
| poverty |
783,447 |
| crime |
2,962,165 |
| poverty AND crime |
1,677 |
-
The more terms or concepts combined
in a search with AND logic will retrieve fewer records. For
example:
| Search terms |
Results |
| poverty |
783,447 |
| crime |
2,962,165 |
| poverty AND crime |
1,677 |
| poverty AND crime
AND gender |
76 |
Query Using NOT:
I want to see information about
cats, but NOT dogs.
NOT
cats NOT dogs
-
This search retrieves records in which
ONLY ONE of the terms is present.
-
The shaded area with the word cats
represents all the records containing the word "cats."
-
No records are retrieved in which the
word "dogs" appears, even if the word "cats" appears there too.
| Search terms |
Results |
| cats |
3,651,252 |
| dogs |
4,556,515 |
| cats NOT dogs |
81,497 |
NOT logic excludes records from
your search results. Be careful when you use NOT: the term you do want
may be present in an important way in documents that also contain the word
you wish to avoid.
Using Boolean Logic when Searching on
the Internet
Boolean logic when searching the Internet
may be inherent in 3 ways:
-
Full Boolean logic with the use of the
logical operators
-
Implied Boolean logic with keyword searching
-
Predetermined language in a user fill-in
template
1. Full Boolean logic with the use of
the logical operators
This is an option offered
by many search engines. For example:
Query: I need information
about cats.
Boolean logic: OR
Search: cats OR felines
Query: I'm interested in dyslexia
in adults.
Boolean logic: AND
Search: dyslexia AND adults
Query: I'm interested in radiation,
but not nuclear radiation.
Boolean logic: NOT
Search: radiation NOT nuclear
Query: I want to learn about
cat behavior.
Boolean logic: OR, AND
Search: (cats OR felines)
AND behavior
Note: Use of parentheses
in this search is known as forcing the order of processing. In this
case, we surround the OR words with parentheses so that the search engine
will first process this part of the search. Next, the search engine with
combine this result with the last part of the search. Using this method,
we are assured that the OR terms are kept together as a logical unit.
2. Implied Boolean logic with keyword
searching
Keyword searching:
to search you enter terms representing the concepts you wish to retrieve.
Boolean operators are not used.
Implied Boolean logic: symbols
are used to represent Boolean logical operators. On the Internet the absence
of a symbol is significant, as the space between keywords defaults
to either OR logic or AND logic. Many well-known search engines, such as
AltaVista (main screen), Excite, Infoseek, and MetaCrawler, default to
OR.
For example:
Query: I need information
about cats.
Boolean logic: OR
Search: cats
felines
The space between the keywords
is interpreted as the Boolean OR.
Query: I'm interested in dyslexia
in adults.
Boolean logic: AND
Search: +dyslexia
+adults
Query: I'm interested in radiation,
but not nuclear radiation.
Boolean logic: NOT
Search: radiation
-nuclear
Query: I want to learn about
cat behavior.
Boolean logic: OR, AND
Search: cats
felines +behavior
Quick Comparison Chart:
Full Boolean vs. Implied Boolean vs. Templates
| |
Full Boolean |
Implied Boolean |
Template Terminology |
| OR |
college or university |
college
university |
any of these words
can contain the words
should contain the words |
| AND |
poverty and crime |
+poverty
+crime |
all of these words
must contain the words |
| NOT |
cats not dogs |
cats -dogs |
must not contain the words
should not contain the words |
| NEAR, etc. |
cats near dogs |
N/A |
near |
This page is based on a more comprehensive page created by the University
of Albany Library's Boolean
Primer |