Skip to Main Content

InfoSkills for Economics and Management

InfoSkills @ TiU

2.3. Nesting

How databases process search terms by default

To understand nesting, it helps to know how most databases handle search terms. By default, databases follow this order: 

  1. NOT
  2. AND
  3. OR 

This means the database prioritizes combining terms using AND before applying OR, unless you specify otherwise by using parentheses.

EXAMPLE WITHOUT NESTING (parentheses)
"social media" AND anxiety OR depression 

You'll get results about social media and anxiety, plus anything about depression, even if unrelated to social media.

Using parentheses to control the search order (nesting)

Nesting is a search technique that uses parentheses to group terms, so you can tell the database exactly how to process your query. Terms inside parentheses are processed first, which helps you get more relevant and focused results by overriding the default order.

EXAMPLE WITH NESTING
"social media" AND (anxiety OR depression)

This tells the database to first find anything about anxiety or depression, and then narrow it to items also discussing social media

Effective strategy: group similar terms with OR, combine concepts with AND

The examples provided illustrate the typical use of nesting: grouping related terms with OR in parentheses, then linking that group to another concept with AND.

EXAMPLE WITH NESTING
("college students" OR "university students") AND ("mental health" OR "psychological well-being")

What this search query does: 

"college students" OR "university students" → Finds sources that mention either group (synonyms for student types).

"mental health" OR "psychological well-being" → Finds sources that mention either of those related concepts.

The AND operator connects the two groups, so it only shows results that include at least one term from each group.

 

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