-
Notifications
You must be signed in to change notification settings - Fork 0
Console Command Create Cluster
SQL Create Class コマンドはスキーマへ新しいクラスを作成します。NOTE: 同じ名前のクラスタが存在する場合は、でろるのクラスタが使用されます.
CREATE CLASS <class> [EXTENDS <super-class>] [CLUSTER <clusterId>*]
Where:
- class は作成されるクラス名称です. 先頭の文字はアルファベットである必要があり、他の文字はアルファベットに加えてアンダースコア _ かダッシュ -である必要あります.
- super-class, optional, 継承している親クラス
- clusterId カンマ (,)区切りの一覧が使用できます
By default OrientDB creates 1 cluster per class, but this can be changed by setting the property minimumclusters
at [database level](SQL Alter Database).
OrientDBはデフォルトでは一つのクラスに対して一つのクラスタを作成しますが[database level](SQL Alter Database)の minimumclusters
プロパティ設定で変更が可能です。
OrientDB, by default, inherits the cluster selection by the [database](SQL Alter Database). By default is round-robin, but you can always change it after creation with [alter class command](SQL Alter Class). The supported strategies are:
-
default, uses always the Class's
defaultClusterId
property. This was the default before 1.7 - round-robin, put the Class's configured clusters in a ring and returns a different cluster every time restarting from the first when the ring is completed
- balanced, checks the records in all the clusters and returns the smaller cluster. This allows the cluster to have all the underlying clusters balanced on size. On adding a new cluster to an existent class, the new empty cluster will be filled before the others because more empty then the others. In distributed configuration when configure clusters on different servers this setting allows to keep the server balanced with the same amount of data. Calculation of cluster size is made every 5 or more seconds to avoid to slow down insertion
- [alter class](SQL Alter Class)
- [drop class](SQL Drop Class)
- [create cluster](SQL Create Cluster)
- SQL commands
- Console commands
'Account' クラスを生成:
CREATE CLASS Account
'Vehicle'クラスを継承した'Car'を生成:
CREATE CLASS Car extends Vehicle
'Car'クラスの clusterId を 10 として生成:
CREATE CLASS Car CLUSTER 10
'Person'クラスを抽象クラス]として生成 :
CREATE CLASS Person ABSTRACT
Home - Download - Install - Upgrade - Professional Support - Courses - Team
- Copyright (C) Orient Technologies - All rights reserved.