Manuel B. Garcia

Manuel B. Garcia serves as the Senior Director for Educational Technology and Digital Learning at FEU Institute of Technology, Manila, Philippines. Read More

Contact Info

1607, FEU Tech Building,
P. Paredes St, Sampaloc,
Manila, Philippines
mbgarcia@feutech.edu.ph

Follow Me

How Do Parentheses Change a Database Search?

Parentheses tell a database which search terms belong together before different parts of a query are combined. They become especially important when AND and OR appear in the same search because missing or misplaced parentheses can change which records are retrieved.

57
Parentheses in Database Searches Guide 57 of 247
01 · The Question

Why Can Two Searches With the Same Words Produce Different Results?

Consider these two searches:

adolescent OR teenager AND depression

(adolescent OR teenager) AND depression

They contain exactly the same search terms and Boolean operators. Yet they should not automatically be treated as equivalent.

The parentheses in the second search tell the database that adolescent and teenager belong together as alternatives representing one concept. That complete group is then combined with depression.

Without explicit grouping, the database has to apply its own rules for determining how AND and OR are evaluated. Once a search contains multiple concepts and alternatives, that can produce a result set different from the one you intended.

02 · The Short Answer

Parentheses Tell the Database Which Parts of the Search Belong Together

In Brief

Parentheses group search terms into logical units so that the database processes the grouped expression together before combining it with the rest of the query.

They are especially important when a search contains both OR and AND. A common structure is to place alternative terms for one concept inside parentheses with OR, then connect that concept group to another concept group with AND.

03 · What You Need to Know

How Parentheses Control Boolean Search Logic

Start With Concept Groups, Not Punctuation

Parentheses make more sense when you first think about what your terms represent.

Suppose you are searching for research on depression among adolescents. You identify two possible expressions for the population:

  • adolescent
  • teenager

Those terms are alternative ways of representing the same search concept. You want a record to qualify through either expression, so they can be connected with OR:

adolescent OR teenager

Depression is a different concept. If both the population concept and the depression concept need to be represented, the two concepts can then be connected with AND.

Cochrane's current guidance follows this general structure for bibliographic searching: alternative terms within a concept are normally combined with OR, while different concept sets are then combined with AND.

Parentheses make those concept sets explicit.

Parentheses Turn Several Terms Into One Logical Group

The population portion can be grouped:

One Concept Group
(adolescent OR teenager)
The parentheses identify the complete OR expression as one logical unit representing the population concept.
A record can satisfy this group through adolescent, teenager, or both. The entire group can then be combined with another concept.

Now add depression:

Two Concepts
(adolescent OR teenager) AND depression
The first group represents the population. Depression represents a second concept.
A qualifying record must satisfy the depression condition and at least one of the alternatives inside the population group.

This is the practical purpose of parentheses: they preserve the relationship among terms when several Boolean operations appear in one expression.

Without Parentheses, Operator Precedence Can Change the Meaning

Databases need rules for deciding which operation to evaluate first when several Boolean operators appear together. These rules are commonly described as operator precedence or order of operations.

Consider again:

adolescent OR teenager AND depression

If the search system evaluates AND before OR, the expression is effectively interpreted as:

adolescent OR (teenager AND depression)

That is not the same as:

(adolescent OR teenager) AND depression

adolescent OR (teenager AND depression) A record can qualify merely through adolescent, even if it does not satisfy the depression condition.
(adolescent OR teenager) AND depression A record must satisfy depression and must also satisfy at least one of the two population alternatives.

The same words are present, but the logical requirement is different.

Parentheses Are the Boolean Equivalent of Showing Your Work

You may remember parentheses from arithmetic:

(2 + 3) × 4

is different from an expression in which the operations are evaluated in another order. Boolean searching uses the same basic idea. Parentheses explicitly tell the system which operation belongs together.

This analogy is useful, but the database is not performing arithmetic. It is combining sets of records.

If A represents records containing one search expression and B represents another, parentheses define which sets should first be combined before the resulting set participates in the next Boolean operation.

OR Groups Usually Represent Alternative Routes to One Concept

Parentheses become particularly useful once you have developed several synonyms, spelling variants, acronyms, subject headings, or other expressions for a concept.

Suppose your topic involves online learning. You identify:

  • online learning
  • e-learning
  • online education
  • web-based learning

A concept group might be represented as:

