LOCAL DB. Ancestor(x, y) <- Parent(x, y). Ancestor(x, y) <- Parent(x, z) & Ancestor(z, y). Parent(x, y) <- Mother(x, y). Parent(x, y) <- Father(x, y). Father(Fred, Mary). Father(George, James). Mother(Sue, Mary). Mother(James, Sue).