1. A non-transitory computer-readable medium containing instructions to configure a processor to perform a method, the method comprising: generating a calculation plan including a plurality of nodes; determining whether at least one of the nodes includes a function node, the function node including at least one complex function for performing at least one calculation to access data stored in a table in a database based on a metadata contained in a common metadata catalog, the metadata determining whether a row store of the database is to be accessed or a column store of the database is to be accessed during execution of the at least one complex function; and compiling the function node into an intermediate code representative of a virtual machine language, wherein the intermediate code is compiled into an executable code or a runtime object to enable execution of the plurality of nodes including the function node at the database and executed at the database, the function node performs the at least one complex function of the calculation plan inside the function node at the database without transferring data from the database to a client application querying the database, wherein the runtime object is cached for a subsequent reuse; wherein a row store database engine is used to access the data stored in the row store and a column store database engine is used to access the data stored in the column store.