Boolean Searching

Database searching is based on the principles of Boolean logic. Boolean logic refers to the logical relationship among search terms, and is named for the British-born Irish mathematician, George Boole.

Boolean logic is essentially very simple. When used in constructing a search expression, it can be very helpful in specifying exactly what information you want.

The basis of Boolean logic can be illustrated by the following diagrams:

Boolean 'AND'

Boolean And

This is expressed as 'blue AND yellow' in a search.

When using AND in this search expression, results retrieved will contain both blue and yellow information. The results will not include those documents containing only blue or only yellow information. In the diagram, the documents retrieved by using this search expression are contained within the green area.

Example: art AND schools
This will retrieve all records containing both keywords 'art' and 'schools'.

Boolean 'OR'

Boolean Or

This is expressed as 'blue OR yellow' in a search.

When using OR in this search expression, results retrieved will contain either blue information, or yellow information, or blue and yellow information together. Such a search will not retrieve documents containing only blue information or only yellow information. In the diagram, the documents retrieved by using this search expression are contained within all the color areas.

Example: ceramics OR pottery
This will retrieve all records containing the keywords 'ceramics' or 'pottery', as well as those containing both.

Boolean 'NOT'

Boolean Not

This is expressed as 'blue NOT yellow' in a search.

When using NOT in this search expression, results will contain only blue. The NOT operator will exclude yellow completely, and thus, any green information will be excluded, as well. It is important to be careful when using this operator in order to avoid hindering your search. In this diagram, the documents retrieved by using this search expression are contained within the blue area.

Example: film NOT photography
This will retrieve all records containing the keyword 'film', but not the keyword 'photography'.