IP Library Granted Patent US 12688186
Granted Patent B2
US 12688186 · App. 18/987,968 · Granted Jul 21, 2026

Effective and efficient support of JSON datatype comparison

Inventors: Zhen Hua Liu (San Mateo, CA); Douglas James McMahon (Redwood City, CA); Ying Lu (Sunnyvale, CA); Beda Christoph Hammerschmidt (Palo Alto, CA); Joshua Spiegel (St. Louis, MO); Hui Zhang (San Ramon, CA); Jose Luis Valera Lizarraga (Zapopan, MX)
Assignee: Oracle International Corporation
G06F16/2452G06F16/212G06F16/258
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 12688186
App. No.
18/987,968
Granted
Jul 21, 2026
Kind
B2
Abstract

Comparison and sorting of data stored according to a flexible schema data type is disclosed. A data object is accessed, the data object stored according to a set of one or more datatypes, wherein the set comprises a flexible schema datatype and data in the data object pertains to a plurality of domains. Data within the data object is translated to a sortable intermediate format that is configured to allow local ordering among elements in the respective plurality of domains while allowing global ordering among the plurality of domains based on a pre-selected convention. The translated data is stored in a storage system accessible by a database management system (DBMS). Structured query language (SQL) operations are performed on the stored translated data.

Claims (29)

1 . A method comprising:

accessing a data object stored according to a set of one or more datatypes, wherein the set comprises a flexible schema datatype and data in the data object pertains to a plurality of domains;

translating data within the data object stored according to the flexible schema datatype to a sortable intermediate format that is configured to allow local ordering among elements in the respective plurality of domains while allowing global ordering among the plurality of domains based on a pre-selected convention;

wherein the local ordering is based on a raw byte serialization of the data using a MEMCOMPARABLE (“MEMCOMP”) format to allow byte-by-byte comparisons between values depending on whether the first N characters of a first object are less than, equal to, or greater than the first N characters of a second object;

storing the translated data in a storage system accessible by a database management system (DBMS);

performing one or more structured query language (SQL) operations on the stored translated data; and

wherein the method is performed by one or more computing devices.

2 . The method of claim 1 wherein the flexible schema datatype comprises a JavaScript Object Notation (JSON)-compliant datatype.

3 . The method of claim 1 wherein the pre-selected convention comprises following a priority of: 1) scalar node; 2) object node; 3) array node.

4 . The method of claim 1 wherein the one or more SQL operations utilize the local ordering and the global ordering.

5 . The method of claim 1 wherein the local ordering is based on evaluation of each character based on its corresponding Unicode Transformation Format-8 (UTF-8) encoding.

6 . The method of claim 1 wherein storing the translated data in a storage system accessible by the DBMS comprises storing the translated data in a table in a database managed by the DBMS.

7 . The method of claim 6 wherein results from the one or more structured query language (SQL) operations on the stored translated data comprises at least query results from the translated data in the table in the database managed by the RDBMS.

8 . The method of claim 1 wherein the translating of the data stored according to the flexible schema datatype to the sortable intermediate format comprises performing a recursive translation of multiple objects according to the flexible schema datatype.

9 . The method of claim 1 , wherein the global ordering is based on assigning a predetermined byte code prefix for each of the plurality of domains.

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

accessing a data object stored according to a set of one or more datatypes, wherein the set comprises a flexible schema datatype and data in the data object pertains to a plurality of domains;

translating data within the data object stored according to the flexible schema datatype to a sortable intermediate format that is configured to allow local ordering among elements in the respective plurality of domains while allowing global ordering among the plurality of domains based on a pre-selected convention;

wherein the local ordering is based on a raw byte serialization of the data using a MEMCOMPARABLE (“MEMCOMP”) format to allow byte-by-byte comparisons between values depending on whether the first N characters of a first object are less than, equal to, or greater than the first N characters of a second object;

storing the translated data in a storage system accessible by a database management system (DBMS); and

performing one or more structured query language (SQL) operations on the stored translated data.

11 . The one or more non-transitory storage media of claim 10 wherein the flexible schema datatype comprises a JavaScript Object Notation (JSON)-compliant datatype.

12 . The one or more non-transitory storage media of claim 10 wherein the pre-selected convention comprises following a priority of: 1) scalar node; 2) object node; 3) array node.

13 . The one or more non-transitory storage media of claim 10 wherein the one or more SQL operations utilize the local ordering and the global ordering.

14 . The one or more non-transitory storage media of claim 10 wherein the local ordering is based on evaluation of each character based on its corresponding Unicode Transformation Format-8 (UTF-8) encoding.

15 . The one or more non-transitory storage media of claim 10 wherein storing the translated data in a storage system accessible by the DBMS comprises storing the translated data in a table in a database managed by the DBMS.

16 . The one or more non-transitory storage media of claim 15 wherein results from the one or more structured query language (SQL) operations on the stored translated data comprises at least query results from the translated data in the table in the database managed by the RDBMS.

17 . The one or more non-transitory storage media of claim 10 wherein the translating of the data stored according to the flexible schema datatype to the sortable intermediate format comprises performing a recursive translation of multiple objects according to the flexible schema datatype.

18 . The one or more non-transitory storage media of claim 10 , wherein the global ordering is based on assigning a predetermined byte code prefix for each of the plurality of domains.