1. A method of managing a relational database on a pervasive computing device comprising: a. receiving queries on a pervasive computing device in SQL, the queries comprising a plurality of query terms; b. interpreting the queries on a pervasive computing device by associating at least one declarative language function with the query terms by converting the SQL to an intermediate tree representation corresponding to the declarative language function wherein the declarative language function is implemented in a declarative language that is chosen from the group consisting of ML, LISP, and HASKELL; c. converting the queries represented by at least one declarative language function to a plurality of JAVA statements on a pervasive computing device; and d. executing the JAVA statements.