Prolog and databases
We have seen that a Prolog program consists of a collection of clauses, which are classified as either unit clauses or general clauses. A database system consists of a schema and a number of relations, together with a query language based on the relational algebra. The query language supports at least the relational operations select, project and join, as well as the set-theoretic operation union. In this chapter, we examine the relationship between the two systems.