- OrientDB - Console Modes
- OrientDB - Data Types
- OrientDB - Basic Concepts
- OrientDB - Installation
- OrientDB - Overview
- OrientDB - Home
OrientDB Database Commands
- OrientDB - Drop Database
- OrientDB - Optimize Database
- OrientDB - Rollback Database
- OrientDB - Commit Database
- OrientDB - Import Database
- OrientDB - Export Database
- OrientDB - Config Database
- OrientDB - Release Database
- OrientDB - Freeze Database
- OrientDB - List Database
- OrientDB - Info Database
- OrientDB - Disconnect Database
- OrientDB - Connect Database
- OrientDB - Restore Database
- OrientDB - Backup Database
- OrientDB - Alter Database
- OrientDB - Create Database
OrientDB Record Commands
- OrientDB - Delete Record
- OrientDB - Truncate Record
- OrientDB - Update Record
- OrientDB - Export Record
- OrientDB - Reload Record
- OrientDB - Load Record
- OrientDB - Display Records
- OrientDB - Insert Record
OrientDB Class Commands
OrientDB Cluster Commands
- OrientDB - Drop Cluster
- OrientDB - Truncate Cluster
- OrientDB - Alter Cluster
- OrientDB - Create Cluster
OrientDB Property Commands
OrientDB Vertex Commands
OrientDB Edge Commands
OrientDB Advanced Concepts
- OrientDB - Studio
- OrientDB - Security
- OrientDB - Upgrading
- OrientDB - Performance Tuning
- OrientDB - Logging
- OrientDB - Caching
- OrientDB - Hooks
- OrientDB - Transactions
- OrientDB - Indexes
- OrientDB - Sequences
- OrientDB - Functions
OrientDB Interfaces
OrientDB Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
OrientDB - Alter Database
Database is a one of the important data models with different attributes that you can modify as per your requirements.
The following statement is the basic syntax of the Alter Database command.
ALTER DATABASE <attribute-name> <attribute-value>
Where <attribute-name> defines the attribute that you want to modify and <attribute-value> defines the value you want to set for that attribute.
The following table defines the pst of supported attributes for altering a 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 vapdations for entire database. |
Example
From the version of OrientDB-2.2, the new SQL parser is added which will not allow the regular syntax in some cases. Therefore, we have to disable the new SQL parser (StrictSQL) in some cases. You can use the following Alter database command to disable the StrictSQL parser.
orientdb> ALTER DATABASE custom strictSQL = false
If the command is executed successfully, you will get the following output.
Database updated successfullyAdvertisements