Creating a Trigger

Ruslan Zasukhin sunshine at public.kherson.ua
Sun Jan 4 13:21:44 CST 2009


On 1/4/09 8:30 PM, "Ivan Smahin" <ivan_smahin at paradigmasoft.com> wrote:

>> Could you explain in a bit more detail what you mean with this?
>> Haven't used stored procedures before.
> It's better to read wiki and other sources.
> In short - there is a way to place the business logic to the database self.
> Usually there are a lot of things which should be checked and
> performed instead of just insert/update/delete some rows.
> Here is two ways - some app which utilize the database performs
> such things self and finally operates with the database in that simple
> manner (insert/update/delete). Another way is using stored procedures
> which makes the app free of that logic In this case the app must not
> do inserts/updates/deletes but calls appropriate procedures.
> There are a lot of reasons to choose the second way.
> 1. You are free to change behavior of any procedure. And there is no
> need to track done app versions and so.
> 2. You are free to change database schema.
> 3. Any app even new one, even app which will be written by another
> person will do the thing in right way.

I can add

* you know REALbasic and write code on it to do some logic.
        loops, ifs, exceptions

* exists other languages around todo the same.

* some DBMS and Valentina also support Stored Procedures.
    they can be on some SQL dialect.
    or they can be e.g. JavaScript.

Today Valentina offer SQL for Stored Procedures.
Yes you can use ifs, loops and exceptions to write code which is ANALOG to
your RB code, but it will live not in RB project but inside of db.

Of course this code cannot replace and should not replace the whole RB app.
Only db-related code or its PART can be placed into SPs.


* Another great benefit of SPs is that if today you develop with RB, and
move 40% of your logic into SPs instead of RB, then TOMRROW you can start
use Obj-C or PHP around this db, and WOW, 40% of logic already is INSIDE of
db itself.


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list