The Basics of Boolean Logic

To search a database, you need to use a system of combining sets based on an algebraic system developed by nineteenth-century British mathematician George Boole.  This system of logic has three important functions: inclusion, exclusion, and combination.  Inclusive operations are represented by the code word OR.  Exclusive operations are represented by the code word NOT.  Combining operations are represented by the code word AND.

In order to search, you have to specifically tell the computer what you want and in what combination you it to perform its retrieval.

To understand this concept, we'll perform the following exercise using AND, OR and NOT.

Kaiser's merchant ships in World War I

Liberty : the ships that won the war

Ships and seafaring in ancient times

The Great ships pass : British battleships at war, 1939-1945

The Silent war : the Cold War battle beneath the sea

How could you combine two words to find all the records in the database?

What if you were interested only in the relationship between ships and war? How would you write the search statement?  What records would you retrieve?

How could you write a search statement that included every record with the word war, but excluded every record with the word ships?

 

Parts of a database record in a periodical index

data  base

 

 Return to Syllabus

Curt Asher                                                                                                          Copyright California State University Bakersfield, 2006