Goal

Developer (Dev) and DBA (Ops) together must build a new web application for the recently-acquired coffee shops chain

 

Preconditions

- Oracle DB 12c as JSON document store.

 

Why JSON?

JSON supported by all Oracle features

- Analytics

- Encryption

- In-Memory

- RAC

- Parallel SQL

 

How is JSON stored?

- No special data type for JSON. It can be VARCHAR2, BLOB or CLOB.

- Add CONSTRAINT checks could validate the input document.

SQL> CREATE TABLE orders(order_details BLOB  
                            CONSTRAINT is_json 
                                 CHECK (order_details IS JSON)      );

 

Native SQL support for JSON

Screen Shot 2018-12-28 at 1.21.53 PM.png

 

Reference

https://www.nloug.nl/downloads/ogh20170615_m._colgan.pdf