Deductive databases intellectualize relational databases by providing
complex inference ability and they are competitive with current commer
cial relational databases. The deductive database system presented in
this paper is a unified logic/database system where programs may be ex
pressed declaratively, in a form close to first-order logic, and at th
e same time efficiently access very large data bases. The implementati
on is based on a logic-based language compilation. A Prolog-like progr
am is translated into Warren Abstract Machine (WAM) instructions by a
compiler, and the resulting WAM code is executed by an emulator. The i
nference engine and the relational database are tightly coupled, i.e.
external records are retrieved from the underlying database and unifie
d with Prolog-like terms as and when required. The tight coupling of a
logic-based language and a relational DBMS achieved a satisfactory pe
rformance.