factory class for TimeSeriesDatabase