You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@iotdb.apache.org by 周钰坤 <zy...@gmail.com> on 2022/11/18 07:44:05 UTC

Add constraint to the length of database name

Hi,

    We want to add constraint to the length of database name, as most
popular database systems have such constraint as well, for example the
length of database name in Mysql shall not exceed 64. Currently, the
maximum length of database name, including "root.",  is *64* and it is
immutable. Such constraint can help avoid some bugs of database and region
management, since we use database names in the directory name, which shall
not exceed the max name length defined by file system.

best regards
------------------------
Yukun Zhou, Tsinghua University

Re: 回复: Add constraint to the length of database name

Posted by Jialin Qiao <qi...@apache.org>.
Hi,

+1 for omitting "root", but may be in 1.x version.

Thanks,
—————————————————
Jialin Qiao
Apache IoTDB PMC

Chao Wang <cc...@163.com> 于2022年11月18日周五 21:26写道:


>
> It's OK to use 64 bytes as the sg name, but root should not be included. That is, root. xxxx should be xxxx with a length of no more than 64, not xxxx with a length of no more than 60.
>
>
>
>
> Then I raised another question, which can be discussed next time.
>
>
>
>
> I think root is only useful for joining all sgs. In other scenarios, root is not necessary. We should try to shield the root prefix for users, because it is unnecessary to always input these characters.
>
>
>
>
> Thanks!
>
>
> Chao Wang
> BONC ltd
> ccgowork@163.com
> 在2022年11月18日 19:58,周钰坤<zy...@gmail.com> 写道:
> We support suffix path, which will be concat to the prefix path in "from
> clause", and full path, starting with "root",   in "where" clause. The
> "root" is a identifier for us to recognize which is a full path.
>
> Chao Wang <cc...@163.com> 于2022年11月18日周五 18:24写道:
>
> +1, but why including root, i think the user could ignore the "root" when
> we change sg to database.  And we could ignore the root in the file path.
> And, the sql select from root.dbname and select from dbname all are ok to
> keep compatible.
>
>
>
>
> Thanks!
>
>
> Chao Wang
> BONC ltd
> ccgowork@163.com
> 在2022年11月18日 18:02,冯 庆新<qi...@hotmail.com> 写道:
> Agree with  ‘add constraint to the length of database name’,but Can we
> choose a value greater than 64?
>
> 发件人: Jialin Qiao<ma...@apache.org>
> 发送时间: 2022年11月18日 16:15
> 收件人: dev@iotdb.apache.org<ma...@iotdb.apache.org>
> 主题: Re: Add constraint to the length of database name
>
> +1
> —————————————————
> Jialin Qiao
> Apache IoTDB PMC
>
> 周钰坤 <zy...@gmail.com> 于2022年11月18日周五 15:44写道:
>
> Hi,
>
> We want to add constraint to the length of database name, as most
> popular database systems have such constraint as well, for example the
> length of database name in Mysql shall not exceed 64. Currently, the
> maximum length of database name, including "root.",  is *64* and it is
> immutable. Such constraint can help avoid some bugs of database and region
> management, since we use database names in the directory name, which shall
> not exceed the max name length defined by file system.
>
> best regards
> ------------------------
> Yukun Zhou, Tsinghua University
>
>

回复: 回复: Add constraint to the length of database name

Posted by Chao Wang <cc...@163.com>.
It's OK to use 64 bytes as the sg name, but root should not be included. That is, root. xxxx should be xxxx with a length of no more than 64, not xxxx with a length of no more than 60.




Then I raised another question, which can be discussed next time.




I think root is only useful for joining all sgs. In other scenarios, root is not necessary. We should try to shield the root prefix for users, because it is unnecessary to always input these characters.




Thanks!


Chao Wang
BONC ltd
ccgowork@163.com
在2022年11月18日 19:58,周钰坤<zy...@gmail.com> 写道:
We support suffix path, which will be concat to the prefix path in "from
clause", and full path, starting with "root",   in "where" clause. The
"root" is a identifier for us to recognize which is a full path.

