8 Working with SODA Collections in MLE JavaScript Code
Simple Oracle Document Access (SODA) is a set of NoSQL-style APIs that let you create and store collections of documents (in particular JSON) in Oracle Database, retrieve them, and query them, without needing to know Structured Query Language (SQL) or how the documents are stored in the database.
SODA APIs exist for different programming languages and include support for MLE JavaScript. SODA APIs are document-centric. You can use any SODA implementation to perform create, read, update, and delete (CRUD) operations on documents of nearly any kind (including video, image, sound, and other binary content). You can also use any SODA implementation to query the content of JavaScript Object Notation (JSON) documents using pattern-matching: query-by-example (QBE). CRUD operations can be driven by document keys or by QBEs.
This chapter covers JavaScript in the database, based on Multilingual Engine (MLE) as opposed to the client-side
node-oracledb
driver. Whenever JavaScript is mentioned in this
chapter it implicitly refers to MLE JavaScript.
Note:
In order to use the MLE SODA API, theCOMPATIBLE
initialization
parameter must be set to 23.0.0
.
See Also:
Oracle Database Introduction to Simple Oracle Document Access (SODA) for a complete introduction to SODA
Topics
- High-Level Introduction to Working with SODA for In-Database JavaScript
The SODA API is part of the MLE JavaScript SQL driver. Interaction with collections and documents requires you to establish a connection with the database first, before a SODA database object can be obtained. - SODA Objects
Objects used with the SODA API. - Using SODA for In-Database JavaScript
How to access SODA for In-Database JavaScript is described, as well as how to use it to perform create, read (retrieve), update, and delete (CRUD) operations on collections.