Oracle DBMS_SODA
Version 18.3.0.1

General Information
Library Note Morgan's Library Page Header
Coming to OpenWorld 2018? Be sure to visit the TidalScale booth in Moscone South and learn how to solve performance problems and lower costs with Software Defined Servers. Before you visit the booth, or if you can't make it this year, check out TidalScale at www.tidalscale.com. Be sure to click on the Solutions link and look through the Oracle resources.
Purpose This package is a PL/SQL package implementing Simple Oracle Document Access (SODA). SODA allows you to use the Oracle Database as a NoSQL document store. The core abstraction provided by SODA is that of document collections. The DBMS_SODA package allows you to create, list, and delete document collections from PL/SQL, and to perform CRUD (create, replace, update, delete) operations on documents. All DDL functions are encapsulated within this package.
AUTHID CURRENT_USER
Constants
Name Data Type Value
Content Types
DOC_VARCHAR2 PLS_INTEGER 1
DOC_BLOB PLS_INTEGER 2
DOC_CLOB PLS_INTEGER 3
Collection Create Modes
CREATE_MODE_DDL PLS_INTEGER 1
CREATE_MODE_MAP PLS_INTEGER 2
Data Types TYPE soda_collection_t ...;

TYPE soda_collName_list_t ...;
Dependencies
DBMS_SODA_LIB JSON$USER_COLLECTION_METADATA SODA_COLLECTION_T
DBMS_SODA_UTIL PLITBLM SODA_COLLNAME_LIST_T
Documented Yes
First Available 18.1.0.0
Security Model Owned by SYS with EXECUTE granted to PUBLIC

The Library's recommendation is that you revoke EXECUTE from PUBLIC. Everybody with a valid userID does not need to be able to drop collections.
Source {ORACLE_HOME}/rdbms/admin/dbms
Subprograms
 
CREATE_COLLECTION (new 18.1)
Creates a collection using the collection name and metadata dbms_soda.create_collection(
collection_name IN NVARCHAR2,
metadata        IN VARCHAR2    DEFAULT NULL,
create_mode     IN PLS_INTEGER DEFAULT CREATE_MODE_DDL)
RETURN soda_collection_t;
DECLARE
 retVal soda_collection_t;
BEGIN
  dbms_soda.create_collection('UWCOLLECTION');
END;
/
 
DROP_COLLECTION (new 18.1)
Drops a collection dbms_soda.drop_collection(collection_name IN NVARCHAR2) RETURN NUMBER;
DECLARE
 retVal NUMBER;
BEGIN
  retVal := dbms_soda.drop_collection('UWCOLLECTION');
  dbms_output.put_line(TO_CHAR(retVal);
END;
/
 
LIST_COLLECTION_NAMES (new 18.1)
Lists the collection names in the user's schema dbms_soda.list_collection_names RETURN soda_collName_list_t;
DECLARE
 retVal soda_collName_list_t;
BEGIN
  retVal := dbms_soda.list_collection_names;
END;
/
 
OPEN_COLLECTION (new 18.1)
Opens a collection dbms_soda.open_collection(collection_name IN NVARCHAR2) RETURN soda_collection_t;
DECLARE
 retVal soda_collection_t;
BEGIN
  retVal := dbms_soda.open_collection;('UWCOLLECTION');
END;
/

Related Topics
Built-in Functions
Built-in Packages
DBMS_SODA_ADMIN
DBMS_SODA_DML
DBMS_SODA_DOM
DBMS_SODA_UTIL
SODA for PL/SQL
What's New In 12cR2
What's New In 18cR3

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2017 Daniel A. Morgan All Rights Reserved