7 SODA Collection Metadata Components (Reference)
Collection metadata is composed of multiple components. A detailed definition of the components is presented.
Note:
The identifiers used for collection metadata components (schema name, table name, view name, database sequence name, and column names) must be valid Oracle quoted identifiers.Foot 1 Some characters and words that are allowed in Oracle quoted identifiers are strongly discouraged. For details, see Oracle Database SQL Language Reference.
- Schema
The collection metadata component that specifies the name of the Oracle Database schema that owns the table or view to which the collection is mapped. - Table or View
The collection metadata component that specifies the name of the table or view to which the collection is mapped. - Key Column Name
The collection metadata component that specifies the name of the column that stores the document key. - Key Column Type
The collection metadata component that specifies the SQL data type of the column that stores the document key. - Key Column Max Length
The collection metadata component that specifies the maximum length of the key column in bytes. This component applies only to keys of typeVARCHAR2
. - Key Column Assignment Method
The collection metadata component that specifies the method used to assign keys to objects that are inserted into the collection. - Key Column Sequence Name
The collection metadata component that specifies the name of the database sequence that generates keys for documents that are inserted into a collection if the key assignment method isSEQUENCE
. - Content Column Name
The collection metadata component that specifies the name of the column that stores the database content. - Content Column Type
The collection metadata component that specifies the SQL data type of the column that stores the document content. - Content Column Max Length
The collection metadata component that specifies the maximum length of the content column in bytes. This component applies only to content of typeVARCHAR2
. - Content Column JSON Validation
The collection metadata component that specifies the syntax to which JavaScript Object Notation (JSON) content must conform—strict or lax. - Content Column SecureFiles LOB Compression
The collection metadata component that specifies the SecureFiles LOB compression setting. - Content Column SecureFiles LOB Cache
The collection metadata component that specifies the SecureFiles LOB cache setting. - Content Column SecureFiles LOB Encryption
The collection metadata component that specifies the SecureFiles LOB encryption setting. - Version Column Name
The collection metadata component that specifies the name of the column that stores the document version. - Version Column Generation Method
The collection metadata component that specifies the method used to compute version values for objects when they are inserted into a collection or replaced. - Last-Modified Time Stamp Column Name
The collection metadata component that specifies the name of the column that stores the last-modified time stamp of the document. - Last-Modified Column Index Name
The collection metadata component that specifies the name of the index on the last-modified column. - Creation Time Stamp Column Name
The collection metadata component that specifies the name of the column that stores the creation time stamp of the document. This time stamp is generated during theinsert
,insertAndGet
,save
, orsaveAndGet
operation. - Media Type Column Name
The collection metadata component that specifies the name of the column that stores the media type of the document. A media type column is needed if the collection is to be heterogeneous, that is, it can store documents other than JavaScript Object Notation (JSON). - Read Only
The collection metadata component that specifies whether the collection is read-only.
7.1 Schema
The collection metadata component that specifies the name of the Oracle Database schema that owns the table or view to which the collection is mapped.
Property | Value |
---|---|
Default value |
None |
Allowed values |
Valid Oracle quoted identifierFootref 1. If this value contains double quotation marks ( |
JSON collection metadata document path |
|
See Also:
Oracle Database SQL Language Reference for information about valid Oracle quoted identifiers
7.2 Table or View
The collection metadata component that specifies the name of the table or view to which the collection is mapped.
Property | Value |
---|---|
Default value |
None |
Allowed values |
Valid Oracle quoted identifierFootref 1. If this value contains double quotation marks ( |
JSON collection metadata document path |
|
See Also:
Oracle Database SQL Language Reference for information about valid Oracle quoted identifiers
7.3 Key Column Name
The collection metadata component that specifies the name of the column that stores the document key.
Property | Value |
---|---|
Default value |
|
Allowed values |
Valid Oracle quoted identifierFootref 1 (as defined in Oracle Database SQL Language Reference). If this value contains double quotation marks ( |
JSON collection metadata document path |
|
7.4 Key Column Type
The collection metadata component that specifies the SQL data type of the column that stores the document key.
Property | Value |
---|---|
Default value |
|
Allowed values |
|
JSON collection metadata document path |
|
Caution:
If client-assigned keys are used and the key column type is VARCHAR2
then Oracle recommends that the database character set be AL32UTF8. This ensures that conversion of the keys to the database character set is lossless.
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.
7.5 Key Column Max Length
The collection metadata component that specifies the maximum length of the key column in bytes. This component applies only to keys of type VARCHAR2
.
Property | Value |
---|---|
Default value |
|
Allowed values |
At least 32 bytes if key assignment method is |
JSON collection metadata document path |
|
Related Topics
7.6 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 |
|
Allowed values |
For descriptions of these methods, see Table 7-1. |
JSON collection metadata document path |
|
Table 7-1 Key Assignment Methods
Method | Description |
---|---|
|
Keys are generated in Oracle Database by SQL function |
|
Keys are generated in Oracle Database by a database sequence. If you specify the key assignment method as |
|
Keys are assigned by the client application. |
|
Keys are generated by SODA, based on the |
7.7 Key Column Sequence Name
The collection metadata component that specifies the name of the database sequence that generates keys for documents that are inserted into a collection if the key assignment method is SEQUENCE
.
If you specify the key assignment method as SEQUENCE
then you must also specify the name of that sequence. If the specified sequence does not exist then SODA creates it.
Property | Value |
---|---|
Default value |
None |
Allowed values |
Valid Oracle quoted identifierFootref 1 (as defined in Oracle Database SQL Language Reference). If this value contains double quotation marks ( |
JSON collection metadata document path |
|
Note:
If you drop a collection using SODA, the sequence used for key generation is not dropped. This is because it might not have been created using SODA. To drop the sequence, use SQL command DROP SEQUENCE
, after first dropping the collection.
Related Topics
See Also:
-
Oracle Database SQL Language Reference for information about
DROP SEQUENCE
-
Oracle Database Concepts for information about database sequences
7.8 Content Column Name
The collection metadata component that specifies the name of the column that stores the database content.
Property | Value |
---|---|
Default value |
|
Allowed values |
Valid Oracle quoted identifierFootref 1 (as defined in Oracle Database SQL Language Reference). If this value contains double quotation marks ( |
JSON collection metadata document path |
|
7.9 Content Column Type
The collection metadata component that specifies the SQL data type of the column that stores the document content.
Property | Value |
---|---|
Default value |
|
Allowed values |
|
JSON collection metadata document path |
|
7.10 Content Column Max Length
The collection metadata component that specifies the maximum length of the content column in bytes. This component applies only to content of type VARCHAR2
.
Property | Value |
---|---|
Default value |
4000 |
Allowed values |
32767 if extended data types are enabled. Otherwise, 4000 if content column type is |
JSON collection metadata document path |
|
Related Topics
See Also:
Oracle Database SQL Language Reference for information about extended data types
7.11 Content Column JSON Validation
The collection metadata component that specifies the syntax to which JavaScript Object Notation (JSON) content must conform—strict or lax.
Property | Value |
---|---|
Default value |
|
Allowed values |
|
JSON collection metadata document path |
|
-
STANDARD
validates according to the JSON RFC 4627 standard. (It corresponds to the strict syntax defined for Oracle SQL conditionis json
.) -
STRICT
is the same asSTANDARD
, except that it also verifies that the document does not contain duplicate JSON field names. (It corresponds to the strict syntax defined for Oracle SQL conditionis json
when the SQL keywordsWITH UNIQUE KEYS
are also used.) -
LAX
validates more loosely. (It corresponds to the lax syntax defined for Oracle SQL conditionis json
.) Some of the relaxations thatLAX
allows include the following:-
It does not require JSON field names to be enclosed in double quotation marks (
"
). -
It allows uppercase, lowercase, and mixed case versions of
true
,false
, andnull
. -
Numerals can be represented in additional ways.
-
See Also:
-
Oracle Database JSON Developer’s Guide for information about strict and lax JSON syntax
-
The application/json Media Type for JavaScript Object Notation (JSON) for the JSON RFC 4627 standard
7.12 Content Column SecureFiles LOB Compression
The collection metadata component that specifies the SecureFiles LOB compression setting.
Property | Value |
---|---|
Default value |
|
Allowed values |
|
JSON collection metadata document path |
|
See Also:
Oracle Database SecureFiles and Large Objects Developer's Guide for information about SecureFiles LOB storage
7.13 Content Column SecureFiles LOB Cache
The collection metadata component that specifies the SecureFiles LOB cache setting.
Property | Value |
---|---|
Default value |
|
Allowed values |
|
JSON collection metadata document path |
|
See Also:
Oracle Database SecureFiles and Large Objects Developer's Guide for information about SecureFiles LOB storage
7.14 Content Column SecureFiles LOB Encryption
The collection metadata component that specifies the SecureFiles LOB encryption setting.
Property | Value |
---|---|
Default value |
|
Allowed values |
|
JSON collection metadata document path |
|
See Also:
Oracle Database SecureFiles and Large Objects Developer's Guide for information about SecureFiles LOB storage
7.15 Version Column Name
The collection metadata component that specifies the name of the column that stores the document version.
Property | Value |
---|---|
Default value |
|
Allowed values |
Valid Oracle quoted identifierFootref 1 (as defined in Oracle Database SQL Language Reference). If this value contains double quotation marks ( |
JSON collection metadata document path |
|
7.16 Version Column Generation Method
The collection metadata component that specifies the method used to compute version values for objects when they are inserted into a collection or replaced.
Property | Value |
---|---|
Default value |
|
Allowed values |
|
JSON collection metadata document path |
|
Table 7-2 describes the version generation methods.
Table 7-2 Version Generation Methods
Method | Description |
---|---|
|
Ignoring object content, SODA generates a universally unique identifier (UUID) when the document is inserted and for every replace operation. Efficient, but the version changes even if the original and replacement documents have identical content. Version column type value is |
|
Ignoring object content, SODA generates a value from the time stamp and coverts it to Version column type value is |
|
SODA uses the MD5 algorithm to compute a hash value of the document content. This method is less efficient than Version column type value is |
|
SODA uses the SHA256 algorithm to compute a hash value of the document content. This method is less efficient than Version column type value is |
|
Ignoring object content, SODA assigns version 1 when the object is inserted and increments the version value every time the object is replaced. Version values are easily understood by human users, but the version changes even if the original and replacement documents have identical content. Version column type value is |
|
If the version column is present, |
7.17 Last-Modified Time Stamp Column Name
The collection metadata component that specifies the name of the column that stores the last-modified time stamp of the document.
Property | Value |
---|---|
Default value |
|
Allowed values |
Valid Oracle quoted identifierFootref 1 (as defined in Oracle Database SQL Language Reference). If this value contains double quotation marks ( |
JSON collection metadata document path |
|
7.18 Last-Modified Column Index Name
The collection metadata component that specifies the name of the index on the last-modified column.
The value of this component is the name of a nonunique index on the last-modified time-stamp column. The index is created if a name is specified. This index can improve the performance of read and write operations that are driven by last-modified time stamps.
Only SODA for REST provides such an operation (operation GET
collection with time-stamp parameters since
and until
). Other implementations do not use this component, since they do not provide any read or write operations that are driven by last-modified time stamps. Even for SODA for REST, it is typically better not to set this component if you are sure that your application does not use any read or write operations that are driven by time stamps, because creating and maintaining an index carries a cost.
Property | Value |
---|---|
Default value |
None |
Allowed values |
Valid Oracle quoted identifierFootref 1 (as defined in Oracle Database SQL Language Reference). If this value contains double quotation marks ( |
JSON collection metadata document path |
|
See Also:
Oracle REST Data Services SODA for REST Developer's Guide
7.19 Creation Time Stamp Column Name
The collection metadata component that specifies the name of the column that stores the creation time stamp of the document. This time stamp is generated during the insert
, insertAndGet
, save
, or saveAndGet
operation.
Property | Value |
---|---|
Default value |
|
Allowed values |
Valid Oracle quoted identifierFootref 1 (as defined in Oracle Database SQL Language Reference). If this value contains double quotation marks ( |
JSON collection metadata document path |
|
7.20 Media Type Column Name
The collection metadata component that specifies the name of the column that stores the media type of the document. A media type column is needed if the collection is to be heterogeneous, that is, it can store documents other than JavaScript Object Notation (JSON).
Note:
You cannot use query-by-example (QBE) with a heterogeneous collection. An error is raised if you try to do so.
Property | Value |
---|---|
Default value |
None |
Allowed values |
Valid Oracle quoted identifierFootref 1 (as defined in Oracle Database SQL Language Reference). If this value contains double quotation marks ( |
JSON collection metadata document path |
|
7.21 Read Only
The collection metadata component that specifies whether the collection is read-only.
Property | Value |
---|---|
Default value |
|
Allowed values |
|
JSON collection metadata document path |
|
Footnote Legend
Footnote 1:Reminder: letter case is significant for a quoted SQL identifier; it is interpreted case-sensitively.