AND, OR, NOT (Boolean Operators)

Using the Boolean operators AND, OR, NOT to combine keywords in a database search allows you to narrow or expand your search. To build a complex search using two or more Boolean operators, you will need to learn the advanced technique of nesting.

In the Venn diagrams below, the area retrieved is yellow.

  • Use AND to narrow a search. Both terms must be present in any references you retrieve.
    Example: global warming AND forests

  • Use OR to expand a search. Your search will retrieve records with EITHER of the terms.
    Example: children OR adolescents

    OR is most often used to combine synonyms or like terms.


  • Use NOT to exclude a term. Records with the first term will be retrieved, but any records with the second term will be eliminated.

    Example: special education NOT hyperactivity

    NESTING

    Nesting involves using parentheses to insure that Boolean operations are performed in the sequence you intend. This technique allows you to build a complex search using two or more operators (AND, OR, NOT).

    CAUTION! You may not build a good search using more than one Boolean operator without using nesting.

    Example of simple nesting:
    Find: smoking AND (adolescents OR teenagers)

    In this search the OR operation is nested and will be performed first. Then the AND operation will be performed. This search will retrieve items on smoking and adolescents as well as items on smoking and teenagers.

    Example of more complex nesting:
    Find: (smoking OR tobacco OR nicotine) AND (adolescents OR teenagers)

    The OR operations inside both sets of parentheses will be performed first, and then the resulting sets will be combined using the AND operator. Nesting synonyms in this way can broaden your search.

    BAD Example:
    Find: smoking OR tobacco AND adolescents OR teenagers

    This search will perform the OR and AND operations in the sequence that they are typed. This will retrieve items that are irrelevant! You will retrieve all items about teenagers, not just those relating to smoking.


    Examples used with permission from James Madison University