IP Library › Granted Patent US 12,681,907
Granted Patent B2
US 12,681,907 · App. 17/966,714 · Granted Jul 14, 2026

Techniques for comprehensively supporting JSON schema in a RDBMS

Inventors: Zhen Hua Liu (San Mateo, CA); Srikrishnan Suresh (Belmont, CA); Beda Christoph Hammerschmidt (Palo Alto, CA); Joshua Spiegel (St. Louis, MO); Douglas James McMahon (Redwood City, CA)
Assignee: Oracle International Corporation
G06F16/212G06F16/24534G06F16/86
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,681,907
App. No.
17/966,714
Filed
Oct 14, 2022
Granted
Jul 14, 2026
Kind
B2
Art Unit
2156
USPC
707/756
Abstract

JSON schemas are implemented efficiently within a DBMS. Through these techniques, the power and benefit of schema-based paradigm are realized in a more cost-effective manner in terms of computer system performance. JSON schema-based techniques described herein improve execution efficiency of database statements that access JSON objects and improve software development productivity.

Claims (38)

1 . A method, comprising:

a database management system (DBMS) receiving one or more data definition language (DDL) statements defining a JavaScript Object Notation (JSON) schema for a JSON column of a database table, said JSON schema defining a plurality of JSON fields for a JSON object, and said JSON schema declaring a first field of said plurality of JSON fields as a native database data type of said DBMS, wherein said native database data type is assignable to columns of database tables of said DBMS, and said native database data type is recognized as a valid data type of the DBMS without the native database data type being defined in a database dictionary of the DBMS;

said DBMS receiving a first data manipulation language (DML) statement specifying to insert a particular JSON object into said JSON column; and

in response to receiving the first DML statement:

determining that a field value for said first field in said particular JSON object conforms to said native database data type; and

inserting said particular JSON object in said JSON column.

2 . The method of claim 1 , the method further including storing said field value in said particular JSON object in a data type storage format of said native database data type.

3 . The method of claim 2 , wherein said JSON schema specifies to store said field value in the data type storage format of said native database data type.

4 . The method of claim 1 , wherein the method further includes rewriting said first DML statement based on said JSON schema.

5 . The method of claim 4 , wherein rewriting said first DML statement includes replacing an existing JSON operator with said JSON operator.

6 . The method of claim 1 , wherein the method further includes compiling said first DML statement.

7 . The method of claim 1 , wherein compiling said first DML statement includes detecting that the JSON schema is defined for the JSON column.

8 . The method of claim 1 , wherein compiling said first DML statement includes determining that said first DML statement specifies changes that comply with said JSON schema.

9 . The method of claim 1 , wherein the method further includes compiling said first DML statement, wherein compiling said first DML statement includes detecting schema-determinable errors either in a path expression or dot notation.

10 . The method of claim 1 , wherein said one or more DDL statements include no key value-pairs specifying properties of any fields of said JSON schema.

11 . The method of claim 1 , wherein said JSON schema declares a field of said JSON schema as a SQL domain type, wherein the method further includes receiving a DDL statement defining said SQL domain type based on a native data type.

12 . The method of claim 1 , the method further including:

said DBMS receiving an invocation of a function that requests a description of said JSON schema for said JSON column; and

in response to said DBMS receiving an invocation of a function, generating output describing said JSON schema.

13 . One or more non-transitory storage media storing instructions that, when executed by one or more computing devices, cause performance of:

a database management system (DBMS) receiving one or more data definition language (DDL) statements defining a JavaScript Object Notation (JSON) schema for a JSON column of a database table, said JSON schema defining a plurality of JSON fields for a JSON object, and said JSON schema declaring a first field of said plurality of JSON fields as a native database data type of said DBMS, wherein said native database data type is assignable to columns of database tables of said DBMS, and said native database data type is recognized as a valid data type of the DBMS without the native database data type being defined in a database dictionary of the DBMS;

said DBMS receiving a first data manipulation language (DML) statement specifying to insert a particular JSON object into said JSON column; and

in response to receiving the first DML statement:

determining that a field value for said first field in said particular JSON object conforms to said native database data type; and

inserting said particular JSON object in said JSON column.

14 . The one or more non-transitory storage media of claim 13 , the instructions further including instructions that, when executed by one or more computing devices, cause performance of storing said field value in said particular JSON object in a data type storage format of said native database data type.

15 . The one or more non-transitory storage media of claim 14 , wherein said JSON schema specifies to store said field value in the data type storage format of said native database data type.

16 . The one or more non-transitory storage media of claim 13 , wherein the instructions further including instructions that, when executed by one or more computing devices, cause performance of rewriting said first DML statement based on said JSON schema.

17 . The one or more non-transitory storage media of claim 16 , wherein rewriting said first DML statement includes replacing an existing JSON operator with said JSON operator.

