Make your own free website on Tripod.com

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

Software
Downloads
Documentation
CVS Repositories
Roadmap
License

About Enhydra.org
Who We Are
News, Articles & Events
Getting Involved
Contact Us

Community
Demos
Contributions
Resources
Case Studies
On The Edge! -NEW-
Commercial Vendors


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

Re: InstantDB: Stored Procedures


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
> charlie@elgholm.com
> 
> -----------------------------------------------------------------------------
> To unsubscribe from this mailing list, send email to majordomo@enhydra.org
> 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 owner-instantdb@enhydra.org.
> 
> 


-----------------------------------------------------------------------------
To unsubscribe from this mailing list, send email to majordomo@enhydra.org
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 owner-instantdb@enhydra.org.