Oracle Database 23c JSON Relational Duality revolutionizes appdev by unifying the benefits of relational and document data models within a single database. The new feature that enables this capability is called JSON Relational Duality View (Will be simply referred below as Duality View).
With Duality View, while data gets stored in relational tables in a normalized way, it can be exposed to apps as JSON documents. Storing the data in relational tables delivers all the benefits of the relational model, whereas by exposing the same data as JSON documents, apps get schema flexibility and other benefits of the document model.
JSON Relational Duality helps to unify the benefits of both document and relational worlds. Developers now get the flexibility and data access benefits of the JSON document model, plus the storage efficiency and power of the relational model.
Using documents is not efficient for all use cases. Currently, if an organization stores data in a document database, they are forced to adapt various use cases even if using documents is not the most efficient way.
How JSON Relational Duality makes it flexible and efficient: Experience extreme flexibility in building apps using Duality view. Developers can access the same data relationally or as hierarchical documents based on their use case and are not forced into making compromises because of the limitations of the underlying database. Build document-centric apps on relational data or create SQL apps on documents.
Developers can manipulate documents realized by Duality Views using their favorite drivers, frameworks, tools, and development methods. They can operate on the same data as relational using standard SQL or as documents using standard document APIs:
Document database limits flexibility. When using a document database, developers are forced to use one hierarchy for various use cases. For example, using Orders hierarchy to build customer profiles or accessing customer data will be inefficient. Using one JSON hierarchy for all use cases makes appdev complex and impacts performance.
How JSON Relational Duality makes it easy: Developers can use the power of Duality view in defining multiple JSON Views across overlapping groups of tables. This flexible data modeling makes building multiple apps against the same data easy and efficient.
Document databases have an inherent problem that they keep their documents independent. They do not have a good mechanism to declare relationships between documents, leading to data duplication and inconsistencies. Duplicated data leads to higher maintenance costs, decision-making errors, and lost business opportunities.
JSON Relational Duality eliminates data duplication: Duality Views are fully ACID (atomicity, consistency, isolation, durability) transactions across multiple documents and tables. It eliminates data duplication, whereas consistency is maintained automatically.
Currently, app developers have to map between app-tier objects (used by programming languages) and relational tables. Developers assemble and modify data from several tables to implement a business use case. This is well-known in the industry as an object-relational impedance mismatch problem. The custom mapping between app-tier objects and relational tables makes app development more complex. In addition, since an operation on an app-tier object may lead to multiple access or update to participating tables, it also slows down performance.
Duality View eliminates the need for mapping objects to relational tables: It provides fully updateable JSON views over data. Apps can simply read a document, make necessary changes, and write the document back without worrying about underlying data structure, mapping, consistency, or performance tuning. Experience simplicity by retrieving and storing all the data needed for an app in a single database operation.
Traditional locks don’t work well for modern apps. A new lock-free concurrency control provided with Duality View helps support high concurrency updates, which also works efficiently for interactive applications since the data is not locked during human thinking time. Duality View also provides document-level serializability that helps to streamline concurrent updates to underlying tables. It automatically ensures consistency between document updates and direct updates to underlying tables — document APIs and SQL applications can update the same data concurrently.
Experience the benefit yourself: Try JSON Relational Duality using “Oracle Database 23c Free--Developer Release”
Oracle announced "Oracle Database 23c Free--Developer Release", allowing developers to start building apps using 23c features like JSON Relational Duality. We are making it easy for you to experience the power and flexibility of Duality View in building apps. We are providing well-documented and easy-to-learn tutorials on GitHub. You can download the tutorials and use them with “Oracle Database 23c Free--Developer Release”. In the tutorials, developers can use SQL, REST and Oracle Database API for MongoDB to try features, capabilities and examples related to Duality Views. We will also be providing LiveLabs to play with Duality Views in a ready-to-run environment - stay tuned.
Oracle Database 23c Free–Developer Release is the first release of the next-generation Oracle Database, allowing developers a head-start on building applications with innovative 23c features that simplify the development of modern data-driven apps. The entire feature set of Oracle Database 23c is planned to be generally available within the next 12 months.
Ranjan is a Product Management leader passionate about using strategy and innovation to address customer needs and solving business problems. He has 22 years of experience working in the Data and Analytics industry, especially with large enterprise customers. He joined Oracle in December 2020, where he works as Senior Director Product Management and manages Data and In-Memory products. In the past, he has built several Data and Analytics products and releases at Teradata. Ranjan has a Computer Science degree and an MBA degree from UCLA Anderson.