Ad-Hoc Database Queries