Previous Next JavaScript must be enabled to correctly display this content

## Mapping of DynamoDB types to Oracle NoSQL types

The table below shows the mapping of DynamoDB types to Oracle NoSQL types.

Table 1-4 Mapping DynamoDB type to Oracle NoSQL type

# | DynamoDB type | JSON type for NoSQL JSON column | Oracle NoSQL type
--- | --- | --- | ---
1 | String (S) | JSON String | STRING
2 | Number Type (N) | JSON Number | INTEGER/LONG/FLOAT/DOUBLE/NUMBER
3 | Boolean (BOOL) | JSON Boolean | BOOLEAN
4 | Binary type (B) - Byte buffer | BASE-64 encoded JSON String | BINARY
5 | NULL | JSON null | NULL
6 | String Set (SS) | JSON Array of Strings | ARRAY(STRING)
7 | Number Set (NS) | JSON Array of Numbers | ARRAY(INTEGER/LONG/FLOAT/DOUBLE/NUMBER)
8 | Binary Set (BS) | JSON Array of Base-64 encoded Strings | ARRAY(BINARY)
9 | LIST (L) | Array of JSON | ARRAY(JSON)
10 | MAP (M) | JSON Object | JSON
11 | PARTITION KEY | NA | PRIMARY KEY and SHARD KEY
12 | SORT KEY | NA | PRIMARY KEY
13 | Attribute names with dash and dot | JSON field names with a underscore | Column names with underscore

Few additional points to consider while mapping DynamoDB types to Oracle NoSQL types:

- DynamoDB Supports only one data type for Numbers and can have up to 38 digits of precision,on contrast Oracle NoSQL supports many types to choose from based on the range and precision of the data.You can select the appropriate Number type that fits the range of your input data. If you are not sure of the nature of the data, NoSQL NUMBER type can be used.
- DynamoDB Supports only one data type for Numbers and can have up to 38 digits of precision,on contrast Oracle NoSQL supports many types to choose from based on the range and precision of the data.You can select the appropriate Number type that fits the range of your input data. If you are not sure of the nature of the data, NoSQL NUMBER type can be used.
- Partition key in DynamoDB has a limit of 2048 bytes but Oracle NoSQL Cloud Service has a limit of 64 bytes for the Primary key/Shard key.
- Sort key in DynamoDB has a limit of 1024 bytes but Oracle NoSQL Cloud Service has a limit of 64 bytes for the Primary key.
- Attribute names in DynamoDB can be 64KB long but Oracle NoSQL Cloud service column names have a limit of 64 characters.