1 SODA for REST Overview

SODA for REST uses the representational state transfer (REST) architectural style to implement Simple Oracle Document Access (SODA). You can use this API to perform create, read, update, and delete (CRUD) operations on documents of any kind, and you can use it to query JSON documents.

Your application can use the API operations to create and manipulate JSON objects that it uses to persist application objects and state. To generate the JSON documents, your application can use JSON serialization techniques. When your application retrieves a document object, a JSON parser converts it to an application object.

SODA is a set of NoSQL-style APIs that let you create and store collections of documents in Oracle Database, retrieve them, and query them, without needing to know Structured Query Language (SQL) or how the data in the documents is stored in the database.

In the context of SODA for REST, a document in a collection is sometimes called an object. Typically it is a JSON document, but it can instead be a Multipurpose Internet Mail Extensions (MIME) type — image, audio, or video, for example. An application often uses a given collection to hold instances of a particular type of document. A SODA collection is thus roughly analogous to a table in a relational database: one database column stores document keys, and another column stores document content.

Familiarity with the following can help you take advantage of the information presented here:

  • Oracle Database relational database management system (RDBMS)

  • JavaScript Object Notation (JSON)

  • Hypertext Transfer Protocol (HTTP)

The remaining topics of this document describe various features of SODA for REST.

Note:

This book provides information about using SODA with REST applications. To use SODA for REST you also need to understand SODA generally. For such general information, please consult Oracle Database Introduction to Simple Oracle Document Access (SODA).

See Also:

1.1 Overview of the Representational State Transfer (REST) Architectural Style

The REST architectural style was used to define HTTP 1.1 and Uniform Resource Identifiers (URIs). A REST-based API strongly resembles the basic functionality provided by an HTTP server, and most REST-based systems are implemented using an HTTP client and an HTTP server.

A typical REST implementation maps create, read, update, and delete (CRUD) operations to HTTP verbs POST, GET, PUT, and DELETE, respectively.

A key characteristic of a REST-based system is that it is stateless: the server does not track or manage client object state. Each operation performed against a REST-based server is atomic; it is considered a transaction in its own right. In a typical REST-based system, many facilities that are taken for granted in an RDBMS environment, such as locking and concurrency control, are left to the application to manage.

A main advantage of a REST-based system is that its services can be used from almost any modern programming platform, including traditional programming languages (such as C, C#, C++, JAVA, and PL/SQL) and modern scripting languages (such as JavaScript, Perl, Python, and Ruby).

See Also:

Principled Design of the Modern Web Architecture, by Roy T. Fielding and Richard N. Taylor