Establishing Base Queries and Updating Them On-The-Fly