11. A computer program product embodied in a non-transitory computer readable medium for compiling data, which, when executed, performs a method comprising: receiving an input query in a first language; translating the input query to a nested relational algebra (NRA) in the form of a first intermediate representation (IR), wherein the first IR comprises a high-level functional language including algebraic operators; implementing a set of algorithms of the algebraic operators to compile at least some of the first IR into a second IR, wherein the second IR comprises a hybrid language which utilizes a data-flow language and a set of lower-level extensions, and wherein the second IR is optimized by utilizing a set of specific optimizations targeting a part of the second IR that was compiled from a set of algebraic operators of the first IR, wherein the first IR is optimized by utilizing a set of functional optimizations on a set of non-algebra portions of the first IR, wherein the second IR is further optimized by utilizing a set of data-flow optimizations; and compiling at least one of: the first IR and the second IR, into a low-level code.
11. A computer program product embodied in a non-transitory computer readable medium for compiling data, which, when executed, performs a method comprising: receiving an input query in a first language; translating the input query to a nested relational algebra (NRA) in the form of a first intermediate representation (IR), wherein the first IR comprises a high-level functional language including algebraic operators; implementing a set of algorithms of the algebraic operators to compile at least some of the first IR into a second IR, wherein the second IR comprises a hybrid language which utilizes a data-flow language and a set of lower-level extensions, and wherein the second IR is optimized by utilizing a set of specific optimizations targeting a part of the second IR that was compiled from a set of algebraic operators of the first IR, wherein the first IR is optimized by utilizing a set of functional optimizations on a set of non-algebra portions of the first IR, wherein the second IR is further optimized by utilizing a set of data-flow optimizations; and compiling at least one of: the first IR and the second IR, into a low-level code. 15. The computer program product of claim 11 , the method further comprising: wherein the low-level code is selected from a group comprising: assembly code, virtual machine code, and virtual machine code instructions.