On Thursday, February 28, 2002, at 05:13 PM, Stephen Adkins wrote:
> Hi, > > I personally see no central role in P5EE for stored procedures. > > I am assuming the flurry of discussion on stored procedures is because > it is of interest to Perl enthusiasts to see Perl being used in > unique ways. > > Stored procedures are usually used for several things: > > 1. embedding business logic in the database > 2. enforcing various forms of referential integrity not natively > supported by the database (i.e. delete->cascade, etc.) > 3. improving performance for simple transactions > (the actual SQL is precompiled) > > 1. This is terrible for the P5EE principle of making business logic > which is anywhere in the Enterprise being available everywhere > across the Enterprise. Business logic should never be stored in > the database because it hides it from being accessible elsewhere. > But what if a database is accessed by a host of different clients all of different languages, ie, a Java JDBC client, a Python whatever-they-have client, a C++ whatever it has client? It would be insane for each client to have to replicate the business logic. So you would have two options: 1 - have Perl proxy database access and have each other language connect to it 2 - code all your business logic in the database so it only has to be done once