Database worker thread implementation
Handles database operations in a dedicated thread with connection pooling.