Re-implement database connection.