IP Library Granted Patent US 12,287,777
Granted Patent B2
US 12,287,777 · App. 17/966,730 · Granted Apr 29, 2025

Natively supporting JSON duality view in a database management system

Inventors: Zhen Hua Liu (San Mateo, CA); Juan R. Loaiza (Woodside, CA); Sundeep Abraham (Redwood City, CA); Shubha Bose (Foster City, CA); Hui Joe Chang (San Jose, CA); Shashank Gugnani (Foster City, CA); Beda Christoph Hammerschmidt (Palo Alto, CA); Tirthankar Lahiri (Palo Alto, CA); Ying Lu (Sunnyvale, CA); Douglas James McMahon (Redwood City, CA); Aurosish Mishra (Foster City, CA); Ajit Mylavarapu (Mountain View, CA); Sukhada Pendse (Foster City, CA); Ananth Raghavan (San Francisco, CA)
Assignee: ORACLE INTERNATIONAL CORPORATION
G06F16/2379G06F16/24568
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,287,777
App. No.
17/966,730
Granted
Apr 29, 2025
Kind
B2
Abstract

JSON Duality Views are object views that return JDV objects. JDV objects are virtual because they are not stored in a database as JSON objects. Rather, JDV objects are stored in shredded form across tables and table attributes (e.g. columns) and returned by a DBMS in response to database commands that request a JDV object from a JSON Duality View. Through JSON Duality Views, changes to the state of a JDV object may be specified at the level of a JDV object. JDV objects are updated in a database using optimistic lock.

Claims (76)

1. A method comprising:

executing a database transaction, wherein executing a database transaction includes:

a database management system (DBMS) receiving a request to change a JavaScript Object Notation (JSON) object in a JSON object view comprising a JSON DUALITY VIEW, said JSON DUALITY VIEW defining an object schema for a JSON object in said JSON DUALITY VIEW, said DUALITY VIEW mapping base attributes of a plurality of base tables to fields of said object schema, said request specifying a change to at least one field of said JSON object;

generating a derived set of derived records derived from said JSON object according to said JSON DUALITY VIEW mapping said base attributes of said plurality of base tables to said fields of said object schema;

comparing said derived set of derived records to one or more base records stored in said plurality of base tables of a database;

based on said comparing of said derived set of derived records to said one or more base records, determining that one or more changes to said JSON object represent an update to one or more attributes of said one or more base records stored in said plurality of base tables of said database;

executing one or more change operations to make said one or more changes to said one or more base records; and

committing said one or more changes.

2. The method of claim 1 , wherein determining that one or more changes to said JSON object represent an update includes:

retrieving from said plurality of base tables a base set of base records, each base record of said base record being a version of a respective derived record from said derived set.

3. The method of claim 2 , wherein determining that one or more changes to said JSON object represent an update includes comparing said derived set to said base set to determine that a plurality of derived records represents a change to a respective base record of said base set of base records.

4. The method of claim 1 , wherein said plurality of base tab les include a parent table and child table that have 1-to-N relationship based on a primary key in said parent table and a foreign key in said child table, wherein said one or more change operations include an update to said child table.

5. The method of claim 1 ,

wherein said object schema defines an object hierarchy comprising a first level and a second level;

wherein said object schema defines an object field that corresponds to said first level and a plurality of child fields of said object field that correspond to said second level;

wherein said plurality of base tables include a parent table and a child table of said parent table;

wherein said JSON DUALITY VIEW maps said child table as a base table for said child fields based on a primary key of said child table and a foreign key of said parent table;

wherein said one or more changes update a record in said child table.

6. The method of claim 1 ,

wherein said object schema defines an object hierarchy comprising a first level and a second level;

wherein said object schema defines an array field that corresponds to said first level and a plurality of child fields that correspond to said second level;

wherein said plurality of base tables include a parent table and a child table of said parent table;

wherein said JSON DUALITY VIEW maps said child table as a base table for said child fields based on a foreign key of said child table and a primary key of said parent table;

wherein said one or more changes update a record in said child table.

7. The method of claim 1 ,

wherein said JSON DUALITY VIEW identifies a change permission to update a base table of said plurality of base tables;

wherein said one or more updates include a particular update to an attribute of a record in said base table;

wherein executing the database transaction further includes determining that said change permission permits said particular update.

8. The method of claim 1 ,

wherein said JSON DUALITY VIEW identifies a change permission to update a particular attribute of a base table of said plurality of base tables;

