... Access your DBMS from Erlang without any line of SQL code
...

AMNESIA is an Erlang library providing an abstraction layer for
interfacing
relational DBMSs. The basic objective is to allow designers to integrate
relational database support in Erlang programs using Erlang-native types
and language constructs and thus without needing to manage SQL statements
and DMBS-specific peculiarities. The main characteristics are
following:

Easy specification of the structure of a database (tables and links) by
means of Erlang-native types and functions.

Direct creation of the tables starting from their Erlang
specification.

Direct use of Erlang records to handle database data.

Simple functions for database accessing and data handling.

Support for all relational operations (insert, select, join, etc.)
by means of proper Erlang functions.

AMNESIA is structured by means of a layered architecture.

The amnesia module is at the topmost layer and provides the main
high-level functions for database access. Then, on the basis of the DBMS
chosen for the specific database implemented, the amnesia module contacts
the proper amnesia_driver; the latter acts as a bridge between the
amnesia layer and the bottom layer (dbms_layer), which provides the
real interface to the specific DBMS selected.

Currently AMNESIA supports only MySQL, but a driver for PostgreSQL is
under development.