begin database work