Skip to main content

InfoSkills for Theology

InfoSkills @ TiU

2.2. Nesting

Searching with multiple Boolean operators

Nearly all databases are programmed to give AND precedence over OR. This means that terms linked with AND will be searched before those linked with OR. To override this default search order, you can use a technique called 'nesting'.

What is nesting?

Nesting is using parentheses ( ) to specify the order in which a search should be processed. Search terms within parentheses will be found first and then combined with the search terms outside the parentheses.

The most common use of nesting is to enclose multiple search terms -- separated by an OR operator -- in parentheses and then linking those enclosed terms with one or more other search term(s) using AND. 

This not only works in databases, but also in (most) search engines:

Note that:

  • the terms inside parentheses represent the same concept (youth);
  • the term 'gaming' is combined using the operator AND, as it communicates a different concept. 

A nested search in a library database

Library databases typically provide drop-down boxes containing the Boolean operators AND, OR and NOT.

How will the database process this search?

  • First it will find records that contain AT LEAST ONE of the terms 'youth', 'teens', 'adolescents'.
  • Then from these results the database will find items that ALSO contain the term 'gaming'.