You don't need SQL if you have Prolog. Prolog itself can store and retrieve all your data, except that data is also your program at the same time.
For instance, see:
Can I replace a LAMP stack with SWI-Prolog?
For instance, see:
Can I replace a LAMP stack with SWI-Prolog?
And, since those are not usual goals of an interpreter, I would guess "not very competent" for at least the first two with high certainty.
It also raises the question of whether Postgres has a good Prolog plugin. This one looks more likely to be useful.
<table_name>(<column 1, row 1>, <column 2, row 1>, ...., <column n, row 1> )
...
<table_name>(<column 1, row m>, <column 2, row m>, ...., <column n, row m> )
So each table becomes a predicate with the table name as its predicate symbol ("functor" in Prolog), the number of the columns in the table as its arity (the number of arguments of the predicate) and where each row of the table is a separate clause of the predicate.Many tables exported this way will not be necessary any more, particularly those ubiquitous tables used to map other tables' keys between them ("Customer_ID_Ticket_Id" etc) and in most cases primary key fields will no longer be necessary and so on- but you can move all your data to Prolog, with very little change, is what I'm trying to say.
Mer' Christmas :)