For something like this you could use SQLite and the relevant JDBC driver. Here'e a tutorial which will help http://www.tutorialspoint.com/sqlite/sqlite_java.htm
SQLite allows you to create a local database on the file system, so you won't need a database server to host it.