JavaBitcoin is a full node (no mining support) which uses either LevelDB or H2 for the database. LevelDB is a mapped database while H2 is a SQL database. Note that LevelDB is much faster than any of the SQL databases that I have tried (H2, Firebird, PostgreSQL), especially when deleting rows. I went with H2 because it is a small embedded database manager compared to Firebird or PostgreSQL. If you want to use another SQL database, you will need to tweak some of the database definitions to handle the differences in data type definitions.
If you decide to use a SQL database, it is best to first download the blockchain using the LevelDB database and then migrate the LevelDB database to the H2 database (JavaBitcoin will do this for you). The actual blocks are stored in external files in the same format as Bitcoin-QT (JavaBitcoin will import the block chain from the Bitcoin-QT blocks directory if available).
You can browse the source code on GitHub (
https://github.com/ScripterRon/JavaBitcoin). It requires Java 8 since I'm using some of the new features in the latest version.