wherein said one or more changes include a particular update to an attribute of a record in said base table; and

wherein executing the database transaction further includes determining that said change permission permits said particular update.

9. The method of claim 1 ,

wherein said one or more attributes are one or more columns stored in a relational DBMS, or

wherein said one or more attributes are one or more fields of JSON objects stored in document storage system.

10. The method of claim 1 , further comprising:

generating a delta record set based at least in part on said comparing of said derived set of derived records to said one or more base records, said delta record set representing one or more differences between the derived set of derived records,

wherein said determining that said one or more changes to said JSON object represent said update to said one or more attributes of said one or more base records is further based at least in part on said delta record set.

11. One or more non-transitory computer-readable media storing one or more sequences of instructions that, when executed by computing devices, cause:

executing a database transaction, wherein executing a database transaction includes:

a database management system (DBMS) receiving a request to change a JavaScript Object Notation (JSON) object in a JSON object view comprising a JSON DUALITY VIEW, said JSON Duality View defining an object schema for a JSON object in said JSON DUALITY VIEW, said JSON DUALITY VIEW mapping base attributes of a plurality of base tables to fields of said object schema, said request specifying a change to at least one field of said JSON object;

generating a derived set of derived records derived from said JSON object according to said JSON DUALITY VIEW mapping said base attributes of said plurality of base tables to said fields of said object schema;

comparing said derived set of derived records to one or more base records stored in said plurality of base tables of a database;

based on said comparing of said derived set of derived records to said one or more base records, determining that one or more changes to said JSON object represent an update to one or more attributes of said one or more base records stored in said plurality of base tables of said database;

executing one or more change operations to make said one or more changes to said one or more base records; and

committing said one or more changes.

12. The one or more non-transitory computer-readable media of claim 11 , wherein determining that one or more changes to said JSON object represent an update includes:

retrieving from said plurality of base tables a base set of base records, each base record of said base record being a version of a respective derived record from said derived set.

13. The one or more non-transitory computer-readable media of claim 12 , wherein determining that one or more changes to said JSON object represent an update includes comparing said derived set to said base set to determine that a plurality of derived records represents a change to a respective base record of said base set of base records.

14. The one or more non-transitory computer-readable media of claim 11 , wherein said plurality of base tables include a parent table and child table that have 11-to-N relationship based on a primary key in said parent table and a foreign key in said child table, wherein said one or more change operations include an update to said child table.

15. The one or more non-transitory computer-readable media of claim 11 ,

wherein said object schema defines an object hierarchy comprising a first level and a second level;

wherein said object schema defines an object field that corresponds to said first level and a plurality of child fields of said object field that correspond to said second level;

wherein said plurality of base tables include a parent table and a child table of said parent table;

wherein said JSON DUALITY VIEW maps said child table as a base table for said child fields based on a primary key of said child table and a foreign key of said parent table;

wherein said one or more changes update a record in said child table.

16. The one or more non-transitory computer-readable media of claim 11 ,

wherein said object schema defines an object hierarchy comprising a first level and a second level;

wherein said object schema defines an array field that corresponds to said first level and a plurality of child fields that correspond to said second level;

wherein said plurality of base tables include a parent table and a child table of said parent table;

wherein said JSON DUALITY VIEW maps said child table as a base table for said child fields based on a foreign key of said child table and a primary key of said parent table;

wherein said one or more changes update a record in said child table.

17. The one or more non-transitory computer-readable media of claim 11 ,

wherein said JSON DUALITY VIEW identifies a change permission to update a base table of said plurality of base tables;

wherein said one or more updates include a particular update to an attribute of a record in said base table;

wherein executing the database transaction further includes determining that said change permission permits said particular update.

18. The one or more non-transitory computer-readable media of claim 11 ,

wherein said JSON DUALITY VIEW identifies a change permission to update a particular attribute of a base table of said plurality of base tables;

wherein said one or more changes include a particular update to an attribute of a record in said base table; and

wherein executing the database transaction further includes determining that said change permission permits said particular update.

19. The one or more non-transitory computer-readable media of claim 11 ,

wherein said one or more attributes are one or more columns stored in a relational DBMS, or

wherein said one or more attributes are one or more fields of JSON objects stored in document storage system.

20. The one or more non-transitory computer-readable media of claim 11 , wherein said one or more sequences of instructions, when executed by said computing devices, further cause:

generating a delta record set based at least in part on said comparing of said derived set of derived records to said one or more base records, said delta record set representing one or more differences between the derived set of derived records,

