[FAQ] How Table Method Similar/Differ to StoredProcedures

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Oct 19 02:30:43 CDT 2007


On 19/10/07 9:44 AM, "Ivan Smahin" <ivan_smahin at paradigmasoft.com> wrote:

Hi Joseph,

>> Wow!
>> That really speeded things up!
> Good to hear :)

I hope we will get one more Valentina evangelist :-)


>> Also, I have always just been doing generic sql selects.
>> I never tampered with stored procedures and the like. Are
>> methods the same or similar to stored procedures?
> 
> The  methods, triggers  are  similar to SPs in some sense.
> They are all consist of some set of sql statement.

Well, let me give more deep answer:

In fact Methods and Procedures are VERY different things.

1) Methods was in Valentina from the first year of its life.
    Procedures we have made only on 9th year in Feb 2007

2) Methods is not common feature for RDBMS
    while Procedures ARE.

3) Methods this is SIMPLE EXPRESSION (yes based on SQL rules)
    that calculates SCALAR value for a Method,
    using VALUES OF single CURRENT record of table.

   Procedures can contain practically any SQL statement:
        create new tables, drop them do SELECTs, INSERTs UPDATEs.

4) Methods can be used by name, at any place where FIELD can be used:
        SELECT fld, Mtd
        FROM T1
        WHERE fld = 1 AND Mtd = 2
        ORDER BY fld, Mtd

Procedures can be called using CALL method of SQL.

 
>> Maybe
>> this will shorten up all the complex selects?
> 
> Yes, using methods you can simplify the queries a lot.

-- 
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