Although SQL and Prolog demonstrate first-order logical concepts, none of them are a complete version of the predicate calculus .
Prolog and other logical programming languages are highly dependent on recursion, both for defining data structures and for predicates.
SQL itself does not allow recursion, and the introduction of stored procedures is performed with restrictions on the depth of nesting of such calls. For example. SQL Server 2000 until 2012 allows a maximum of 32 nested calls .
In relational databases, “relationships” are repeated as tables (or more flexibly, as representations). The most similar aspect of Prolog is the dynamic facts, which in some implementations (SWI, Amzi) allow indexing of performance, very similar to indexing relational tables for performance in SQL.
Although SQL RDBMSs are designed to work with large amounts of data efficiently than the Prolog implementation usually requires, Prolog can at least be used to prototype both the database and aspects of the system design process.
See here for the 2005 thesis , which explores the expansion of relational databases using Prolog output.
hardmath
source share