GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - oracle/soda-for-java: SODA (Simple Oracle Document Access) for Java is an Oracle library for writing Java apps that work with JSON (and not only JSON!) in the Oracle Database. SODA allows your Java app to use the Oracle Database as a NoSQL document store.

BranchesTags
Open more actions menu

Latest commit

 

History

267 Commits
267 Commits

Folders and files

NameName
Last commit message
Last commit date
doc
doc
 
 
lib
lib
 
 
orajsoda
orajsoda
 
 
test
test
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
THIRD_PARTY_LICENSES.txt
THIRD_PARTY_LICENSES.txt
 
 
pom.xml
pom.xml
 
 

Repository files navigation

SODA 1.1.29

Simple Oracle Document Access (SODA) is an API which allows you to use the Oracle Database as a NoSQL JSON document store. Although SODA is particularly powerful when it comes to JSON data, data of any other type is supported as well.

With the SODA architecture, your data is stored as documents, and documents are organized into collections. Each document contains the actual data, as well as additional information automatically maintained by SODA, such as unique key, last-modified timestamp, version, type, etc. SODA lets you create and store such collections of documents in the Oracle Database, and perform create, retrive, update, and delete (CRUD) operations on these documents, without needing to know Structured Query Language (SQL), or JDBC, or how the data is stored in the database. Essentially SODA provides a virtual NoSQL document store on top of your Oracle Database. Under the covers, a collection is stored as a regular Oracle Database table, and each document is stored as a row in the table. SQL access to the table using standard tools is still allowed.

SODA for Java supports:

  • CRUD operations on documents containing data of any type using unique document keys
  • CRUD operations on documents containing JSON data using QBEs (simple pattern-like queries-by-example expressed in JSON), or unique document keys
  • Bulk read/write operations
  • Optimistic and pessimistic locking
  • Transactions
  • Document collections backed by Oracle Database tables or views
  • Mapping of existing Oracle Database tables or views as document collections

SODA for Java is stable, well-documented, and has a comprehensive test suite. We are actively working on adding new features as well.

SODA for Java is built on top of native JSON support in the Oracle Database.

This is an open source project maintained by Oracle Corp.

See the Oracle as a Document Store page on the Oracle Technology Network for more info.

Getting started

To obtain the latest SODA jar and its dependencies, use these Maven coordinates:

Group id: com.oracle.database.soda
Artifact id: orajsoda
Version: 1.1.29

The following short code snippet illustrates working with SODA. It shows how to create a document collection, insert a document into it, and query the collection by using a unique document key and a QBE (query-by-example).

// Get an OracleRDBMSClient - starting point of SODA for Java application.
OracleRDBMSClient cl = new OracleRDBMSClient();

// Get a database.
OracleDatabase db = cl.getDatabase(conn);

// Create a collection with the name "MyJSONCollection".
OracleCollection col = db.admin().createCollection("MyJSONCollection");

// Create a JSON document.
OracleDocument doc =
  db.createDocumentFromString("{ \"name\" : \"Alexander\" }");

// Insert the document into a collection, and get back its
// auto-generated key.
String k = col.insertAndGet(doc).getKey();

// Find a document by its key. The following line
// fetches the inserted document from the collection
// by its unique key, and prints out the document's content
System.out.println ("Inserted content:" + 
                    col.find().key(k).getOne().getContentAsString());
                    
// Find all documents in the collection matching a query-by-example (QBE).
// The following lines find all JSON documents in the collection that have 
// a field "name" that starts with "A".
OracleDocument f = db.createDocumentFromString("{\"name\" : { \"$startsWith\" : \"A\" }}");
                       
OracleCursor c = col.find().filter(f).getCursor();

while (c.hasNext())
{
    // Get the next document.
    OracleDocument resultDoc = c.next();

    // Print the document key and content.
    System.out.println ("Key:         " + resultDoc.getKey());
    System.out.println ("Content:     " + resultDoc.getContentAsString());
}

Note that there's no SQL or JDBC programming required. Under the covers, SODA for Java transparently converts operations on document collections into SQL and executes it over JDBC.

See Getting Started with SODA for Java for a complete introductory example.

Documentation

  • Introduction to SODA. This book covers subjects common to all SODA impls, such as QBEs and indexing.
  • SODA Java documentation is located here.

The Javadoc is located here.

Build

SODA for Java source code is built with Maven. See Building the source code for details.

SODA for Java comes with a testsuite, built with JUnit and driven by Ant. See Building and running the tests for details.

Contributing

This project welcomes contributions from the community. Before submitting a pull request, please review our contribution guide

Security

Please consult the security guide for our responsible security vulnerability disclosure process

License

Copyright (c) 2015, 2023 Oracle and/or its affiliates.

Getting in touch

Please open an issue here, or post to the ORDS, SODA, and JSON in the database forum with SODA-FOR-JAVA in the subject line.

About

SODA (Simple Oracle Document Access) for Java is an Oracle library for writing Java apps that work with JSON (and not only JSON!) in the Oracle Database. SODA allows your Java app to use the Oracle Database as a NoSQL document store.

www.oracle.com/technetwork/database/application-development/oracle-document-store/index.html

Topics

crudfulltext-searchjavajdbcjsonjson-datano-sqlnosqlnosql-databaseoracle-databasepersistencerestsodasqltext-search

Resources

Readme
License

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

74 stars

Watchers

16 watching

Forks

23 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.