Change database interface to use a connection pool