Skip to Main Content

Database Search Strategies: Boolean operators

What are Boolean operators?

Boolean operators form the basis of mathematical sets and database logic.

  • They tell the database how you want your keywords to be connected in the search.  
  • You can use them to narrow or broaden your set of results.
  • Choose which to use based on what is logical to include or exclude for your specific need.

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.
The three basic boolean operators are: AND, OR, and NOT. They must always be in ALL CAPS.

Using AND

Use AND in a search to:

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

EXAMPLE:

The dark triangle in the middle of the Venn diagram below represents the result set for the search "cloning AND humans AND ethics"

Notes:

  • In many search engines the AND is implied.
  • All your search terms may be included in the results, but they may not be connected together the way you want.
  • The words may appear individually throughout the resulting records.

Using OR

Use OR in a search to:

  • combine related concepts or synonyms
  • broaden your results, telling the database that ANY of your search terms can be present in the resulting records

EXAMPLE:

All three circles represent the result set for the search "cloning OR genetics OR reproduction". It is a big set because any of those words are valid using the OR operator.

Using 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
  • order does matter

EXAMPLE:

This search would exclude results that contain both peanut butter and jelly.

Caution: the NOT operator should be used sparingly and carefully as it may omit citations relevant to a search.

Search order

Be aware of the logical order in which words are connected when using Boolean operators: 

  • Search terms combined with AND and OR can be entered in any order to retrieve the same results
  • The NOT operator excludes the search term directly after it
  • Databases usually recognize AND as the primary operator, and will connect concepts with AND together first.
  • When using the AND and OR operators in one search, enclose the OR terms in parentheses to force the computer to search for them first.  Example: (symptoms OR treatments) AND diabetes
Touro College of Osteopathic Medicine and College of Pharmacy
Harlem Campus 230 West 125th Street New York, NY 10027 (212) 851-1199