Decouple TimeSeriesDefinition from database