Chao Wang <cc...@163.com> 于2022年11月18日周五 18:24写道:

+1, but why including root, i think the user could ignore the "root" when
we change sg to database.  And we could ignore the root in the file path.
And, the sql select from root.dbname and select from dbname all are ok to
keep compatible.




Thanks!


Chao Wang
BONC ltd
ccgowork@163.com
在2022年11月18日 18:02,冯 庆新<qi...@hotmail.com> 写道:
Agree with  ‘add constraint to the length of database name’,but Can we
choose a value greater than 64?

发件人: Jialin Qiao<ma...@apache.org>
发送时间: 2022年11月18日 16:15
收件人: dev@iotdb.apache.org<ma...@iotdb.apache.org>
主题: Re: Add constraint to the length of database name

+1
—————————————————
Jialin Qiao
Apache IoTDB PMC

周钰坤 <zy...@gmail.com> 于2022年11月18日周五 15:44写道:

Hi,

We want to add constraint to the length of database name, as most
popular database systems have such constraint as well, for example the
length of database name in Mysql shall not exceed 64. Currently, the
maximum length of database name, including "root.",  is *64* and it is
immutable. Such constraint can help avoid some bugs of database and region
management, since we use database names in the directory name, which shall
not exceed the max name length defined by file system.

best regards
------------------------
Yukun Zhou, Tsinghua University



Re: 回复: Add constraint to the length of database name

Posted by 周钰坤 <zy...@gmail.com>.
We support suffix path, which will be concat to the prefix path in "from
clause", and full path, starting with "root",   in "where" clause. The
"root" is a identifier for us to recognize which is a full path.

Chao Wang <cc...@163.com> 于2022年11月18日周五 18:24写道:

> +1, but why including root, i think the user could ignore the "root" when
> we change sg to database.  And we could ignore the root in the file path.
> And, the sql select from root.dbname and select from dbname all are ok to
> keep compatible.
>
>
>
>
> Thanks!
>
>
> Chao Wang
> BONC ltd
> ccgowork@163.com
> 在2022年11月18日 18:02,冯 庆新<qi...@hotmail.com> 写道:
> Agree with  ‘add constraint to the length of database name’,but Can we
> choose a value greater than 64?
>
> 发件人: Jialin Qiao<ma...@apache.org>
> 发送时间: 2022年11月18日 16:15
> 收件人: dev@iotdb.apache.org<ma...@iotdb.apache.org>
> 主题: Re: Add constraint to the length of database name
>
> +1
> —————————————————
> Jialin Qiao
> Apache IoTDB PMC
>
> 周钰坤 <zy...@gmail.com> 于2022年11月18日周五 15:44写道:
>
> Hi,
>
> We want to add constraint to the length of database name, as most
> popular database systems have such constraint as well, for example the
> length of database name in Mysql shall not exceed 64. Currently, the
> maximum length of database name, including "root.",  is *64* and it is
> immutable. Such constraint can help avoid some bugs of database and region
> management, since we use database names in the directory name, which shall
> not exceed the max name length defined by file system.
>
> best regards
> ------------------------
> Yukun Zhou, Tsinghua University
>
>

回复:回复: Add constraint to the length of database name

Posted by Chao Wang <cc...@163.com>.
+1, but why including root, i think the user could ignore the "root" when we change sg to database.  And we could ignore the root in the file path.  And, the sql select from root.dbname and select from dbname all are ok to keep compatible.




Thanks!


Chao Wang
BONC ltd
ccgowork@163.com
在2022年11月18日 18:02,冯 庆新<qi...@hotmail.com> 写道:
Agree with  ‘add constraint to the length of database name’,but Can we choose a value greater than 64?

