Implemented DatabaseWorker.