An engine is an object that performs a well-defined service against a collection of data. A database engine typically scans data in files stored in a proprietary format. A logic engine typically must be fed data in the form of facts, and it retrieves data by matching query structures against the facts. This matching, or unification, provides a basic ability to see whether two structures can match, potentially unifying variables and values in the structures. A logic engine also provides the ability to model rules, which are a sequence of structures in which the truth of the latter structures can confirm the truth of the first structure. In addition to these basic abilities , a well-rounded logic engine needs a provision for handling arithmetic, evaluations, comparisons, negation, and lists. A query language might ignore some these facilities, but a logic programming language such as Prolog or Logikus puts these features to work.
Chapters 13 and 14 show that a logic engine can power both logic languages and query languages. Query languages use the engine's matching ability to check whether a table row matches a SQL "where" clause. A logic language is essentially a facade, a thin veneer over the engine itself.