Concept Block
("online learning" OR e-learning OR "online education" OR "web-based learning")
Each expression provides an alternative route to the online-learning concept.
The parentheses allow the complete set of alternatives to function as one unit when another concept is added.

The quality of the group still depends on whether those terms genuinely belong together. Parentheses cannot repair poor terminology. They simply preserve the logic you specify.

Different Concept Groups Are Commonly Connected With AND

Suppose you also have a population concept:

("university students" OR "college students" OR undergraduate*)

The two concept groups can then be connected:

Complete Boolean Structure
("online learning" OR e-learning OR "online education" OR "web-based learning") AND ("university students" OR "college students" OR undergraduate*)
The first group represents alternative expressions for online learning. The second represents alternative expressions for the student population.
A record must satisfy both concept groups, but it can satisfy each group through any appropriate alternative within that group.

This concept-block structure is widely used in systematic searching. Cochrane recommends building controlled-vocabulary terms, text words, synonyms, and related terms for each concept, normally combining terms within the concept using OR and then combining the concept sets using AND.

Parentheses Do Not Change What AND and OR Mean

Parentheses are sometimes described as though they were another Boolean operator. They are not.

AND still requires the connected search sets to intersect. OR still allows alternatives. NOT still excludes a set. Parentheses control which expressions those operators act on.

If the underlying distinction is unclear, first understand what AND, OR, and NOT actually do. Parentheses become much easier once you can identify which terms belong within a concept and which operators should connect separate concepts.

One OR Group May Contain More Than Ordinary Keywords

A concept group does not have to consist only of plain-language synonyms.

Depending on the database, one concept might be represented through:

  • a controlled-vocabulary term;
  • a free-text synonym;
  • an acronym;
  • a spelling variant;
  • a phrase;
  • a truncated expression.

For example, a biomedical concept could conceptually take the form:

(MeSH representation OR title/abstract synonym OR abbreviation OR spelling variant)

The syntax will differ by database, but the logic is consistent: several legitimate retrieval routes are grouped before the concept is combined with another requirement.

Parentheses Become More Important as the Number of Concepts Grows

Consider a search involving three concepts:

Concept A (term A1 OR term A2 OR term A3)
Concept B (term B1 OR term B2)
Concept C (term C1 OR term C2 OR term C3 OR term C4)
Combined strategy (term A1 OR term A2 OR term A3) AND (term B1 OR term B2) AND (term C1 OR term C2 OR term C3 OR term C4)

Without grouping, the search becomes difficult for both the database and the researcher to interpret correctly. A misplaced operator can allow one synonym to bypass an entire concept requirement.

Parentheses therefore improve not only execution but also readability and auditability.

Missing One Parenthesis Can Change More Than One Term

Suppose you intend:

(teacher OR educator) AND (burnout OR "occupational stress")

This asks for a record satisfying one teacher-related term and one burnout-related term.

Now imagine writing:

teacher OR educator AND burnout OR "occupational stress"

The expression no longer displays the two intended concept groups. Its interpretation depends on the platform's precedence rules, and terms may combine in ways you did not intend.

This is why parentheses are not merely cosmetic formatting. In a complex Boolean string, they are part of the search logic.

Watch Out

Whenever AND and OR appear together, do not rely on visual reading alone. Group the intended concept blocks explicitly and check that every opening parenthesis has the correct closing parenthesis.

Do Parentheses Matter If the Search Contains Only OR?

Consider:

adolescent OR teenager OR youth

If all operators are OR and all terms belong to one flat group, adding parentheses around the entire expression does not usually change the Boolean meaning:

(adolescent OR teenager OR youth)

The grouping becomes consequential when that expression is connected to another part of the search:

(adolescent OR teenager OR youth) AND depression

The parentheses now make clear that all three population alternatives should be evaluated as one concept before the depression requirement is applied.

Do Parentheses Matter If the Search Contains Only AND?

A flat expression such as:

adolescent AND depression AND intervention

usually does not need parentheses merely to group all three AND conditions because they all represent required intersections.

Again, the need becomes more obvious when another Boolean relationship is introduced:

(adolescent OR teenager) AND depression AND intervention

Now the population alternatives need grouping so that either can satisfy the population concept.

Nested Parentheses Can Represent Logic Inside Logic

More complicated searches sometimes require parentheses inside other parentheses. This is called nesting.

For example, you may have a concept whose alternatives themselves contain Boolean structure:

