6.8 – Boolean Operators
Learning Objectives
This chapter shows you how to
- apply Boolean operators (and, or, not) to help you narrow your search results
Boolean Operators – And, Or, & Not
Databases and search engines use Boolean logic. Named after mathematician George Boole (1815-1864), Boolean logic is the key to successful database searching. By using the Boolean operators AND, OR, and NOT (sometimes expressed as AND NOT) between search words, a researcher can focus or broaden a search query to create sets of results. The operators are normally expressed in uppercase letters so as not to confuse them with the words used as non-operators.
When you see a simple search box and type in words, the search engine generally inserts the AND operator between every word. By using an advanced search option, you are encouraged to think about the way you want to focus your search.
Watch Chapter 8 Video 3 about Boolean searches on YouTube (3 mins)
Video source: Ryerson University DMP. (2018, July 10). Chapter 8 video 3 [Video]. YouTube. https://www.youtube.com/watch?v=lro7vTLiwn4
The And Operator
The operator AND is used to narrow or focus a search by finding a subset of results containing all of the keywords or search terms. For simplicity, the example depicted by the Venn diagram that follows contains only two key concepts and no synonyms or related terms. On the left, the pinkish-coloured circle labelled graphic novels represents the hits (articles, books etcetera in the database) that contain the words graphic novels. A second, yellowish-coloured circle on the right, represents all of the hits that contain the word teaching. The two sets of searches overlap since a small number of the hits contain both graphic novels AND teaching. This subset is shown in the diagram in the orange portion where the two circles or sets overlap. It is labelled AND because it represents the portion of the hits from the two concepts that contain both the first AND the second concept. The AND operator is the most commonly used Boolean operator.
Example Venn diagram using the AND operator: graphic novels AND teaching
If you decide that you still have too many results when you searched for only two concepts, you can refine your search by adding a third distinct concept. This will narrow your results considerably because it is more precise. The following Venn diagram demonstrates what happens when you modify the search used in the previous example by adding a third keyword: Shakespeare. [Note that most databases allow both upper and lower case when searching for proper names.]
In this example the set of hits dealing with Shakespeare are represented by the blue-coloured circle shown beneath the pinkish circle representing graphic novels and the yellowish circle representing teaching. All three circles overlap to some extent since one, two, or all three keywords may be applied to the same articles, books etcetera in the database. In this example, the small, almost triangular-shaped orange patch labelled AND in the centre of the diagram represents the relatively small subset of hits that contain all three concepts: graphic novels AND teaching AND shakespeare.
Example of a Venn diagram using the AND operator and three distinct concepts: graphic novels AND teaching AND shakespeare
The OR Operator
The operator OR is used to broaden a search by combining two or more variables into one set. The operator OR is used to combine synonyms and variant spellings (e.g. theatre OR theater) of a word into one search. Any one of the search terms must be present. More than one can be present.
A Venn diagram (also known as a set diagram) can visually display how a database’s search engine handles search terms and the Boolean operators. Each term is searched separately and all of the relevant hits (articles, books etcetera identified in the database as containing that term) are grouped into separate sets, one set per term as represented by each circle. In the diagram that follows, three different related terms are being searched: comics shown by the circle in the upper left, graphic novels shown by the circle in the upper right, with manga shown by the circle at the bottom of the diagram. Some of the hits also contain one or both of the other search terms and this is represented by the overlapping of the circles. In the example, since the OR operator is being used, the search finds all of the hits containing any of terms and combines them all into one large pool of results. Because all of the results in all three sets are included, they are all represented using the same blue colour.
To reiterate, by broadening a search using the OR operator, the results of a search can be much larger and more comprehensive than a set of results from a search that does not make use of related terms, synonyms, and, variant spellings joined with the OR operator.
Example Venn diagram using the OR operator: comics OR graphic novels OR manga
The NOT Operator
The operator NOT is used when you want to search for the first term and to exclude items that contain the second term. Teaching is a very broad term that is often qualified by broad levels such as primary, elementary, intermediate, secondary, higher, or, post-secondary. While you may want to specify a level that you want to look for by trying a search such as teaching AND secondary, you could decide to qualify or narrow the search by excluding a level that you are not interested in by using the NOT operator. The following Venn diagram illustrates the concept teaching as shown by the circle in green on the left. The concept post-secondary is shown by the light grey-coloured circle on the right.. While there is some overlap with both concepts shared by some articles and books, when you use the NOT operator in the example of teaching NOT post-secondary, you exclude those hits that had both teaching AND post-secondary (not shown). That is why the desired set on teaching resembles a circle with a piece removed. [Remember that the NOT operator is sometimes called ANDNOT. The Help information in a database will give you directions if you can simply use NOT or have to use ANDNOT as your Boolean operator.]
Example of a Venn diagram using the NOT operator: teaching NOT post-secondary
Your Turn!
Activity
Revise your key concepts using AND and OR Boolean operators. Nest synonyms within parentheses.
The following is a sample search result for an article in an online journal:
Example
How graphic novels support reading comprehension strategy development in children
by Brenna, Beverley
Literacy, 07/2013, Volume 47, Issue 2
…. The primary research questions related to children’s applications of metacognitive reading comprehension strategies as well as the potential for graphic novels to support the students…
Journal Article: Full Text Online
More Information
Related Articles
- The first element is the title of the article, “How graphic novels … in children”
- The second element is the name of the author in inverted order (last name, first name)
- The third element is the source, in this case a journal called Literacy. More specifically, it is volume 47, issue 2, of the journal that was published in July 2013. When you cite a source like this, you must include some or possibly all of the information about the source, depending upon the requirements of the citation style that you are using in your paper (MLA, APA, Chicago).
- The fourth element is a brief excerpt from the content of the text, such as part of the abstract or a summary of what the article is about.
- The fifth element tells you the type of source, in this case a journal article that is available in full text online.
- If you have a More information element, it may show you more information about the resource, including page numbers, DOI (Digital Object Identifier—like a URL that is unique for this article, but more permanent), and keywords used to describe the content of the article.
The next sample search result is for a book published in electronic format:
Example
Graphic novels and comics in the classroom: essays on the educational power of sequential art
by Syma, Carrye Kay; Weiner, Robert G; Smith, Robert V; More…
2013
- I. Significance of graphic novels and comics: then and now. Using comics to teach the language arts in the 1940s and 1950s / Carol L…
eBook: Full Text Online
- The first element is the title of the book, including both the title proper, and following the colon, the subtitle of the book.
- The second element is a complete list of authors or creators displayed by last name, first name and middle initial, with individual creators separated by semi-colons. The presence of the More option indicates that one or more names are omitted from the display. (Note that it is unclear what roles these creators played. Are they editors, contributing editors, authors of a part of the book, or illustrators? Viewing the cover image or possibly the title page and table of contents may be necessary to clarify the roles of the named creators. It may not be necessary to name all of them depending on your chosen citation style.)
- The third element is the year of publication, 2013.
- The fourth element is a note about the book that in this case contains the beginnings of the list of contents, starting with part 1.
- The fifth element tells you the format i.e. this is an ebook that is available in full-text online.
In order to cite this work properly, you may need more information than what is shown. For example, the name of the publisher is required by most citation styles. If your search engine includes a citation tool, you may find suggested ways to cite this work. Remember that the suggested citation may contain errors and you should carefully verify the information that it provides.
Attributions & References
Except where otherwise noted, this chapter is adapted from “Chapter 8: Gathering Research and Establishing Evidence” In Write Here, Right Now: An Interactive Introduction to Academic Writing and Research by Aaron Tucker and Paul Chafe, Ryerson University, licensed under CC BY 4.0. The section on Boolean Operators has been condensed & reused in this text, adaptations include small updates for accessibility and CC licensing.