Patent ID: 11934422
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 0:
1. An apparatus for extracting data from a database, the apparatus comprising:
a database interface configured to enable communication between the apparatus and the database;
a virtual machine (VM);
a buffer comprising a plurality of memory regions;
a kernel generator configured to generate a data extraction kernel on a native side, and generate an object initialization kernel on a VM-side;
the data extraction kernel comprising a native-side buffer application programming interface (API), and being configured to read database data from a plurality of locations in the database using the database interface and write the database data to the buffer using the native-side buffer API, the database data corresponding to a query result;
the object initialization kernel comprising a VM-side buffer API and being configured to read the database data from the buffer using the VM-side buffer API and to initialize a plurality of objects with the database data read from the buffer;

wherein information indicating one of the plural memory regions in the buffer where the data extraction kernel writes the database data is known to the native-side buffer API and to the VM-side buffer API;
wherein in generating the data extraction kernel and the object initialization kernel, the kernel generator is further configured to generate:
the object initialization kernel based on a first isomorphism between respective object types of the plurality of objects and a data format of the region layout in the buffer; and
the data extraction kernel based on a second isomorphism between a data format of the database data in the database interface and the data format of the region layout in the buffer;
wherein the first isomorphism and the second isomorphism are input to the kernel generator, the isomorphisms are data structures representing program code.