Nested Logic
(("artificial intelligence" OR AI) AND education) OR "educational artificial intelligence"
The inner parentheses define one alternative set before it is combined with education. The resulting expression is then treated as one side of a larger OR relationship.
Whether this particular conceptual strategy is appropriate would depend on the research question. The example illustrates how nesting can represent multiple levels of Boolean logic.

Nested expressions can be useful, but they become difficult to audit quickly. If the search can be represented more transparently as separate search sets in an advanced-search history, that may be preferable.

Search Histories Can Reduce the Need for One Giant Parenthetical String

Many bibliographic databases allow you to build individual search sets and combine them later.

You might run:

Set 1 online learning
Set 2 e-learning
Set 3 online education
Set 4 #1 OR #2 OR #3
Set 5 university students
Set 6 college students
Set 7 #5 OR #6
Final set #4 AND #7

Logically, this accomplishes the same kind of concept grouping without placing every term into one enormous expression. Cochrane's technical guidance explicitly discusses building search sets concept by concept and combining numbered sets using Boolean operators.

This can make a long search easier to test because each concept can be inspected independently.

Parentheses Do Not Tell You Whether a Concept Should Be in the Search

A beautifully grouped search can still be too restrictive.

Suppose your research question contains population, intervention, comparator, outcome, setting, and study design. It may be tempting to create six elegant parenthetical groups and connect all six with AND.

That can cause relevant records to disappear if some concepts are not consistently represented in searchable metadata.

Cochrane's current guidance warns that searching every aspect of a review question can be unnecessary or undesirable. It recommends starting with the principal concepts needed to retrieve the literature and maintaining sensitivity while striving for reasonable precision.

Parentheses organize the concepts you choose. They do not determine whether those concepts belong in the strategy.

Parentheses Can Expose Conceptual Mistakes

One benefit of writing a search in explicit concept blocks is that questionable terms become easier to see.

Suppose you write:

(online learning OR e-learning OR technology) AND (students OR undergraduates)

The grouping makes an important problem visible: technology is far broader than the other expressions in the first block. It may not be an alternative term for online learning at all.

The search might be syntactically correct but conceptually poor.

This is why the process of determining which terms genuinely represent the same concept remains essential. Parentheses faithfully group whatever you put inside them, including mistakes.

Parentheses Can Work With Phrase Searching and Truncation

Parentheses often contain terms that use other search techniques:

("online learning" OR e-learning OR educat*)

Here, quotation marks may define a phrase, the asterisk may represent truncation according to the platform's syntax, OR connects the alternatives, and parentheses group the entire concept.

Each symbol performs a different function.

Syntax Primary Function
Groups expressions for Boolean evaluation
AND Requires different search sets to intersect
OR Allows alternative search routes
NOT Excludes a search set
" " Commonly controls phrase searching, subject to database rules
* or another truncation symbol Captures word-form variations according to database-specific syntax

If phrase and truncation behavior are unfamiliar, review how phrase searching, truncation, and wildcards work separately. Mixing several operators before understanding each one makes troubleshooting unnecessarily difficult.

Parentheses Can Also Interact With NOT

Suppose you intend to exclude one complete unwanted set:

Concept A NOT (term X OR term Y)

The parentheses specify that the exclusion applies to the combined X-or-Y set.

But correct grouping does not make the exclusion methodologically safe. A relevant record matching either excluded term can still be removed. Because NOT can accidentally remove relevant research, exclusion logic should be tested independently of whether the parentheses are syntactically correct.

Operator Precedence Is Not Something You Should Guess

Search platforms can document their own order of operations, parser behavior, and syntax. Even when a familiar precedence rule applies, relying on an implicit rule makes a complex search harder to read, reproduce, and translate.

For a substantial strategy, explicit grouping is usually preferable whenever ambiguity is possible.

This becomes even more important when moving the strategy to another database. Syntax, fields, proximity operators, truncation, and parser behavior can differ. The broader principle remains the same: do not assume identical search syntax across databases.

Use Result Counts as a Basic Logic Check

Search-set counts can sometimes expose a grouping error.

Suppose:

  • adolescent retrieves 10,000 records;
  • teenager retrieves 6,000;
  • depression retrieves 50,000.

The OR group adolescent OR teenager should normally be at least as large as either individual population set because either term can qualify. When that population group is combined with depression using AND, the final set should ordinarily be no larger than the population OR group or the depression set because records must belong to both.

