How to export Calibre's library for Database Support?
Calibre is based around a SQLite database so you can do SQL work including adding tables on it directly - I think calibre only creates extra tables with books_ or custom_ as a prefix so your own tables would not be affected by it.

Extra fields can be added which appear in the GUI to be extra fields in the Book table but are actually each in tables with a 1-1 mapping to the Books table

To extract data any sql tool can be used including the command line sqlite which Apple includes in OS X . 

There are plugins like Multi Column search that allow more complex searches to be done.