Optimization Issues of Querying and Evolving Sensor and Stream Databases