Reading and Writing Records

Reading Records in Oracle NoSQL Database is as basic as an Select Statement in Relational Database while Writing Records in Oracle NoSQL Database is as basic as an Insert statement in a Relational Database.

  • The task of inserting or writing data into the key-value store starts from building the key itself. Basically a key consists of two parts :

a. Major Key Component  РHas to be a non-null single string or can have multiple parts.

b. Minor Key Component – Can be null or can have one or more parts.

  • For writing records in NoSQL Database there are various API functionality which includes :

a. Vanillaput – It is the easiest form of inserting records which takes simply a key and a value.

b. putIfAbsent – It will insert a key-value pair into Oracle NoSQL only if the key does not already exist in the store.

c. putIfPresent – It is a check to ensure that the key exists before inserting the value into the store.

  • For reading records in NoSQL Database following methods can be applied :

a. Simple Get Method – It reads single records from the key-value store.

b. MultiGet Method – It reads multiple data from key-value store against a single value.

c. StoreIterator – It is used in the code to read all records from the key-value store.

Leave A Reply

Your email address will not be published. Required fields are marked *