Key Column Assignment Method
The collection metadata component that specifies the method used to assign keys to objects that are inserted into the collection.
| Property | Value |
|---|---|
| Default value | UUID |
| Allowed values | UUID, GUID, SEQUENCE, CLIENT, and EMBEDDED_OID |
| JSON collection metadata document path | keyColumn.assignmentMethod |
For descriptions of these methods, see Table 1.
Table 1 Key Assignment Methods
| Method | Description |
|---|---|
UUID (default — but not used by Oracle Database API for MongoDB) |
Keys are generated by SODA, based on the UUID (a Universal Unique IDentifier). |
GUID |
Keys are generated in Oracle Database by SQL function SYS_GUID, described in Oracle Database SQL Language Reference. |
SEQUENCE |
Keys are generated in Oracle Database by a database sequence. If you specify the key assignment method as SEQUENCE then you must also specify the name of that sequence — see Key Column Sequence Name. |
CLIENT |
Keys are assigned by the client application. Caution: If client-assigned keys are used and the key column type is Otherwise, if client-assigned keys contain characters that are not supported in your database character set then conversion of the key into the database character set during a read or write operation is lossy. This can lead to duplicate-key errors during insert operations. More generally, it can lead to unpredictable results. For example, a read operation could return a value that is associated with a different key from the one you expect. |
EMBEDDED_OID (used always by Oracle Database API for MongoDB) |
This method is used only, and automatically, with Oracle Database API for MongoDB, which is available only for an Oracle Autonomous Database. (You cannot create a collection that uses this method with any of the SODA implementations/languages.) The column value is a string (data type
|