Emacs has lots of different database code.
See SQL for information on how to use SQL databases from Emacs, as well as: