IP Library › Granted Patent US 11,550,785
Granted Patent B2
US 11,550,785 · App. 16/389,304 · Granted Jan 10, 2023

Bidirectional mapping of hierarchical data to database object types

Inventors: Beda Christoph Hammerschmidt (Flensburg, DE); Zhen Hua Liu (San Mateo, CA); Vikas Arora (Burlingame, CA); Chandrasekharan Iyer (Redwood City, CA); Beethoven Cheng (East Palo Alto, CA); Ying Hu (Hollis, NH); Douglas James McMahon (Redwood City, CA)
G06F16/2448G06F16/258G06F16/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 11,550,785
App. No.
16/389,304
Granted
Jan 10, 2023
Kind
B2
Abstract

Described is a system, method, and computer program product to perform bi-directional mapping of hierarchical data (e.g. JSON, XML) to database object types (e.g., user defined database object types).

Claims (86)

1. A method, comprising:

storing object definition metadata for a database object type in a database data dictionary, the database object type corresponding to a user-defined object type in a database system, wherein an object type definition provides a schema for an object instance of the user-defined object type;

receiving, by the database system, a data stream to be mapped between the user-defined object type and hierarchical data from outside a database system;

generating the object instance of the user-defined object type in response to accessing the object definition metadata for the user-defined object type in the database data dictionary;

mapping between the hierarchical data and the object instance of the user-defined object type based at least in part on the object definition metadata stored in the database data dictionary, wherein

a tree-based mapping procedure is executed to populate the object instance of the user-defined object type by matching a first leaf node in a first tree structure for a key in a key-value pair in the hierarchical data to a second leaf node in a second tree structure representing an object attribute of the user-defined object type stored in the database system; and

performing a mismatch resolution in a first direction of a bi-directional mapping for the hierarchical data and the user-defined object type, wherein performing the mismatch resolution comprises:

identifying a mismatch between at least one key-value pair in the hierarchical data and at least one object attribute of the user-defined object type; and

resolving the mismatch at least by performing at least one mismatch resolution operation of a plurality of mismatch resolution operations, wherein the plurality of mismatch resolution operations comprises:

ignoring the mismatch with default data; and

skipping the mismatch resolution in a second direction of the bi-directional mapping for the hierarchical data and the user-defined object type.

2. The method of claim 1 , wherein the hierarchical data is mapped to the database object type by a process, the process comprising:

parsing the hierarchical data to identify and store the key-value pair in a nested object or array; and

recursively performing a matching process on the nested object or the array, wherein recursively performing the matching process comprises:

matching the key to the object attribute for the user-defined object type, wherein the object definition metadata is accessed to matching the key to the object attribute; and

populating an initially empty object type for the object instance of the user-defined object type with a value from the key-value pair.

3. The method of claim 1 , wherein the database object type is mapped to the hierarchical data by a process, the process comprising:

identifying the object instance for the user-defined object type;

identifying the object attribute for the object instance of the user-defined object type based at least in part upon one or more definitions that are determined from metadata in the schema;

determining the key for the object attribute based at least in part upon at least one definitions for the user-defined object type in the metadata;

identifying a value for the key, wherein the value for the key corresponds to an attribute value for the object attribute; and

serializing the key and the value to generate the hierarchical data.

4. The method of claim 1 , further comprising performing a custom name mapping for at least the key in the hierarchical data and the object attribute for the user-defined object type at least by invoking a catalog-based process or a callback-based process, wherein the hierarchical data corresponds to at least one of JSON data or XML data.

5. The method of claim 1 , further comprising mapping a first name for the key in the hierarchical data to a second name for the object attribute in the user-defined object type, wherein the first name for the key in the hierarchical data and the second name for the object attribute are devised to be different in the hierarchical data and the user-defined object type.

6. The method of claim 1 , wherein the data is mapped bi-directionally between the user-defined object type and the hierarchical data from outside the database system.

7. The method of claim 1 , further comprising resolving a naming conflict at a lower hierarchy in the hierarchy data at least by including an object type definition in the hierarchical data, wherein the hierarchical data includes object type identification data.

8. The method of claim 1 , wherein the tree-based mapping procedure is implemented by:

identifying a user-defined object type match for the hierarchical data, wherein the first tree structure includes a first number of leaf nodes;

the second tree structure includes a second number of leaf nodes; and

the first number is different from the second number.

9. The method of claim 1 ,

wherein a component embedding within the database system maps between the hierarchical data that is stored in one or more computing systems external to the database system and the user-defined object type that is stored in the database data dictionary within the database system.

10. A system, comprising:

a processor;

a memory for holding programmable code; and

wherein the programmable code includes instructions for storing object definition metadata for a database object type in a database data dictionary, the database object type corresponding to a user-defined object type in a database system, and an object type definition provides a schema for an object instance of the user-defined object type;

receiving, by the database system, a data stream to be mapped between the user-defined object type and hierarchical data from outside a database system;

generating the object instance of the user-defined object type in response to accessing the object definition metadata for the user-defined object type in the database data dictionary;

mapping between the hierarchical data and the object instance of the user-defined object type based at least in part on the object definition metadata stored in the database data dictionary, wherein

a tree-based mapping procedure is executed to populate the object instance of the user-defined object type by matching a first leaf node in a first tree structure for a key in a key-value pair in the hierarchical data to a second leaf node in a second tree structure representing an object attribute of the user-defined object type stored in the database system; and

performing a mismatch resolution in a first direction of a bi-directional mapping for the hierarchical data and the user-defined object type, wherein performing the mismatch resolution comprises:

identifying a mismatch between at least one key-value pair in the hierarchical data and at least one object attribute of the user-defined object type; and

resolving the mismatch at least by performing at least one mismatch resolution operation of a plurality of mismatch resolution operations, wherein the plurality of mismatch resolution operations comprises:

ignoring the mismatch with default data; and

skipping the mismatch resolution in a second direction of the bi-directional mapping for the hierarchical data and the user-defined object type.

11. The system of claim 10 , wherein the programmable code further includes instructions for mapping the hierarchical data to the database object type, by:

parsing the hierarchical data to identify the key-value pair in a nested object or array; and

recursively performing a matching process on the nested object or the array, wherein recursively performing the matching process comprises:

matching the key to the object attribute for the user-defined object type, wherein the object definition metadata is accessed to execute the matching; and

populating an initially empty object for the object instance of the user-defined object type with a value from the key-value pair.

12. The system of claim 10 , wherein the programmable code further includes instructions for mapping the database object type to the hierarchical data, by:

identifying the object instance for the user-defined object type;

identifying the object attribute for the object instance of the user-defined object type based at least in part upon one or more definitions that are determined from metadata in the schema;

determining the key for the object attribute based at least in part upon at least one definitions for the user-defined object type in the metadata;

identifying a value for the key, wherein the value for the key corresponds to an attribute value for the object attribute; and

serializing the key and the value to generate the hierarchical data.

13. The system of claim 10 , further comprising performing a custom name mapping for at least the key in the hierarchical data and the object attribute for the user-defined object type at least by invoking a catalog-based process or a callback-based process, wherein the hierarchical data corresponds to at least one of JSON data or XML data.

14. The system of claim 10 , wherein the programmable code further includes instructions for mapping a first name for the key in the hierarchical data to a second name for the object attribute in the user-defined object type, wherein the first name for the key in the hierarchical data and the second name for the object attribute are devised to be different in the hierarchical data and the user-defined object type.

15. The system of claim 10 , wherein the data is mapped bi-directionally between the user-defined object type and the hierarchical data from outside the database system.

16. The system of claim 10 , further comprising resolving a naming conflict at a lower hierarchy in the hierarchy data at least by including an object type definition in the hierarchical data, wherein the hierarchical data includes object type identification data.

