InstantDB Project
About InstantDB
Project Mail Lists
Short History
Reporting Bugs
Screen Shots
3rd Party Examples

CVS Repositories

Who We Are
News, Articles & Events
Getting Involved
Contact Us

Case Studies
On The Edge! -NEW-
Commercial Vendors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: InstantDB: Stored Procedures

I think that stored procedures would have the following value if added
to InstantDB:

1) If you're using InstantDB as a testing database and an
enterprise-level database such as Oracle for production, you don't have
to worry about problems calling stored procedures in your code.  It
would be nice if you could even have the same syntax for idb stored
procedures as Oracle 8 Java stored procedures.

2) If you are using the RmiJdbc driver, you would have less RMI calls
going across to the idb classes.

That being said, we don't have any immediate plans to implement this


Scott Plante wrote:
> Stored procedures are of much less value in a database like InstantDB
> than with ones like Oracle. One of the main values of a stored procedure
> in Oracle is that you can make one call to the database, say over a
> socket connection, and execute several SQL commands. So, you don't have
> a lot of data going back and forth across a socket connection. But since
> instantdb is an embedded database, everything happens in the same
> process as the database anyway. You might just as well make two
> independent calls as one to a "stored procedure." If you want to reuse
> it, just encapsulate it in a class. Because the database is in-process,
> your entire system is like one big collection of stored procedures. At
> least, the tier that's accessing the database is.
> What advantage do you see in stored procedures for InstantDB, besides
> the fact that it's the way you did it in Oracle?
> Scott
> Charlie Elgholm wrote:
> > Hi!
> >
> > Hos does InstantDB handle "Stored Procedures" in the database. Is there some
> > way to
> > "compile" some kind of "package" with procedures/functions (methods) other
> > than the global
> > functions already implemented (i.e the "upper"-function). Does InstantDB
> > perhaps support
> > the option to compile Java-classes inline in the database that can then be
> > called on
> > with dot-notation like if I have:
> > ----
> > create or replace package/class myPackage
> > {
> >       public String myFunction(String s){
> >               return s;
> >       }
> >
> >       public String mySecondFunction(String s){
> >               return s;
> >       }
> > }
> > ---
> > then I would be able to do
> > ---
> > select myPackage.myFunction(COLUMN_A) from TABLE_A
> > ---
> > The difference from your already implemented approach for the
> > anonymous-functions (those not within
> > a package/"class") is not that much. The only thing I see needed for this to
> > work is that the database
> > can spawn some kind of compilation-process when issuing a "create or replace
> > package/class" command, and
> > this could perfectly be the standard SUN JDK compiler. And then there must
> > be some kind of way to append
> > the context in which the database is in at the moment of method-calling,
> > with context I mean a JDBC-connection-type
> > and perhaps other useful information about in what state the database is in.
> >
> > Why I'm bothering you is that I have worked a lot with the Oracle database
> > over the years and with their
> > PL/SQL Stored Procedures. And I really like it a lot and I was thinking of
> > doing the same kind
> > of implementations within the InstantDB database.
> >
> > How about it, is this already in process, or have a stumbled upon something
> > that I can help implement?
> >
> > Cheers!
> >
> > Charlie Elgholm
> >
> >
> >
To unsubscribe from this mailing list, send email to
with the text "unsubscribe instantdb" in the body of the email.
If you have other questions regarding this mailing list, send email to
the list admin at