To assists the Application developers, Oracle NoSQL Database provides extensive support of API and drivers in various programming languages such as C, Java, Python and NodeJs and RESTful API. The below section describes the CRUD APIs with java

CRUD Operations in Java


Using Java API that are shipped with the product Application developers can access the data in the Oracle NoSQL Database. There are two different programming paradigms or interface that you can use to write your Oracle NoSQL Database applications.


·         Tables API


TableAPI is a handle for the table interface to an Oracle NoSQL store. Tables are an independent layer implemented on top of the key/value interface. While the two interfaces are not incompatible, in general applications will use one or the other. To create a TableAPI instance use getTableAPI(). The table interface is required to use secondary indexes and supported data types.


Tables are similar to tables in a relational database. They are named and contain a set of strongly typed records, called rows. Rows in an Oracle NoSQL Database table are analogous to rows in a relational system and each row has one or more named, typed data values. These fields can be compared to a relational database column. A single top-level row in a table is contained in a Row object. Row is used as return value for TableAPI get operations as well as a key plus value object for TableAPI put operations. All rows in a given table have the same fields. Tables have a well-defined primary key which comprises one or more of its fields, in order. Primary key fields must be simple (single-valued) data types. To Read more about the supported data types, operations and other methods in the Table API read the guide


·         Key/Value pair API or the KVStore


KVStore is the handle to a store that is running remotely. To create a connection to a store, request a KVStore instance from KVStoreFactory.getStore ().  A handle has thread, memory and network resources associated with it. Consequently, the close() method must be invoked to free up the resources when the application is done using the KVStore.


To minimize resource allocation and deallocation overheads, it's best to avoid repeated creation and closing of handles to the same store. For example, creating and closing a handle around each KVStore operation, would incur large resource allocation overheads resulting in poor application performance. To Read more about the key/value pair API read the guide


If you need to use like secondary indexing, we recommend using the tables API because it that do no appear in the key/value pair API.

Data create and update operations are provided by several put methods:  

  • putIfAbsent method implements creation.
  • putIfPresent method implements update.
  • putIfVersion method that allows applications to implement consistent read modify-write semantics.
  • put method does both: adding the new key/value pair if the key is not currently present in the database or updating the value if the key does exist. 

The delete and deleteIfVersion methods unconditionally and conditionally remove key/value pairs from the database, respectively. Just as putIfVersion ensures read-modify-write semantics, deleteIfVersion provides deletion of a specific version. 

Data fetch operations are provided by several get methods: 

  • get method implements retrieval of a single record at a time.
  • multiGet method implements retrieval of multiple records at once, so long as they all share the same major path components.


In addition to basic CRUD operations, Oracle NoSQL Database supports two types of iteration: unordered iteration over records and ordered iteration within a Major Key set. The API supports both individual key/value returns using several storeIterator methods and bulk key/value returns within a Major Key Path via the various multiGetIterator methods.

Bulk Operations

In addition to providing single-record operations, Oracle NoSQL Database supports the ability to bundle a collection of operations together using the execute method, providing transactional semantics across multiple updates on records with the same Major Key Path.


CRUD using RESTful API

Starting with release support for RESTful API has been added using Oracle REST Data Services. This allows exposing Oracle NoSQL Database tables as REST API endpoints. The data stored in the tables can be created, queried, updated and deleted using REST.

Oracle REST Data Services can provide HTTP-based REST service access to Oracle NoSQL Database, through operations on the NoSQL data and metadata. Data access consists of CRUD (create, read, update, delete) operations on NoSQL tables:

  • Create: HTTP POST and PUT to provide services to create row data.
  • Read: HTTP GET to provide key, partial key, and field range queries on row data, with directives for consistency and order.
  • Update: HTTP PUT to provide services to update row data.
  • Delete: HTTP DELETE to provide services to delete row data.

Metadata access consists of HTTP GET to provide services to read NoSQL metadata. To find out more details please read the guide


Starting with release support for Javascript driver (compatible with Node.js 0.10.26) have been added. To work, the Javascript driver requires use of a proxy server which translates network activity between the Javascript client and the Oracle NoSQL Database store. The proxy is written in Java, and can run on any machine that is network accessible by both your Javascript client code and the Oracle NoSQL Database store. However, for performance and security reasons, Oracle recommends that you run the proxy on the same local host as your driver, and that the proxy be used in a 1:1 configuration with your drivers (that is, each instance of the proxy should be used with just a single driver instance). Refer to the guide to understand the details along with examples on how to connect to the kvstore, create table and indexes, and write to the table rows. The Node.js driver is available at npm. For the API reference, the guide is available here


Similar to javascript, the python support was added in the release Refer to the Python guide to understand the details along with examples on how to connect to kvstore, create table, indexes and perform update and delete operations. You need the python client module nosqldb.py to access Oracle NoSQL Database stores. The module can be downloaded from Python Software Foundation.

Refer the API guide to understand various operations for Reads, Writes, Consistency and Durability.