Branching Databases.
Cow Horse Pig Sheep We are going to sort a set of animals using a branching database. (Pretend you do not know their names)
Sort the objects into 2 groups with a clear yes/no question. Cow HorsePigSheep Does the animal have horns? YesNo
Sort the objects again using a simple yes/no question. Cow Sheep Is the animal covered in wool? YesNo
Do the same with the remaining objects. HorsePig Does the animal have a curly tail? YesNo
You have now created a simple branching database. Is the animal covered in wool? Does the animal have a curly tail? Does the animal have horns? Yes No Cow Horse Pig Sheep