database interaction in games controller