Skip to Main Content

InfoSkills for Social and Behavioral Sciences

InfoSkills @ TiU

2.2. Nesting

What is nesting?

To understand what nesting is, you need to know that databases are programmed to give AND precedence over OR. This means that terms linked with AND will be searched before those linked with OR. Nesting is a technique that can be used to override this default search order. 

How does nesting work?

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.

Example

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 with (youth OR teens OR adolescents) using the operator AND, as it communicates a different concept. 

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

How would a database process the above search?

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

Creative Commons License This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License by Tilburg University.