Method, system, and program for extracting data from database records using dynamic code
First Claim
1. A method for extracting data from a record in a first format and inserting data into a record in a second format during an insert operation, comprising:
- determining location information for data in at least one record in at least one column in the first format involved in the insert operation from which data will be extracted;
determining location information for data in at least one record in at least one column in the second format involved in the insert operation into which the data extracted from a corresponding column in the first format will be inserted; and
for each column from which data will be extracted, using the determined location information to dynamically generate at least one instruction to move the data in each column in the record in the first format to each corresponding column of one record in the second format, wherein the location information of each column in the records in the first and second formats involved in the data movement operations is encoded in the at least one instruction, and wherein the at least one instruction is dynamically generated in response to a request to insert data into the record in the second format.
1 Assignment
0 Petitions
Accused Products
Abstract
Disclosed is a system, method, and program for extracting data from a record in a first format and inserting data into a record in a second format during an insert operation. A determination is made of location information for data in at least one record in at least one column in the first format involved in the insert operation from which data will be extracted and of location information for data in at least one record in at least one column in the second format involved in the insert operation into which the data extracted from a corresponding column in the first format will be inserted. For each column from which data will be extracted, the determined location information is used to generate at least one instruction to move the data in each column in the record in the first format to each corresponding column of one record in the second format. The location information of the columns in records in the first and second formats involved in the data movement operations is encoded in the at least one instruction. The instruction may be repeated for multiple records in the first format from which data will be extracted into multiple records in the second format.
51 Citations
36 Claims
-
1. A method for extracting data from a record in a first format and inserting data into a record in a second format during an insert operation, comprising:
-
determining location information for data in at least one record in at least one column in the first format involved in the insert operation from which data will be extracted;
determining location information for data in at least one record in at least one column in the second format involved in the insert operation into which the data extracted from a corresponding column in the first format will be inserted; and
for each column from which data will be extracted, using the determined location information to dynamically generate at least one instruction to move the data in each column in the record in the first format to each corresponding column of one record in the second format, wherein the location information of each column in the records in the first and second formats involved in the data movement operations is encoded in the at least one instruction, and wherein the at least one instruction is dynamically generated in response to a request to insert data into the record in the second format. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
searching at least one table for records that match a search criteria, wherein each record from which data is extracted comprises records located in the search that match the search criteria, and wherein the at least one column into which the extracted data is inserted comprises a search key; and
using the search key to query records in another table.
-
-
7. The method of claim 1, wherein the at least one instruction is generated in response to a call from an insertion process, wherein the at least one instruction extracts data from at least one column of a record in the first format in memory and inserts the data into a corresponding key column in an index in the second format.
-
8. The method of claim 7, further comprising generating an instruction to load an address in memory of a start of the record from which data is to be extracted into a register, wherein the location information for the at least one column in the first format is an offset from the address in memory, and wherein the location information for the at least one column into which data is extracted comprises one key column of the index.
-
9. The method of claim 8, wherein the location information for the record in the first format comprises a first table including information on the columns of records in the first format and the location information for the index comprises a second table including information on the location of key columns of the index and information indicating for each key column a corresponding column in records in the first format, and wherein for a given key column, the second table is used to determine the column in the records in the first format corresponding to the given key column and the first table is used to determine the location in the record in the memory of the column corresponding to the key column from which data will be extracted.
-
10. The method of claim 9, further comprising:
performing a threshold number of move operations by determining the location information from the first and second tables during each move operation, wherein the instruction is generated and used after the move operations have been performed the threshold number of times.
-
11. The method of claim 7, wherein data is extracted from the columns in the record in memory into key columns in a plurality of indexes.
-
12. The method of claim 7, further comprising loading multiple records one-at-a-time into the same location of memory, wherein while the record is loaded in the memory, the code is executed to move the data from columns in the record loaded into memory into the index columns.
-
13. A system for extracting data from a record in a first format and inserting data into a record in a second format during an insert operation, comprising:
-
means for determining location information for data in at least one record in at least one column in the first format involved in the insert operation from which data will be extracted;
means for determining location information for data in at least one record in at least one column in the second format involved in the insert operation into which the data extracted from a corresponding column in the first format will be inserted; and
for each column from which data will be extracted, means for using the determined location information to dynamically generate at least one instruction to move the data in each column in the record in the first format to each corresponding column of one record in the second format, wherein the location information for each column in the records in the first and second formats involved in the data movement operations is encoded in the at least one instruction, and wherein the at least one instruction is dynamically generated in response to a request to insert data into the record in the second format. - View Dependent Claims (14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24)
means for searching at least one table for records that match a search criteria, wherein each record from which data is extracted comprises records located in the search that match the search criteria, and wherein the at least one column into which the extracted data is inserted comprises a search key; and
means for using the search key to query records in another table.
-
-
19. The system of claim 13, wherein the at least one instruction is generated in response to a call from an insertion process, wherein the at least one instruction extracts data from at least one column of a record in the first format in memory and inserts the data into a corresponding key column in an index in the second format.
-
20. The system of claim 19, further comprising means for generating an instruction to load an address in memory of a start of the record from which data is to be extracted into a register, wherein the location information for the at least one column in the first format is an offset from the address in memory, and wherein the location information for the at least one column into which data is extracted comprises one key column of the index.
-
21. The system of claim 20, wherein the location information for the record in the first format comprises a first table including information on the columns of records in the first format and the location information for the index comprises a second table including information on the location of key columns of the index and information indicating for each key column a corresponding column in records in the first format, and wherein for a given key column, the second table is used to determine the column in the records in the first format corresponding to the given key column and the first table is used to determine the location in the record in the memory of the column corresponding to the key column from which data will be extracted.
-
22. The system of claim 21, further comprising:
means for performing a threshold number of move operations by determining the location information from the first and second tables during each move operation, wherein the instruction is generated and used after the move operations have been performed the threshold number of times.
-
23. The system of claim 19, wherein data is extracted from the columns in the record in memory into key columns in a plurality of indexes.
-
24. The system of claim 19, further comprising means for loading multiple records one-at-a-time into the same location of memory, wherein while the record is loaded in the memory, the code is executed to move the data from columns in the record loaded into memory into the index columns.
-
25. An article of manufacture for use in extracting data from a record in a first format and inserting data into a record in a second format during an insert operation, the article of manufacture comprising at least one computer program capable of causing a computer to perform:
-
determining location information for data in at least one record in at least one column in the first format involved in the insert operation from which data will be extracted;
determining location information for data in at least one record in at least one column in the second format involved in the insert operation into which the data extracted from a corresponding column in the first format will be inserted; and
for each column from which data will be extracted, using the determined location information to dynamically generate at least one instruction to move the data in each column in the record in the first format to each corresponding column of one record in the second format, wherein the location information of the columns in records in the first and second formats involved in the data movement operations is encoded in the at least one instruction, and wherein the at least one instruction is dynamically generated in response to a request to insert data into the record in the second format. - View Dependent Claims (26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36)
searching at least one table for records that match a search criteria, wherein each record from which data is extracted comprises records located in the search that match the search criteria, and wherein the at least one column into which the extracted data is inserted comprises a search key; and
using the search key to query records in another table.
-
-
31. The article of manufacture of claim 25, wherein the at least one instruction is generated in response to a call from an insertion process, wherein the at least one instruction extracts data from at least one column of a record in the first format in memory and inserts the data into a corresponding key column in an index in the second format.
-
32. The article of manufacture of claim 31, further comprising generating an instruction to load an address in memory of a start of the record from which data is to be extracted into a register, wherein the location information for the at least one column in the first format is an offset from the address in memory, and wherein the location information for the at least one column into which data is extracted comprises one key column of the index.
-
33. The article of manufacture of claim 32, wherein the location information for the record in the first format comprises a first table including information on the columns of records in the first format and the location information for the index comprises a second table including information on the location of key columns of the index and information indicating for each key column a corresponding column in records in the first format, and wherein for a given key column, the second table is used to determine the column in the records in the first format corresponding to the given key column and the first table is used to determine the location in the record in the memory of the column corresponding to the key column from which data will be extracted.
-
34. The article of manufacture of claim 33, further comprising:
performing a threshold number of move operations by determining the location information from the first and second tables during each move operation, wherein the instruction is generated and used after the move operations have been performed the threshold number of times.
-
35. The article of manufacture of claim 31, wherein data is extracted from the columns in the record in memory into key columns in a plurality of indexes.
-
36. The article of manufacture of claim 31, further comprising loading multiple records one-at-a-time into the same location of memory, wherein while the record is loaded in the memory, the code is executed to move the data from columns in the record loaded into memory into the index columns.
Specification