Database Languages for Sensor Networks