As Jeanne mentioned, the JDBC is a good way to deal with databases. I use JDBC to perform all sorts of operations on a MySQL database without much trouble. Since you're storing a file, you could simple open a stream to the file like normal and read it directly into a String, for example, and save the String into a BLOB.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com