Maybe starting from a sugar, we can add some improvements gradually. Currently, I think making timeseries creation easier should be enough. Please share if you have some fancy ideas that can go with the introduction of "device".
Tian Jiang At 2019-08-14 10:44:14, "Xiangdong Huang" <[email protected]> wrote: >Hi, > >Looks fine for me. > >One question, is it just a language syntax sugar, or we can as well as >improve the schema management? Any idea? > >Best, >----------------------------------- >Xiangdong Huang >School of Software, Tsinghua University > > 黄向东 >清华大学 软件学院 > > >Tian Jiang <[email protected]> 于2019年8月14日周三 上午10:37写道: > >> Greetings, >> >> >> In the present version, it is a little trouble some to create a set >> timeseries that has the same measurements. On the other hand, although we >> use the conception "device" in the code, it is not properly abstracted. >> >> Expected usage: >> >> Using IoTDB in a more relational way: >> >> CREATE DEVICE TEMPLATE vehicle (speed DOUBLE PLAIN, direction DOUBLE >> PLAIN, temperature DOUBLE PLAIN, fuel DOUBLE PLAIN) >> >> If all datatypes(or encodings) are the same, you can write the equal form: >> >> CREATE DEVICE TEMPLATE vehicle MEASUREMENTS (speed, direction, >> temperature, fuel) DATATYPE DOUBLE ENCODING PLAIN >> >> Then you will be able to create time series in an easier way: >> >> CREATE DEVICE (vehicle) root.sg1.vehicle1 >> >> Which equals: >> >> CREATE TIMESERIES root.sg1.vehicle1.speed WITH >> DATATYPE=DOUBLE,ENCODING=PLAIN >> >> CREATE TIMESERIES root.sg1.vehicle1.direction WITH >> DATATYPE=DOUBLE,ENCODING=PLAIN >> >> CREATE TIMESERIES root.sg1.vehicle1.fuel WITH >> DATATYPE=DOUBLE,ENCODING=PLAIN >> >> CREATE TIMESERIES root.sg1.vehicle1.temperature WITH >> DATATYPE=DOUBLE,ENCODING=PLAIN >> >> I hope this will narrow the gap between using IoTDB and traditional >> relation databases. >> Jira link: >> https://issues.apache.org/jira/projects/IOTDB/issues/IOTDB-163?filter=allopenissues >> >> >> Tian Jiang