wherein said determining that said one or more changes to said JSON object represent said update to said one or more attributes of said one or more base records is further based at least in part on said delta record set.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 12, 2023
From: LIU, ZHEN HUA; LOAIZA, JUAN R.; ABRAHAM, SUNDEEP; BOSE, SHUBHA; CHANG, HUI JOE; GUGNANI, SHASHANK; HAMMERSCHMIDT, BEDA CHRISTOPH; LAHIRI, TIRTHANKAR; LU, YING; MCMAHON, DOUGLAS DOUGLAS; MISHRA, AUROSISH; MYLAVARAPU, AJIT; PENDSE, SUKHADA; RAGHAVAN, ANANTH
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 065201/0530 →
Continuity (1)
Related Publication 20240126743A1 · Apr 18, 2024
References Cited (43)
US 6871204B2 · Krishnaprasad et al. · 2005 [cited by applicant]
US 7024425B2 · Krishnaprasad et al. · 2006 [cited by applicant]
US 10936559B1 · Jones · 2021 [cited by applicant]
US 11169985B2 · Innocenti · 2021 [cited by applicant]
US 11423001B2 · Liu · 2022 [cited by applicant]
US 11768834B1 · Amberden · 2023 [cited by applicant]
US 20060235837A1 · Chong · 2006 [cited by applicant]
US 20080172408A1 · Meliksetian · 2008 [cited by applicant]
US 20080320013A1 · Bireley · 2008 [cited by applicant]
US 20080320019A1 · Bireley · 2008 [cited by applicant]
US 20100161567A1 · Makela · 2010 [cited by applicant]
US 20100185869A1 · Moore · 2010 [cited by applicant]
US 20130117238A1 · Gower · 2013 [cited by applicant]
US 20130138695A1 · Stanev · 2013 [cited by applicant]
US 20140006342A1 · Love · 2014 [cited by applicant]
US 20140281748A1 · Ercegovac · 2014 [cited by applicant]
US 20160077853A1 · Feng · 2016 [cited by applicant]
US 20160253397A1 · Fryc · 2016 [cited by applicant]
US 20170153875A1 · Joglekar · 2017 [cited by applicant]
US 20170293697A1 · Youshi · 2017 [cited by applicant]
US 20180075091A1 · Weiss · 2018 [cited by applicant]
US 20180107501A1 · Roth · 2018 [cited by applicant]
US 20180150503A1 · Horii · 2018 [cited by applicant]
US 20180218019A1 · Libow · 2018 [cited by examiner]
US 20180260428A1 · Patel · 2018 [cited by applicant]
US 20190065552A1 · Brantner · 2019 [cited by applicant]
US 20190102389A1 · LeGault · 2019 [cited by examiner]
US 20190265982A1 · Mickelsson · 2019 [cited by applicant]
US 20190318272A1 · Sassin · 2019 [cited by applicant]
US 20190370373A1 · Hammerschmidt · 2019 [cited by applicant]
US 20190384571A1 · Oberbreckling · 2019 [cited by applicant]
US 20200201964A1 · Nandakumar et al. · 2020 [cited by applicant]
US 20200294633A1 · Namboodiri et al. · 2020 [cited by applicant]
US 20200394542A1 · Buesser · 2020 [cited by applicant]
US 20210081389A1 · Liu · 2021 [cited by applicant]
US 20210174006A1 · Stokes · 2021 [cited by examiner]
US 20230033054A1 · Schlueter · 2023 [cited by applicant]
WO WO2019068014 · 2019 [cited by applicant]
Barsalou, Thierry, et al., “Updating Relational Databases through Object-Based Views”, ACM SIGMOD Record vol. 20, No. 2, Jun. 1991, pp. 248-257, https://doi.org/10.1145/119995.115831, published Apr. 1, 1991, 14pgs. [cited by applicant]
Current Claims, in International Application No. PCT/US2023/035029, dated Feb. 7, 3 pages. [cited by applicant]
Chasseur et al., “Enabling JSON Document Stores in Relational Systems”, WEBDB 2013 New York, New York USA, Jun. 23, 2013, 18 pages. [cited by applicant]
Liu, U.S. Appl. No. 17/966,736, filed Oct. 14, 2022, Non-Final Rejection, Jan. 22, 2024. [cited by applicant]
JSON Data Management—Supporting Schema-less Development in RDBMS (Year: 2014). [cited by applicant]