Library Skip to Main Content

Research Skills Tutorial

Use Boolean Operators to Create Precise Searches

While databases cannot understand natural language, database searches can be made very precise using Boolean operators. Boolean operators tell databases exactly how you want your search terms combined for the optimal results.

There are only five Boolean operators and all library databases understand them.

The chart below briefly describes their functions.

Operator What does it do? Example
"" Holds together the words of a phrase so that the database searches it together instead of separately "hospital staff"
Truncates a word so that you get alternate endings educat* for education, educated, educates, etc. 
AND Joins two concepts so that the database knows you want both to be in your search results dogs AND "service animals"
OR with () Used to join two or more keywords, usually synonyms or related terms for the same concept, so that the database knows you want either or both of them to be in your search results. Whenever you join keywords with OR, enclose them with parentheses.  (trains OR railroads) AND travel
NOT Used to tell the database that you do not want this keyword or group of keywords in your search results. nursing NOT (breastfeeding OR lactation)

 

Boolean Operators Introduction

Learn how to use the Boolean Operators AND/OR/NOT to target and refine your search in this video by McMaster Libraries. 

AND

AND joins two or more concepts by telling the database that both/all of these keywords must appear in the search results.

Let's say you are doing research on how service animals support mental health.

An example of a search using the operator AND could like this: 

  • service animals AND mental health 

You also might choose to put quotation marks around the phrase "service animals" so the database finds results with that exact phrase.

Examples of a search on this topic using the AND operator could look like this: 

  • service animals AND mental health
  • "service animals" AND mental health

The AND operator narrows a search because it tells the database to show you only the items that have both of your search concepts. 

OR

OR joins two or more keywords for the same concept by telling the database that one or more of them must appear in the search results. It is useful when:

  • You have multiple ways of saying the same thing, such as U.S., U.S.A., America, and United States.
  • You are searching for two things having to do with the same concept, such as vaccine AND (measles OR "chicken pox")

For example, if you are researching lung diseases, you may want to use the following synonyms joined together by OR.

(lung OR pulmonary OR respiratory)

Always put parentheses around groups of keywords joined by OR.

OR broadens a search because it tells the database that you want either of the search terms to be retrieved in the results. 

NOT

NOT excludes search results that contain the keyword(s) following it. 

Example: Searching for impact of smog on asthma, but you do not want to read about China.

  • Search (smog AND asthma) NOT China, and the database first looks up articles that contain both smog and asthma, and then eliminates all the search results that contain China.

When you might need to use NOT:

  • When you are only interested in part of a topic, like dogs NOT poodles. 
  • If there is a certain word/phrase associated with your topic that implies a biased point of view, like immigration NOT "illegal aliens"
  • If the word/phrase you want to use is most often used as part of a phrase that has to do with something off topic, like climate NOT "climate change"
  • If a word/phrase for your topic is also used to mean something else, like archive NOT (email OR database)

Boolean Operators Part II

Learn how to format your search using the Boolean Modifiers quotes " ", asterisk *, and parenthesis in this video by McMaster Libraries. 

"Quotation Marks"

Quotation marks tell the database to take the phrase as a whole, and search for the words together, and in order. 

Example: Searching wild geese:

  • Without quotation marks, the database finds the word wild and the word geese separately. You might get search results about how well domestic geese survive in the wild.
  • With quotation marks, the database ignores articles that do not contain the exact phrase "wild geese". It won't bring up "geese wild," or "wild animals, such as Canadian geese."

Truncat*

The asterisk (*) is a kind of wild card that tells the database to find multiple "endings" of a word.

Example: Searching feminism.

    • Without truncation, you get only feminism, but not feminist.
    • When you truncate as feminis*, you get both feminism and feminist.

Be careful of truncating too early in the word itself.

  • If you truncate as femini*, you will get feminism, feminist, and also feminine, which may not be on topic.

(Parentheses)

Parentheses tell the database that it cannot just work from left to right - it has to perform certain operations first. That is why you need to put parentheses around groups of keywords joined by OR. 

Example: Searching the use of bats and frogs for mosquito control

  • If you search "mosquito control" AND bats OR frogs, the database works left to right. First it looks up "mosquito control" AND bats and then it looks for frogs, so you get search results that are about frogs but have nothing to do with mosquito control
  • If you search "mosquito control" AND (bats OR frogs), the database knows that it needs to look up bats OR frogs first. Then it looks in those results to find "mosquito control." 

You can also nest parentheses (put one set inside of another) and the the database will work from inside out.

  • (((bats OR frogs) AND "mosquito control") AND (playground OR "golf course")): First the database searches bats OR frogs. It searches inside those results for "mosquito control." Then it searches inside those for results that mention either playground or "golf course" or both.

Combine Boolean Operators For More Complex Searches

While there are only a few operators, they can be combined to create a very sophisticated search for increasingly complex research topics. 

It is feasible that you may have such a complex search to perform that you might require the use of all six of the Boolean operators to get optimal search results.

For example, let us say that you are looking for medicines or other medical interventions for seizure disorders other than epilepsy.

This search, using all of the Boolean operators, might look like this:

medic* AND (seizures OR "seizure disorders" OR "convulsive disorders" OR convulsions) NOT epilepsy

Niagara County Community College. Henrietta G. Lewis Library. 3111 Saunders Settlement Rd., Sanborn, NY 14132 | 716-614-6786