GENED 300
SELF-TEST: BOOLEAN OPERATORS



Look at the database below. It consists of six records describing six people:
Willy, Marilyn, Sara, John, Bob, and Squirt. Can you identify the seven fields
within the database?You will use the chart to answer the five BOOLEAN
queries.


AND joins descriptions and narrows the results
OR
joins descriptions and broadens the results
AND NOT
joins descriptions and narrows the results
(..................)
Parenthesis are used to group phrases and are accompanied by additional Boolean phrases




FIELDS RECORDS
             
IDENTITY
WILLY

MARILYN

SARA

JOHN

BOB

SQUIRT
FLAVOR chocolate vanilla vanilla cherry chocolate vanilla
PRODIGENY no children 1 son son and daughter 2 daughters no children 2 sons, 1 daughter
LOCALE Midwest South New England South West Midwest
PETS 2 cats 1 bird 1 bird, 2 dogs no pets 5 gerbils no pets
WORK unemployed works half-time works fulltime unemployed works fulltime works half-time
AGE 20 years old 30 years old 40 years old 30 years old 25 years old 30 years old
             
             

 

1. Who likes chocolate AND is employed?
Bob and Willy
Squirt and Marilyn
Bob
Sara and Marilyn
Willy and Sara

2. (Lives in the South OR Lives in the Midwest) AND NOT owns pet AND unemployed
Willy and John
Squirt
Sara and Willy
John
no one

3. (30 years old AND likes chocolate) OR (employed AND lives in South)
John, Willy, and Squirt
Bob
Marilyn
Sara
Sara and Bob

4. (Likes chocolate OR Likes cherry) AND NOT owns pet AND lives in New England
Willy and Sara
Squirt and John
John
Marilyn
empty set

5. (30 years old OR lives in West) AND (likes chocolate OR likes vanilla)
Marilyn and Bob
Squirt and Bob
Marilyn and Squirt and Sara
Marilyn and Bob and Squirt
none of the above

Score =
Correct answers: