The principle of Boolean logic lets you organize concepts together in sets. When searching computer databases, including keyword searching of the online catalog, these sets are controlled by use of Boolean operators OR, AND, and NOT.
But forget about libraries and computers for a moment and think about ice cream. Imagine all the possibilities a soft ice-cream machine could make if it offered chocolate, strawberry, and vanilla, and could mix together any and all combinations of those flavors. There are seven possible combinations of ice cream flavors available: each flavor by itself, three combinations of two flavors in a swirl, plus all three flavors mixed together.
In Boolean logic terms, a set that included any of these flavor combinations would be expressed:
strawberry OR vanilla OR chocolate.The Venn diagram for this combination would look like this:
In database searching OR expands a search by broadening the set. It is often used to combine synonyms or like concepts. If you were interested in searching an online database for information about teenagers, to be more comprehensive you might use the set:
adolescents OR adolescence OR teens OR teenagers OR young adults
This search statement would retrieve records that mention any of those terms. Think of OR as either or. The OR operator, however, doesn't have to group together synonyms. You could also search a database for "infants OR children OR adolescents."
If you don't wish to try every possible flavor combination the soft ice cream machine offers all at once, you can narrow your selection. You might want to choose an individual flavor or one combination of flavors. To order a swirl of all three flavors combined, chocolate, vanilla, and strawberry all must be included.
In terms of Boolean logic, a set that includes all of three elements would be expressed as:
strawberry AND vanilla AND chocolate.The Venn diagram for this combination would look like this:
In database searching AND narrows a search. It is often used for linking together different concepts. Searching a database with the search statement college students AND behavior would retrieve records only if both the phrase "college students" and the word "behavior" appear. Think of AND as only if also.
When you order ice cream, if you do NOT want chocolate, that would leave you with only three possibilities, strawberry by itself, vanilla by itself, or a swirl of strawberry and vanilla. In other words, you're subtracting a concept out of it. The resulting set would be
(strawberry OR vanilla ) NOT chocolateThe Venn diagram for this combination would look like this:
In database searching, NOT is used to get rid of an unwanted concept. If you were interested in studying college students but not high school students, you could create a set college students NOT high school.
Keep in mind that NOT should be used sparingly, perhaps not at all, since it often brings about unintended results. If you were interested in research on college students but not on research of high school students, you could add the concept NOT high school to your search statement. That would eliminate many records that are only about high school students, but it would also eliminate records that deal with both college students and high school students, such as this one: "College students are better prepared than students in boarding high schools to deal with the challenges of living away from home."
You can combine sets in a variety of ways using the different combinations of Boolean operators. When writing out the sets, parentheses are important because they keep the logic straight. In the grouping (high school students OR college students) AND (behavior OR motivation) AND (drugs OR alcohol) the parenthesis around first set tells the database to create a final set of records that may include either of the phrases high school students OR college students, but only when the records also include either of the words behavior OR motivation plus only if in addition either of the words drugs OR alcohol appear.
BEYOND BOOLEAN (TRUNCATION AND WILD CARDS)
In addition to using Boolean operators, for good searches, it may be necessary to use truncation and wildcard characters to expand or control searches.
Truncation is a searchable shortened form of a word. This means you can take short cuts. Instead of writing out adolescents OR adolescence, you can use the truncated term adolescen*. Unfortunately, databases are not consistent with truncation symbols, so in one you might have to use adolescen*, but in another adolescen?, and in yet another, just adolescen (if truncation is automatic). Many databases are smart enough to pick up regular plurals without adding truncation, such as school retrieving both school and schools, but not all do, and they would be even less likely to be designed so that child would retrieve both child and children, without also retrieving childbirth, childhood, and childishness.
Wild card characters are useful because of alternate spellings and other quirks in the English language. Just as British and Canadian ice cream comes in flavours, not flavors, a British or Canadian study of college students may use the term behaviour, instead of behavior. Searching with a wild card can help. With the term behavio?r, both behaviour and behavior may be searched together. The most common use of wild cards is because of women. Wom*n should pick up both women and woman. Once again, because databases are not consistent with the characters they use, as the examples indicate, you will have to use different wildcard characters in different databases. It is best to check the help screens to see the exact symbols and rules.