Skip to content

Commit 146d413

Browse files
authored
add parentnode example in tree creating database (#1058)
1 parent d7a3d82 commit 146d413

8 files changed

Lines changed: 89 additions & 24 deletions

File tree

src/UserGuide/Master/Tree/Basic-Concept/Operate-Metadata_apache.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,20 @@ We can thus create two databases using the above two SQL statements.
3636

3737
It is worth noting that 1 database is recommended.
3838

39-
When the path itself or the parent/child layer of the path is already created as database, the path is then not allowed to be created as database. For example, it is not feasible to create `root.ln.wf01` as database when two databases `root.ln` and `root.sgcc` exist. The system gives the corresponding error prompt as shown below:
39+
When the path itself or the parent/child layer of the path is already created as database, the path is then not allowed to be created as database.
40+
41+
For example, when the databases root.ln and root.sgcc already exist, creating the database root.ln.wf01 is not allowed. The system will return the corresponding error message as shown below:
4042

4143
```sql
4244
CREATE DATABASE root.ln.wf01;
43-
Msg: 300: root.ln has already been created as database;
44-
create database root.ln.wf01;
45-
Msg: 300: root.ln has already been created as database;
45+
Msg: org.apache.iotdb.jdbc.IoTDBSQLException: 501: root.ln has already been created as a database
46+
```
47+
48+
Similarly, when the database root.db.test already exists, creating the database root.db is not allowed either. The system will return the corresponding error message as shown below:
49+
50+
```sql
51+
CREATE DATABASE root.db;
52+
Msg: org.apache.iotdb.jdbc.IoTDBSQLException: 529: Some children of root.db have already been created as datab
4653
```
4754

4855
Database Node Naming Rules:

src/UserGuide/Master/Tree/Basic-Concept/Operate-Metadata_timecho.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,20 @@ We can thus create two databases using the above two SQL statements.
3636

3737
It is worth noting that 1 database is recommended.
3838

39-
When the path itself or the parent/child layer of the path is already created as database, the path is then not allowed to be created as database. For example, it is not feasible to create `root.ln.wf01` as database when two databases `root.ln` and `root.sgcc` exist. The system gives the corresponding error prompt as shown below:
39+
When the path itself or the parent/child layer of the path is already created as database, the path is then not allowed to be created as database.
40+
41+
For example, when the databases root.ln and root.sgcc already exist, creating the database root.ln.wf01 is not allowed. The system will return the corresponding error message as shown below:
4042

4143
```sql
4244
CREATE DATABASE root.ln.wf01;
43-
Msg: 300: root.ln has already been created as database;
44-
create database root.ln.wf01;
45-
Msg: 300: root.ln has already been created as database;
45+
Msg: org.apache.iotdb.jdbc.IoTDBSQLException: 501: root.ln has already been created as a database
46+
```
47+
48+
Similarly, when the database root.db.test already exists, creating the database root.db is not allowed either. The system will return the corresponding error message as shown below:
49+
50+
```sql
51+
CREATE DATABASE root.db;
52+
Msg: org.apache.iotdb.jdbc.IoTDBSQLException: 529: Some children of root.db have already been created as datab
4653
```
4754

4855
Database Node Naming Rules:

src/UserGuide/latest/Basic-Concept/Operate-Metadata_apache.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,20 @@ We can thus create two databases using the above two SQL statements.
3636

3737
It is worth noting that 1 database is recommended.
3838

39-
When the path itself or the parent/child layer of the path is already created as database, the path is then not allowed to be created as database. For example, it is not feasible to create `root.ln.wf01` as database when two databases `root.ln` and `root.sgcc` exist. The system gives the corresponding error prompt as shown below:
39+
When the path itself or the parent/child layer of the path is already created as database, the path is then not allowed to be created as database.
40+
41+
For example, when the databases root.ln and root.sgcc already exist, creating the database root.ln.wf01 is not allowed. The system will return the corresponding error message as shown below:
4042

4143
```sql
4244
CREATE DATABASE root.ln.wf01;
43-
Msg: 300: root.ln has already been created as database;
44-
create database root.ln.wf01;
45-
Msg: 300: root.ln has already been created as database;
45+
Msg: org.apache.iotdb.jdbc.IoTDBSQLException: 501: root.ln has already been created as a database
46+
```
47+
48+
Similarly, when the database root.db.test already exists, creating the database root.db is not allowed either. The system will return the corresponding error message as shown below:
49+
50+
```sql
51+
CREATE DATABASE root.db;
52+
Msg: org.apache.iotdb.jdbc.IoTDBSQLException: 529: Some children of root.db have already been created as datab
4653
```
4754

4855
Database Node Naming Rules:

src/UserGuide/latest/Basic-Concept/Operate-Metadata_timecho.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,20 @@ We can thus create two databases using the above two SQL statements.
3636

3737
It is worth noting that 1 database is recommended.
3838

39-
When the path itself or the parent/child layer of the path is already created as database, the path is then not allowed to be created as database. For example, it is not feasible to create `root.ln.wf01` as database when two databases `root.ln` and `root.sgcc` exist. The system gives the corresponding error prompt as shown below:
39+
When the path itself or the parent/child layer of the path is already created as database, the path is then not allowed to be created as database.
40+
41+
For example, when the databases root.ln and root.sgcc already exist, creating the database root.ln.wf01 is not allowed. The system will return the corresponding error message as shown below:
4042

4143
```sql
4244
CREATE DATABASE root.ln.wf01;
43-
Msg: 300: root.ln has already been created as database;
44-
create database root.ln.wf01;
45-
Msg: 300: root.ln has already been created as database;
45+
Msg: org.apache.iotdb.jdbc.IoTDBSQLException: 501: root.ln has already been created as a database
46+
```
47+
48+
Similarly, when the database root.db.test already exists, creating the database root.db is not allowed either. The system will return the corresponding error message as shown below:
49+
50+
```sql
51+
CREATE DATABASE root.db;
52+
Msg: org.apache.iotdb.jdbc.IoTDBSQLException: 529: Some children of root.db have already been created as datab
4653
```
4754

4855
Database Node Naming Rules:

src/zh/UserGuide/Master/Tree/Basic-Concept/Operate-Metadata_apache.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,21 @@ CREATE DATABASE root.ln;
3535

3636
需要注意的是,推荐创建一个 database.
3737

38-
Database 的父子节点都不能再设置 database。例如在已经有`root.ln``root.sgcc`这两个 database 的情况下,创建`root.ln.wf01` database 是不可行的。系统将给出相应的错误提示,如下所示:
38+
Database 的父子节点都不能再设置 database。
39+
40+
例如在已经有`root.ln``root.sgcc`这两个 database 的情况下,创建`root.ln.wf01` database 是不可行的。系统将给出相应的错误提示,如下所示:
3941

4042
```sql
4143
CREATE DATABASE root.ln.wf01;
42-
Msg: 300: root.ln has already been created as database.
44+
Msg: org.apache.iotdb.jdbc.IoTDBSQLException: 501: root.ln has already been created as database
4345
```
46+
同样,在已经有 `root.db.test` 这个 database 的情况下,创建 `root.db` database 也是不可行的。系统也会给出相应的错误提示,如下所示:
47+
48+
```sql
49+
CREATE DATABASE root.db;
50+
Msg: org.apache.iotdb.jdbc.IoTDBSQLException: 529: some children of root.db have already been created as database
51+
```
52+
4453
Database 节点名命名规则:
4554
1. 节点名可由**中英文字符、数字、下划线(\_)、英文句号(.)、反引号(\`** 组成
4655
2. 若节点名为以下情况,则必须用**反引号(\`** 将整个名称包裹。

src/zh/UserGuide/Master/Tree/Basic-Concept/Operate-Metadata_timecho.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,21 @@ CREATE DATABASE root.ln;
3535

3636
需要注意的是,推荐创建一个 database.
3737

38-
Database 的父子节点都不能再设置 database。例如在已经有`root.ln``root.sgcc`这两个 database 的情况下,创建`root.ln.wf01` database 是不可行的。系统将给出相应的错误提示,如下所示:
38+
Database 的父子节点都不能再设置 database。
39+
40+
例如在已经有`root.ln``root.sgcc`这两个 database 的情况下,创建`root.ln.wf01` database 是不可行的。系统将给出相应的错误提示,如下所示:
3941

4042
```sql
4143
CREATE DATABASE root.ln.wf01;
42-
Msg: 300: root.ln has already been created as database.
44+
Msg: org.apache.iotdb.jdbc.IoTDBSQLException: 501: root.ln has already been created as database
45+
```
46+
同样,在已经有 `root.db.test` 这个 database 的情况下,创建 `root.db` database 也是不可行的。系统也会给出相应的错误提示,如下所示:
47+
48+
```sql
49+
CREATE DATABASE root.db;
50+
Msg: org.apache.iotdb.jdbc.IoTDBSQLException: 529: some children of root.db have already been created as database
4351
```
52+
4453
Database 节点名命名规则:
4554
1. 节点名可由**中英文字符、数字、下划线(\_)、英文句号(.)、反引号(\`** 组成
4655
2. 若节点名为以下情况,则必须用**反引号(\`** 将整个名称包裹。
@@ -464,6 +473,7 @@ ALTER TIMESERIES <oldPath> RENAME TO <newPath>
464473
ALTER TIMESERIES root.ln.wf01.wt01.temperature RENAME TO root.newln.newwf.newwt.temperature;
465474
```
466475

476+
467477
### 2.5 删除时间序列
468478

469479
我们可以使用`(DELETE | DROP) TimeSeries <PathPattern>`语句来删除我们之前创建的时间序列。SQL 语句如下所示:

src/zh/UserGuide/latest/Basic-Concept/Operate-Metadata_apache.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,21 @@ CREATE DATABASE root.ln;
3535

3636
需要注意的是,推荐创建一个 database.
3737

38-
Database 的父子节点都不能再设置 database。例如在已经有`root.ln``root.sgcc`这两个 database 的情况下,创建`root.ln.wf01` database 是不可行的。系统将给出相应的错误提示,如下所示:
38+
Database 的父子节点都不能再设置 database。
39+
40+
例如在已经有`root.ln``root.sgcc`这两个 database 的情况下,创建`root.ln.wf01` database 是不可行的。系统将给出相应的错误提示,如下所示:
3941

4042
```sql
4143
CREATE DATABASE root.ln.wf01;
42-
Msg: 300: root.ln has already been created as database.
44+
Msg: org.apache.iotdb.jdbc.IoTDBSQLException: 501: root.ln has already been created as database
4345
```
46+
同样,在已经有 `root.db.test` 这个 database 的情况下,创建 `root.db` database 也是不可行的。系统也会给出相应的错误提示,如下所示:
47+
48+
```sql
49+
CREATE DATABASE root.db;
50+
Msg: org.apache.iotdb.jdbc.IoTDBSQLException: 529: some children of root.db have already been created as database
51+
```
52+
4453
Database 节点名命名规则:
4554
1. 节点名可由**中英文字符、数字、下划线(\_)、英文句号(.)、反引号(\`** 组成
4655
2. 若节点名为以下情况,则必须用**反引号(\`** 将整个名称包裹。

src/zh/UserGuide/latest/Basic-Concept/Operate-Metadata_timecho.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,21 @@ CREATE DATABASE root.ln;
3535

3636
需要注意的是,推荐创建一个 database.
3737

38-
Database 的父子节点都不能再设置 database。例如在已经有`root.ln``root.sgcc`这两个 database 的情况下,创建`root.ln.wf01` database 是不可行的。系统将给出相应的错误提示,如下所示:
38+
Database 的父子节点都不能再设置 database。
39+
40+
例如在已经有`root.ln``root.sgcc`这两个 database 的情况下,创建`root.ln.wf01` database 是不可行的。系统将给出相应的错误提示,如下所示:
3941

4042
```sql
4143
CREATE DATABASE root.ln.wf01;
42-
Msg: 300: root.ln has already been created as database.
44+
Msg: org.apache.iotdb.jdbc.IoTDBSQLException: 501: root.ln has already been created as database
4345
```
46+
同样,在已经有 `root.db.test` 这个 database 的情况下,创建 `root.db` database 也是不可行的。系统也会给出相应的错误提示,如下所示:
47+
48+
```sql
49+
CREATE DATABASE root.db;
50+
Msg: org.apache.iotdb.jdbc.IoTDBSQLException: 529: some children of root.db have already been created as database
51+
```
52+
4453
Database 节点名命名规则:
4554
1. 节点名可由**中英文字符、数字、下划线(\_)、英文句号(.)、反引号(\`** 组成
4655
2. 若节点名为以下情况,则必须用**反引号(\`** 将整个名称包裹。

0 commit comments

Comments
 (0)