An Analytical Model for IEEE802.11 Networks Running Query-Based Applications