Skip to Main Content
Chat now
Sgwrsiwch nawr

Life Sciences and IBERS: Boolean operators: AND, NOT and OR

Boolean operators: AND, NOT and OR

Boolean operators form the basis of database logic and are used to combine concepts when searching. By using these operators, you are able to focus your search. They connect your search words together to either narrow or broaden your set of results.

The three basic boolean operators are:

  • AND
  • OR
  • NOT

Remember to type these operators in capital letters. 

Why use Boolean operators?

  • To focus a search, particularly when your topic contains multiple search terms.
  • To connect various pieces of information to find exactly what you're looking for.

AND

Use AND in a search to:

  • narrow your results
  • tell the database that ALL search terms must be present in the resulting records

​For example:

  • cat AND dog
  • exercise AND health
  • pollution AND water AND pesticides 

OR

Use OR in a search to:

  • connect two or more similar concepts
  • broaden your results
  • You are telling the database that ANY of your search terms can be present in the resulting records

For example:

cat OR dog

travel OR tourism

cloning OR genetics OR reproduction

NOT

Use NOT in a search to:

  • exclude words from your search
  • narrow your search, telling the database to ignore concepts that may be implied by your search terms

For example: 

  • cloning NOT sheep
  • travel NOT tourists
  • dinosaur NOT extinction

Combining operators

You can use multiple operators within the same search to get even more effective and powerful results. Databases follow commands you type in and return results based on those commands. When combining your search terms, be aware of your search order. 

  • Databases usually recognise AND as the primary operator, and will connect concepts with AND together first.
  • If you use a combination of AND and OR operators in a search, enclose the words/concepts in (brackets together).

Example:

You are looking for information on teenagers and the use of social media. You could combine your operators as:

  • (teenagers OR adolescents) AND (social media OR facebook)
    • Group the OR concepts together using the brackets ( ) to ensure that the search is processed in the expected way.

Example:

You are looking for information on cloning humans and cloning sheep. You could combine your operators as:

  • cloning AND (sheep OR human)
    • This will search for cloning AND sheep as well as cloning AND human

If you do not use the (parentheses) and search using the following cloning AND sheep OR human, your search will be processed as:

  • cloning AND sheep as one search
  • OR human as a secondary search
    • This means that your search results containing human would not be linked in any way to cloning.