cleaned source code; TimeSeriesDatabase query interface for base
aggregated data and for raw data