📜  OrientDB-Alter数据库

📅  最后修改于: 2020-11-26 05:16:27             🧑  作者: Mango


数据库是具有不同属性的重要数据模型之一,您可以根据需要对其进行修改。

以下语句是Alter Database命令的基本语法。

ALTER DATABASE   

其中定义要修改的属性,而定义要为该属性设置的值。

下表定义了用于更改数据库的受支持属性的列表。

Sr.No. Attribute Name Description
1 STATUS Defines the database’s status between different attributes.
2 IMPORTING Sets the importing status.
3 DEFAULTCLUSTERID Sets the default cluster using ID. By default it is 2.
4 DATEFORMAT Sets the particular date format as default. By default it is “yyyy-MM-dd”.
5 DATETIMEFORMAT Sets the particular date time format as default. By default it is “yyyy-MM-dd HH:mm:ss”.
6 TIMEZONE Sets the particular time zone. By default it is Java Virtual Machine’s (JVM’s) default time zone.
7 LOCALECOUNTRY Sets the default locale country. By default it is JVM’s default locale country. For example: “GB”.
8 LOCALELANGUAGE Sets the default locale language. By default it is JVM’s default locale language. For example: “en”.
9 CHARSET Sets the type of character set. By default it is JVM’s default charset. For example: “utf8”.
10 CLUSTERSELECTION Sets the default strategy used for selecting the cluster. These strategies are created along with the class creation. Supported strategies are default, roundrobin, and balanced.
11 MINIMUMCLUSTERS Sets the minimum number of clusters to create automatically when a new class is created. By default it is 1.
12 CUSTOM Sets the custom property.
13 VALIDATION Disables or enables the validations for entire database.

从OrientDB-2.2版本开始,添加了新的SQL解析器,该解析器在某些情况下将不允许常规语法。因此,在某些情况下,我们必须禁用新的SQL解析器(StrictSQL)。您可以使用以下Alter database命令禁用StrictSQL解析器。

orientdb> ALTER DATABASE custom strictSQL = false 

如果命令执行成功,您将获得以下输出。

Database updated successfully