Subject Re: [firebird-support] Migrating from oracle
Author Helen Borrie
At 06:23 PM 15/10/2005 -0300, you wrote:
>I will migrate a little system from oracle to firebird (100 tables).
>This system use a lot of editable views, and user defined types for
>passing parameters thru view's triggers and final procedures, like the
>simplified model:
>My question is: I have to create as many parameters as my "TYPE
>BUSINESS_OBJET" for my stored procedures, or there is a shortcut?
> FIELD_A%type, FIELD_B%type, FIELD_C%type
>do validations and
>call a stored procedure passing just ONE parameter of TYPE BUSINESS_OBJECT
>insert or update, audit, do a lot of other stuff

As you seem to have discovered already, Firebird doesn't support
user-defined types. So your deduction is correct - you will have to define
the arguments individually.

On the "plus" side, your column-level validations and spawned DML in
triggers will possibly work out to be much simpler (and cheaper), since you
have access to the "new" and "old" values of columns in your triggers, as
context variables.

You can also make a "code saving" by merging multiple trigger events into a
single trigger, e.g.

create trigger bi_aTable for aTable
active before insert or update or delete

if (updating) then
else if (inserting) then ...