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 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 corresponding to the original terminating operation; • determining whether a first intermediate operation is translatable into a modified database access command that corresponds to the initial database access command and the first intermediate operation, wherein the translatable comprises analyzing the intermediate operation to determine if the builder consumes that 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 intermediate operation designated as a new terminating operation, wherein the partitioning is achieved using a partition function; ∘ wherein 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 and 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. • generating an initial builder corresponding to an original terminating operation in the sequence of operations, the initial builder comprising an initial database access command corresponding to the original terminating operation; • determining whether a first intermediate operation is translatable into a modified database access command that corresponds to the initial database access command and the first intermediate operation, wherein the translatable comprises analyzing the intermediate operation to determine if the builder consumes that 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 intermediate operation designated as a new terminating operation, wherein the partitioning is achieved using a partition function; ∘ wherein 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 and 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. <EOS>