Add QueryManager for supporting database queries