Orientdb-alter-database

提供:Dev Guides
移動先:案内検索

OrientDB-データベースの変更

データベースは、要件に応じて変更できるさまざまな属性を持つ重要なデータモデルの1つです。

次の文は、データベース変更コマンドの基本的な構文です。

ALTER DATABASE <attribute-name> <attribute-value>

ここで、 <attribute-name> は変更する属性を定義し、 <attribute-value> はその属性に設定する値を定義します。

次の表は、データベースを変更するためにサポートされる属性のリストを定義しています。

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)を無効にする必要があります。 次のデータベース変更コマンドを使用して、StrictSQLパーサーを無効にできます。

orientdb> ALTER DATABASE custom strictSQL = false

コマンドが正常に実行されると、次の出力が得られます。

Database updated successfully