发件人: Jialin Qiao<ma...@apache.org>
发送时间: 2022年11月18日 16:15
收件人: dev@iotdb.apache.org<ma...@iotdb.apache.org>
主题: Re: Add constraint to the length of database name

+1
—————————————————
Jialin Qiao
Apache IoTDB PMC

周钰坤 <zy...@gmail.com> 于2022年11月18日周五 15:44写道:

Hi,

We want to add constraint to the length of database name, as most
popular database systems have such constraint as well, for example the
length of database name in Mysql shall not exceed 64. Currently, the
maximum length of database name, including "root.",  is *64* and it is
immutable. Such constraint can help avoid some bugs of database and region
management, since we use database names in the directory name, which shall
not exceed the max name length defined by file system.

best regards
------------------------
Yukun Zhou, Tsinghua University


Re: Add constraint to the length of database name

Posted by 周钰坤 <zy...@gmail.com>.
It's the constraint that matters and the length 64 is sufficient for most
cases.

冯 庆新 <qi...@hotmail.com> 于2022年11月18日周五 18:02写道:

> Agree with  ‘add constraint to the length of database name’,but Can we
> choose a value greater than 64?
>
> 发件人: Jialin Qiao<ma...@apache.org>
> 发送时间: 2022年11月18日 16:15
> 收件人: dev@iotdb.apache.org<ma...@iotdb.apache.org>
> 主题: Re: Add constraint to the length of database name
>
> +1
> —————————————————
> Jialin Qiao
> Apache IoTDB PMC
>
> 周钰坤 <zy...@gmail.com> 于2022年11月18日周五 15:44写道:
> >
> > Hi,
> >
> >     We want to add constraint to the length of database name, as most
> > popular database systems have such constraint as well, for example the
> > length of database name in Mysql shall not exceed 64. Currently, the
> > maximum length of database name, including "root.",  is *64* and it is
> > immutable. Such constraint can help avoid some bugs of database and
> region
> > management, since we use database names in the directory name, which
> shall
> > not exceed the max name length defined by file system.
> >
> > best regards
> > ------------------------
> > Yukun Zhou, Tsinghua University
>
>

回复: Add constraint to the length of database name

Posted by 冯 庆新 <qi...@hotmail.com>.
Agree with  ‘add constraint to the length of database name’,but Can we choose a value greater than 64?

发件人: Jialin Qiao<ma...@apache.org>
发送时间: 2022年11月18日 16:15
收件人: dev@iotdb.apache.org<ma...@iotdb.apache.org>
主题: Re: Add constraint to the length of database name

+1
―――――――――――――――――
Jialin Qiao
Apache IoTDB PMC

周钰坤 <zy...@gmail.com> 于2022年11月18日周五 15:44写道:
>
> Hi,
>
>     We want to add constraint to the length of database name, as most
> popular database systems have such constraint as well, for example the
> length of database name in Mysql shall not exceed 64. Currently, the
> maximum length of database name, including "root.",  is *64* and it is
> immutable. Such constraint can help avoid some bugs of database and region
> management, since we use database names in the directory name, which shall
> not exceed the max name length defined by file system.
>
> best regards
> ------------------------
> Yukun Zhou, Tsinghua University


Re: Add constraint to the length of database name

Posted by Jialin Qiao <qi...@apache.org>.
+1
—————————————————
Jialin Qiao
Apache IoTDB PMC

周钰坤 <zy...@gmail.com> 于2022年11月18日周五 15:44写道:
>
> Hi,
>
>     We want to add constraint to the length of database name, as most
> popular database systems have such constraint as well, for example the
> length of database name in Mysql shall not exceed 64. Currently, the
> maximum length of database name, including "root.",  is *64* and it is
> immutable. Such constraint can help avoid some bugs of database and region
> management, since we use database names in the directory name, which shall
> not exceed the max name length defined by file system.
>
> best regards
> ------------------------
> Yukun Zhou, Tsinghua University