string based QueryDatabase