SingleDatabase threading