Create DatabaseFunctions.java

Prototype, completely untested.