Create and drop functions for databases
