java app to interact with database