Prolog & SQL
Every predicate dose not correspond to one schema
Each predicate corresponds to
a part of schema or the combination of schemata
- give the predicate-schema transformation rule
predicate-schema transformation rule
class(A,B):- animals(A,B,_,_,_,_,_,_).
milk(A):- animals(A,_,_,_,yes,_,_,_).
milk_Leg(A):- animals(A,_,_,_,yes,_,_,_),
animals(A,_,_,L,_,_,_,_), Lɬ.