Home >Common Problem >OrientDB modifies the database

OrientDB modifies the database

DDD
DDDOriginal
2023-06-15 16:34:50790browse

OrientDB modifies the database

Database is one of the important data models with different properties that you can modify according to your needs.

The following statements are the basic syntax of the Alter Database command.

ALTERDATABASE<attribute-name><attribute-value>SQL

Where b44013db7288c74326d2496160d85509 defines the attribute to be modified, 641bf20773c1508a05eed73fbbc603f5 defines the value to be set for the attribute.

The following defines a list of supported properties for changing the database.

STATUS Define database state between different properties.

IMPORTING Set import status.

DEFAULTCLUSTERID Set default cluster using ID. The default is 2.

DATEFORMAT Set a specific date format as default. The default is yyyy-MM-dd.

DATETIMEFORMAT Set a specific date time format as default. The default is yyyy-MM-dd HH:mm:ss.

TIMEZONE Set a specific time zone. By default, it is the Java Virtual Machine (JVM) default time zone.

LOCALECOUNTRY Set the default locale country. By default, it is the JVM's default locale country. For example: GB.

LOCALELANGUAGE Set the default locale language. By default, it is the default locale language of the JVM. For example: en.

CHARSET Set the type of character set. By default, it is the JVM's default character set. For example: utf8.

CLUSTERSELECTION Set the default policy for cluster selection. These policies are created together with the creation class. Supported strategies are Default, Loop and Balance.

MINIMUMCLUSTERS Sets the minimum number of clusters that are automatically created when creating a new class. The default is 1.

CUSTOM Set custom properties.

VALIDATION Disable or enable validation for the entire database.

Example

From the version of OrientDB-2.2, a new SQL parser has been added that does not allow the use of regular syntax in some cases. Therefore, in some cases we have to disable the new SQL parser (StrictSQL). The StrictSQL analyzer can be disabled using the following Alter database command.

orientdb>ALTERDATABASEcustomstrictSQL=falseSQL

If the command is executed successfully, you will get the following output.

orientdb{db=demo}>ALTERDATABASEcustomstrictSQL=false
Databaseupdatedsuccessfully.
orientdb{db=demo}>

The above is the detailed content of OrientDB modifies the database. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn