Combining terms with Boolean Operators (AND, OR, NOT)
Boolean Operators are specific words used to combine concepts or keywords to improve the chances of finding relevant information. The most commonly used Boolean Operators are AND, OR, and NOT.
- Using AND narrows the search and decreases the number of results
- Using OR searches a broader range of keywords and increases the number of results
- Using NOT excludes information not required and reduces the number of results
Brackets are used to define the order in which the concepts are processed. Use brackets when using Boolean Operators such as ‘(art AND therapy) NOT children’ so that the database will only look for articles about art and therapy but exclude those that mention children.
Boolean Operator | Purpose | Example | Result |
---|---|---|---|
AND | Combine keywords that reflect different concepts | art AND therapy | Each search result will contain both the terms art and therapy |
OR | Combine keywords that reflect similar concepts | art OR therapy | Each search result will contain either (or both) of the terms art or therapy |
NOT | Exclude a keyword | (art AND therapy) NOT children | Each search result will contain both the terms art and therapy but only if they do not contain the third term children |
Now test your understanding in the next example by identifying how the results would appear and then clicking on the answer symbol to check your answer.
Boolean Operator | Purpose | Example | Result |
---|---|---|---|
AND | Combine keywords that reflect different concepts | ‘falls AND aged’ | Each search result will contain both the terms falls AND aged |
OR | Combine keywords that reflect similar concepts | ‘falls OR aged’ | Each search result will contain either (or both) of the terms falls OR aged |
NOT | Exclude a keyword | ‘(falls AND aged) NOT home’ | Each search result will contain both the terms falls AND aged but only if they do NOT contain the third term home |
Boolean Operators and combining concepts
Boolean logic uses the terms AND, OR and NOT to combine concepts. Ithaca College Library in the US uses ice cream to illustrate how Boolean Operators work [7] .
In database searching ‘OR’ expands a search by broadening the set. It is often used to combine synonyms or like concepts.
Strawberry OR chocolate OR vanilla = an ice cream lover with global tastes
e.g. A textword search for information about teenagers should include the words most commonly used: adolescents OR adolescence OR teens OR teenagers OR young adults
In database searching ‘AND’ narrows a search. It is often used for linking together different concepts.
Strawberry AND chocolate AND vanilla = an ice cream lover who only eats ice cream which combines 3 flavours at the same time (i.e. Neapolitan ripple).
e.g. The following statement, students AND behavior will only retrieve records in which the words ‘students’ and ‘behavior’ appear in the same document.
In database searching, ‘NOT’ is used to get rid of an unwanted concept.
(Strawberry OR vanilla) NOT chocolate = an ice cream lover allergic to chocolate.
e.g. If you were interested in information on university students but not high school students, you could search (university students) NOT (high school).
But BEWARE! – this will exclude articles which discuss both types of students.
Combining operators
You can combine sets in a variety of ways using combinations of Boolean Operators. When writing out the sets, parentheses are important because they define the order in which the concepts are processed in the same way as brackets and parentheses are used in mathematical equations. ‘AND’ takes priority and is processed first - unless you use brackets to group concepts. Look at the examples below.
e.g. To find information on the incidence of salmonella food poisoning caused by hamburgers, with or without eggs:
- salmonella AND hamburgers AND eggs = food poisoning caused by both
- (hamburgers OR eggs) AND salmonella = food poisoning caused by either
- hamburgers OR eggs AND salmonella = food poisoning caused by eggs, as well as hamburgers which have salmonella and which don’t (the ‘AND’ is processed first).
- (hamburgers AND salmonella) NOT eggs = only food poisoning caused by hamburgers, removing the confounding effect of having eggs at the same time
The intersection of the circles indicates women who have breast cancer and who also smoke:
women AND breast cancer AND smoking
To find the women who have breast cancer but who don’t smoke, the search statement would be:
(women AND breast cancer) NOT smokers
This describes the intersection between the blue and pink circles excluding the overlap with the yellow circle.
Be careful using 'NOT' - it is very easy to exclude information which is relevant.
Additional material
Download a PowerPoint presentation on Boolean Operators and how to use them. This may be useful for teaching sessions on building a search strategy.