IP Library › Granted Patent US 11,514,009
Granted Patent B2
US 11,514,009 · App. 16/800,341 · Granted Nov 29, 2022

Method and systems for mapping object oriented/functional languages to database languages

Inventors: Per-åke Minborg (Stora Höga, SE); Emil Forslund (Skövde, SE)
Assignee: Speedment, Inc.
G06F16/215G06F8/51G06F16/23G06F16/24534G06F16/24554
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,514,009
App. No.
16/800,341
Granted
Nov 29, 2022
Kind
B2
Abstract

In a pipeline of operations having a terminating operation and a source operation, a builder is built corresponding to the terminating operation. The builder may also correspond to one or more intermediate operations. A database query is generated corresponding to the builder and is sent to a database or a data source for efficient access to the database.

Claims (59)

1. A method for translating a sequence of operations described using a generalized programming language into database access commands in a database access language, the method comprising performing by a processor, prior to execution of the sequence of operations by the processor, the steps of:

generating an initial builder corresponding to an original terminating operation in the sequence of operations, the initial builder comprising an initial database access command accessing a database and corresponding to the original terminating operation, the original termination operation being identified by parsing the sequence of operations;

determining whether a first intermediate operation within the sequence of operations and immediately preceding the original terminating operation, identified by parsing the sequence of operations, is translatable into a modified database access command that corresponds to the initial database access command and the first intermediate operation;

if the first intermediate operation is translatable, updating the initial builder by modifying the initial database access command according to the first intermediate operation into a modified database access command; and

otherwise, partitioning the sequence of operations into a first subsequence comprising the original terminating operation and a second subsequence comprising the first intermediate operation designated as a new terminating operation.

2. The method of claim 1 , further comprising:

updating the sequence of operations by removing therefrom the first intermediate operation.

3. The method of claim 1 , wherein the first intermediate operation is not translatable, the method further comprising:

generating a new builder corresponding to the new terminating operation, the new builder comprising a new initial database access command corresponding to the new terminating operation;

determining whether an intermediate operation in the second subsequence is translatable into a new modified database access command that corresponds to the new initial database access command and the intermediate operation in the second subsequence;

if the intermediate operation in the second subsequence is translatable, updating the new builder by modifying the new initial database access command according to the intermediate operation in the second subsequence into a new modified database access command; and

otherwise, partitioning the second subsequence into a first sub-subsequence comprising the new terminating operation and a second sub-subsequence comprising the intermediate operation in the second subsequence designated as another terminating operation.

4. The method of claim 3 , further comprising:

configuring an output of the new builder as a source to a query corresponding to the initial builder.

5. The method of claim 3 , further comprising:

sending a query corresponding to the new builder to a database.

6. The method of claim 1 , further comprising:

determining that a second intermediate operation is translatable into a further modified database access command that corresponds to the modified database access command and the second intermediate operation; and

updating the initial builder by further modifying the modified database access command according to the second intermediate operation into a further modified database access command.

7. The method of claim 1 , further comprising:

determining that a source of the sequence is reached; and

sending a query corresponding to the initial builder to a database.

8. The method of claim 1 , wherein the database comprises at least one of a structured query language (SQL) database and a non-structured query language (NoSQL) database.

9. The method of claim 1 , wherein the initial builder comprises at least one of an insert builder, an update builder, a delete builder, and a select builder.

10. The method of claim 1 , wherein:

the first intermediate operation comprises a mapping of a first database element onto a second database element; and

the modified database access command comprises a join associated with both the first and second database elements.

11. The method of claim 1 , wherein:

the first intermediate operation comprises a filtering of a first database element based on a condition; and

the modified database access command comprises a selection of a subset of records of the first database element based on the condition.

12. The method of claim 1 , wherein:

the first intermediate operation comprises updating a first database element according to a parameter; and

the modified database access command comprises a modification of at least a part of a record of the first database element according to the parameter.

13. The method of claim 12 , wherein:

updating the first database element comprises adding a new record to the first database element; and

the modification of at least a part of the record of the first database element comprises inserting the new record into the first database element.

14. The method of claim 1 , wherein:

a number of records to be transferred from a database to a processor executing the sequence of operations is greater than a number of records accessed via the initial database access command.

15. A system for translating a sequence of operations described using a generalized programming language into database access commands in a database access language, comprising:

a first processor; and

a first memory in communication with the first processor, the first memory comprising instructions which, when executed by a processing unit comprising at least one of the first processor and a second processor, the processing unit being in communication with a memory module comprising at least one of the first memory and a second memory, program the processing unit to, prior to execution of the sequence of operations by the processor:

generate an initial builder corresponding to an original terminating operation in the sequence of operations, the initial builder comprising an initial database access command accessing a database and corresponding to the original terminating operation, wherein the instructions program the processor to parse the sequence of operations to identify the original terminating operation;

determine whether a first intermediate operation within the sequence of operations and immediately preceding the original terminating operation, identified by parsing the sequence of operations, is translatable into a modified database access command that corresponds to the initial database access command and the first intermediate operation;

if the first intermediate operation is determined to be translatable, update the initial builder by modifying the initial database access command according to the first intermediate operation into a modified database access command; and

otherwise, partition the sequence of operations into a first subsequence comprising the original terminating operation and a second subsequence comprising the first intermediate operation designated as a new terminating operation.

16. The system of claim 15 , wherein the instructions further program the processing unit to:

update the sequence of operations by removing therefrom the first intermediate operation.

17. The system of claim 15 , wherein the first intermediate operation is not translatable, and the instructions further program the processing unit to:

generate a new builder corresponding to the new terminating operation, the new builder comprising a new initial database access command corresponding to the new terminating operation;

determine whether an intermediate operation in the second subsequence is translatable into a new modified database access command that corresponds to the new initial database access command and the intermediate operation in the second subsequence;

if the intermediate operation in the second subsequence is determined to be translatable, update the new builder by modifying the new initial database access command according to the intermediate operation in the second subsequence into a new modified database access command; and

otherwise, partition the second subsequence into a first sub-subsequence comprising the new terminating operation and a second sub-subsequence comprising the intermediate operation in the second subsequence designated as another terminating operation.

18. The system of claim 17 , wherein the instructions further program the processing unit to:

configure an output of the new builder as a source to a query corresponding to the initial builder.

19. The system of claim 17 , wherein the instructions further program the processing unit to:

send a query corresponding to the new builder to a database.

20. The system of claim 15 , wherein the instructions further program the processing unit to:

determine that a second intermediate operation is translatable into a further modified database access command that corresponds to the modified database access command and the second intermediate operation; and

update the initial builder by further modifying the modified database access command according to the second intermediate operation into a further modified database access command.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 7, 2025
From: SPEEDMENT, INC.
To: SPEEDMENT AB
Reel/Frame 072819/0865 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 9, 2020
From: MINBORG, PER-ÅKE; FORSLUND, EMIL
To: SPEEDMENT, INC.
Reel/Frame 052055/0626 →
Continuity (3)
Continuation 15367723 · Dec 2, 2016
Provisional Application 62261978 · Dec 2, 2015
Related Publication 20200265028A1 · Aug 20, 2020