If a supposedly restrictive final search suddenly becomes dramatically larger than the component sets in a way the logic cannot explain, inspect the parentheses, Boolean operators, query translation, automatic mapping, and field syntax.

Counts do not establish search quality, but impossible-looking arithmetic is often a useful invitation to inspect the query.

Parentheses Make Search Strategies Easier to Review

A search strategy is not only executed by a database. It may also be reviewed by a librarian, information specialist, co-author, peer reviewer, editor, or future researcher attempting to reproduce the work.

Explicit concept grouping makes the intended logic visible:

Within each group These terms are intended as alternative retrieval routes.
Between groups These concepts are intended to be jointly required.
During review A reader can inspect whether terms are in the appropriate group and whether any concept has been accidentally allowed to bypass another.

For systematic reviews, reproducibility matters. Cochrane requires correct use of AND and OR in structuring bibliographic database searches, while its reporting guidance calls for the exact strategy used for each database to be reported so that the methods can be evaluated and replicated.

Parentheses Should Reflect Meaning, Not Just Make the Search Look Tidy

It is possible to add parentheses that are syntactically harmless but conceptually meaningless.

For example:

((((adolescent)))) AND ((((depression))))

The additional nesting does not improve the logic. It merely makes the query harder to read.

Use parentheses to express actual grouping. A well-structured search should allow another researcher to look at the expression and recognize the conceptual architecture without having to count brackets as though proofreading an unusually hostile equation.

04 · A Practical Example

How Can One Pair of Parentheses Change the Results?

Hypothetical Example

Searching for depression among adolescents

Suppose your population concept has two free-text alternatives, adolescent and teenager, and your second concept is depression.

Your intended meaning The record should concern depression and should use either adolescent or teenager.
Group the population (adolescent OR teenager)
Add the second concept (adolescent OR teenager) AND depression
Interpret the logic Every qualifying record must satisfy depression. It must also satisfy at least one population alternative.
Remove the grouping adolescent OR teenager AND depression
Inspect the difference Depending on the database's operator-precedence rules, the ungrouped query may allow adolescent records to qualify without satisfying depression. The search is no longer an explicit representation of the two concept blocks you intended.

The parentheses did not add a keyword or remove one. They changed the logical relationship among the terms.

That is why a search can contain all the correct vocabulary and still retrieve the wrong set of records.

05 · What Researchers Often Get Wrong

Common Mistakes With Parentheses in Database Searches

Misconception

Parentheses Are Only for Making Long Searches Easier to Read

They do improve readability, but their primary function is logical grouping. When AND and OR appear together, parentheses can determine which terms are evaluated as one set before the search is combined with another set.

Misconception

If All the Right Words Are in the Search, the Results Will Be Right

Vocabulary alone is not enough. The same terms connected and grouped differently can represent different Boolean conditions. A search needs both appropriate terminology and appropriate logical structure.

Misconception

I Only Need Parentheses Around Phrases

Quotation marks and parentheses serve different purposes. Quotation marks commonly control phrase searching, while parentheses group Boolean expressions. A phrase can appear inside a parenthetical concept group, but one does not substitute for the other.

Misconception

I Should Put Every Search Term in Its Own Parentheses

Parentheses should represent meaningful groups. Wrapping individual terms unnecessarily does not improve retrieval and can make the strategy harder to audit. Group alternatives or nested expressions when the logic requires it.

Misconception

Correct Parentheses Mean the Search Is Methodologically Correct

A perfectly grouped strategy can still contain poor synonyms, too many concepts, inappropriate exclusions, or overly restrictive fields. Parentheses preserve the logic you specify; they cannot determine whether that logic appropriately represents the research question.

Misconception

I Can Copy the Same Parenthetical Search Into Every Database

The conceptual grouping may transfer, but the surrounding syntax may not. Field codes, phrases, truncation, controlled vocabulary, proximity operators, and parser behavior differ among databases, so the strategy should be translated for each platform.

06 · What This Means for You

When Should You Add Parentheses to a Search?

Think in concept blocks first. Parentheses should make those blocks visible to both the database and the person reading the strategy.

A simple decision framework

If several terms are alternatives for one concept
Combine them appropriately with OR and group the complete set when it will be connected to another Boolean expression.
If the search contains both AND and OR
Use explicit grouping to show which OR terms belong together rather than relying unnecessarily on implicit operator precedence.
If a concept contains its own Boolean logic
Use nested parentheses where necessary, but keep the structure as simple as the intended retrieval logic allows.
If the query contains only one flat series of OR terms
Parentheses around the entire series may not change the meaning until that group is connected to another part of the search.
If the query is becoming difficult to audit
Consider building separate numbered search sets in the database's advanced-search history and combining those sets instead of constructing one enormous nested expression.
If you move the strategy to another database
Preserve the conceptual grouping while verifying the destination platform's Boolean syntax and other search rules.

