Added query strings to the DB
Added support for query terms