17. A computer program product embodied on a non-transitory computer readable medium, the non-transitory computer readable medium having stored thereon a sequence of instructions which, when executed by a processor, executes:

storing object definition metadata for a database object type in a database data dictionary, the database object type corresponding to a user-defined object type in a database system, wherein an object type definition provides a schema for an object instance of the user-defined object type;

receiving, by the database system, a data stream to be mapped between the user-defined object type and hierarchical data from outside a database system;

generating the object instance of the user-defined object type in response to accessing the object definition metadata for the user-defined object type in the database data dictionary;

mapping between the hierarchical data and the object instance of the user-defined object type based at least in part on the object definition metadata stored in the database data dictionary, wherein

a tree-based mapping procedure is executed to populate the object instance of the user-defined object type by matching a first leaf node in a first tree structure for a key in a key-value pair in the hierarchical data to a second leaf node in a second tree structure representing an object attribute of the user-defined object type stored in the database system; and

performing a mismatch resolution in a first direction of a bi-directional mapping for the hierarchical data and the user-defined object type, wherein performing the mismatch resolution comprises:

identifying a mismatch between at least one key-value pair in the hierarchical data and at least one object attribute of the user-defined object type; and

resolving the mismatch at least by performing at least one mismatch resolution operation of a plurality of mismatch resolution operations, wherein the plurality of mismatch resolution operations comprises:

ignoring the mismatch with default data; and

skipping the mismatch resolution in a second direction of the bi-directional mapping for the hierarchical data and the user-defined object type.

18. The computer program product of claim 17 , wherein the sequence of instructions further performs mapping from the hierarchical data to the database object type, by:

parsing the hierarchical data to identify the key-value pair in a nested object or array; and

recursively performing a matching process on the nested object or the array, wherein recursively performing the matching process comprises:

matching the key to the object attribute for the user-defined object type, wherein the object definition metadata is accessed to execute the matching; and

populating an initially empty object type for the object instance of the user-defined object type with a value from the key-value pair.

19. The computer program product of claim 17 , wherein the sequence of instructions further performs mapping from the database object type to the hierarchical data, by:

identifying the object instance for the user-defined object type;

identifying the object attribute for the object instance of the user-defined object type based at least in part upon one or more definitions that are determined from metadata in the schema;

determining the key for the object attribute based at least in part upon at least one definitions for the user-defined object type in the metadata;

identifying a value for the key, wherein the value for the key corresponds to an attribute value for the object attribute; and

serializing the key and the value to generate the hierarchical data.

20. The computer program product of claim 17 , further comprising performing a custom name mapping for at least the key in the hierarchical data and the object attribute for the user-defined object type at least by invoking a catalog-based process or a callback-based process, wherein the hierarchical data corresponds to at least one of JSON data or XML data.

21. The computer program product of claim 17 , wherein the sequence of instructions further performs mapping of a first name for the key in the hierarchical data to a second name for the object attribute in the user-defined object type, wherein the first name for the key in the hierarchical data and the second name for the object attribute are devised to be different in the hierarchical data and the user-defined object type.

22. The computer program product of claim 17 , wherein the data is mapped bi-directionally between the user-defined object type and the hierarchical data from outside the database system.

23. The computer program product of claim 17 , further comprising resolving a naming conflict at a lower hierarchy in the hierarchy data at least by including an object type definition in the hierarchical data, wherein the hierarchical data includes object type identification data.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 21, 2019
From: HAMMERSCHMIDT, BEDA CHRISTOPH; LIU, ZHEN HUA; ARORA, VIKAS; CHANDRASEKHARAN, IYER; HU, YING; MCMAHON, DOUGLAS JAMES; CHENG, BEETHOVEN
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 049551/0372 →
Continuity (1)
Related Publication 20200334244A1 · Oct 22, 2020
Cited By (1)
US 12,298,954