For example, you have the attributes ‘cat’ and ‘dog’: if a person likes cats you’d set the value of that attribute to ‘yes’, and if they did not you’d set the value to ‘no’, and the same goes for dogs.
If you used an operator of AND, saying that
cat = yes AND dog = yes you’d be specifying records that matched people who like cats and also like dogs, but not people who only like cats or only like dogs – they must like both types of pet.
If instead you used an operator of OR, saying
cat = yes OR dog = yes you’d be specifying records where people like cats or people like dogs, which includes people who:
- like both cats and dogs,
- people who only like cats,
- and people who only like dogs.
|& (AND)||cat = yes & dog = yes||People who like cats AND like dogs|
|| (OR)||cat = yes | dog = yes||People who like cats OR dogs including:
|~ (NOT)||cat = yes ~ dog = yes||People who like cats but do not like dogs|
|^ (XOR)||cat = yes ^ dog = yes||People who: