Just code to go through DB reading/writing in Java