To understand nesting, it helps to know how most databases handle search terms. By default, databases follow this order:
This means the database prioritizes combining terms using AND before applying OR, unless you specify otherwise by using parentheses.
You'll get results about social media and anxiety, plus anything about depression, even if unrelated to social media.
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.
This tells the database to first find anything about anxiety or depression, and then narrow it to items also discussing social media.
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.
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.
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
by Tilburg University.