After grouping the search, read it aloud in ordinary language. For example: "I want any of these online-learning terms, and I also want any of these university-student terms." Then compare that sentence with the Boolean expression.

If the database query does not express the same relationship, revise the grouping before worrying about additional synonyms. One missing parenthesis can undo a surprisingly impressive amount of vocabulary work.

07 · A Quick Checklist

Before Running a Multi-Concept Search, Check the Parentheses

Before finalizing the Boolean structure, check:
Identify the distinct concepts in the search before grouping any terms.
Group alternative terms that genuinely represent the same intended concept.
Check every query containing both AND and OR for ambiguous or unintended grouping.
Make sure each opening parenthesis has the correct closing parenthesis and encloses the intended expression.
Do not confuse parentheses for Boolean grouping with quotation marks used for phrase searching.
Keep nested parentheses only when they represent a genuine additional level of search logic.
Compare result counts and known relevant records before and after major changes to the grouping.
Use numbered search sets when they make a long strategy easier to inspect and troubleshoot.
Verify Boolean and grouping behavior again when translating the search to another database or interface.
08 · Frequently Asked Questions

Frequently Asked Questions About Parentheses in Database Searches

What do parentheses do in a Boolean search?

Parentheses group terms or expressions so that the grouped logic is evaluated together before being combined with other parts of the search. They are particularly useful for preserving concept blocks containing OR alternatives.

When do I need parentheses with AND and OR?

Use them whenever explicit grouping is needed to show which alternatives belong together. A common structure is (synonym A OR synonym B) AND (synonym C OR synonym D), where each parenthetical group represents one concept.

What is wrong with adolescent OR teenager AND depression?

The intended grouping is unclear unless you know and deliberately rely on the platform's precedence rules. If you mean that either population term must occur together with depression, write (adolescent OR teenager) AND depression so that the population alternatives form one explicit group.

Do parentheses make OR terms more precise?

Not by themselves. Parentheses group the alternatives so they interact correctly with the rest of the Boolean expression. Precision and sensitivity still depend on which terms are inside the group and how that group is combined with other concepts.

Are parentheses the same as quotation marks?

No. Parentheses group Boolean expressions. Quotation marks commonly instruct a database to treat words as a phrase, although phrase behavior varies among platforms. You can use a quoted phrase inside a parenthetical group because the two forms of syntax perform different jobs.

Can I put parentheses inside parentheses?

Yes, when the database supports nested Boolean expressions and the search genuinely contains multiple levels of logic. Keep nesting as simple as possible because deeply nested searches are harder to inspect, translate, and troubleshoot.

Do I need parentheses if my search uses only OR?

A flat OR expression generally does not change meaning simply because the entire expression is enclosed in parentheses. Grouping becomes important when that OR set is combined with another expression using AND, NOT, or more complex Boolean logic.

Will the same parentheses work in every research database?

The concept-grouping principle is broadly transferable, but the complete search syntax is database-specific. Field codes, phrases, controlled vocabulary, truncation, proximity operators, and query parsing should be verified when the strategy is translated to another platform.

09 · The Bottom Line

Parentheses Preserve the Structure of Your Search

The Bottom Line

Use parentheses to group terms that should function together, especially OR alternatives representing one concept before that concept is combined with another using AND.

Parentheses do not improve weak terminology or decide which concepts belong in the search. Their job is to make your intended Boolean structure explicit. When a query contains several concepts and operators, correct grouping can be the difference between searching the question you intended and searching something subtly different.

10 · Sources and Further Reading

Authoritative Resources on Boolean Search Structure

11 · Cite this Guide

How to Cite This Guide

This guide is intended to be read, shared, and used in research, teaching, and academic work. If you draw on its ideas, explanations, or other content, please acknowledge the source by citing the guide. Doing so gives appropriate credit and helps your readers locate the original resource.

Has the Field Guide helped your research?

If a guide helped clarify a question, inform a research decision, or move your work forward, I would love to hear about your experience. Your story may also help other researchers discover the Field Guide.

Share Your Experience
Takes only a few minutes