Database worker