18 . The one or more non-transitory storage media of claim 13 , the instructions further including instructions that, when executed by one or more computing devices, cause performance of compiling said first DML statement.

19 . The one or more non-transitory storage media of claim 13 , wherein compiling said first DML statement includes detecting that the JSON schema is defined for the JSON column.

20 . The one or more non-transitory storage media of claim 13 , wherein compiling said first DML statement includes determining that said first DML statement specifies changes that comply with said JSON schema.

21 . The one or more non-transitory storage media of claim 13 , the instructions further including instructions that, when executed by one or more computing devices, cause performance of compiling said first DML statement, wherein compiling said first DML statement includes detecting schema-determinable errors either in a path expression or dot notation.

22 . The one or more non-transitory storage media of claim 13 , wherein said one or more DDL statements include no key value-pairs specifying properties of any fields of said JSON schema.

23 . The one or more non-transitory storage media of claim 13 , wherein said JSON schema declares a field of said JSON schema as a SQL domain type, wherein the instructions further include instructions that, when executed by one or more computing devices, cause performance of receiving a DDL statement defining said SQL domain type based on a native data type.

24 . The one or more non-transitory storage media of claim 13 , the instructions further including instructions that, when executed by one or more computing devices, cause performance of:

said DBMS receiving an invocation of a function that requests a description of said JSON schema for said JSON column; and

in response to said DBMS receiving an invocation of a function, generating output describing said JSON schema.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 15, 2022
From: LIU, ZHEN HUA; SURESH, SRIKRISHNAN; HAMMERSCHMIDT, BEDA CHRISTOPH; SPIEGEL, JOSHUA; MCMAHON, DOUGLAS JAMES
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 062109/0219 →
Continuity (1)
Related Publication 20240126726A1 · Apr 18, 2024
References Cited (29)
US 7865823B2 · Matheson · 2011 [cited by applicant]
US 8719270B2 · Agarwal · 2014 [cited by applicant]
US 8838626B2 · Yu · 2014 [cited by applicant]
US 9087140B2 · Chamarthy · 2015 [cited by applicant]
US 10437564B1 · Periwal · 2019 [cited by applicant]
US 10791195B2 · Chen · 2020 [cited by applicant]
US 11423001B2 · Liu et al. · 2022 [cited by applicant]
US 20040006744A1 · Jones · 2004 [cited by applicant]
US 20040064466A1 · Manikutty · 2004 [cited by applicant]
US 20090006943A1 · Matheson · 2009 [cited by applicant]
US 20130185251A1 · Garg · 2013 [cited by applicant]
US 20130191509A1 · Loughry · 2013 [cited by examiner]
US 20140067866A1 · Chen · 2014 [cited by applicant]
US 20150371018A1 · Ahmed · 2015 [cited by examiner]
US 20180246984A1 · Kamiya · 2018 [cited by applicant]
US 20190102389A1 · Legault · 2019 [cited by applicant]
US 20190188288A1 · Holm · 2019 [cited by examiner]
US 20190265982A1 · Mickelsson · 2019 [cited by applicant]
US 20200012647A1 · Johnson, III · 2020 [cited by examiner]
US 20230222104A1 · Filho · 2023 [cited by applicant]
US 20230385133A1 · Lasky · 2023 [cited by applicant]
DigitalOcean How To Work with JSON in MySQL Sep. 21, 2020. https://www.digitalocean.com/community/tutorials/working-with-json-in-mysql (Year: 2020). [cited by examiner]
How To Work with JSON in MySQL. [cited by examiner]
DigitalOcean How To Work with JSON in MySQL Sep. 21, 2020 and Oct. 24, 2020 https://www.digitalocean.com/community/tutorials/working-with-json-in-mysql (Year: 2020). [cited by examiner]
Oracle® Database, “JSON Developer's Guide”, 2015, 320 pages. [cited by applicant]
Liu, Zhen Hua, et al., “JSON Data Management—Supporting Schema-less Development in RDBMS”, Sigmod '14, http://dx.doi.org/10.1145/2588555.2595628, Jan. 1, 2014, 12pgs. [cited by applicant]
Current Claims, in International Application No. PCT/US2023/034900, dated Dec. 15, 2023, 3 pages. [cited by applicant]
Spoth et al., “Schemadrill: Interactive Semi-Structured Schema Design”, Proceedings of the 45th International ACM SIGIR Conference on Research and Development in Information, Jun. 10, 2018, 7 pages. [cited by applicant]
Wu et al., “A Hybrid Parallel Processing for XML Parsing and Schema Validation.” Presented at Ballisage: The Markup Conference 2008, Montreal, Canada, August Dec. 15, 2008. [cited by applicant]