Subject RE: [firebird-support] Alter table after record insert
Author Alan McDonald
> Hello,
>
> This is my first message on this list. Hello to everybody! :-)
> I'm new with Delphi/Firebird (long time from DOS) and there is some
> things that I does not understand.
> I'm developing a Win version of my software and learning the concept
> of Client/Server.
> The use of a foreing key is only necessary when we need cascade
> updates/deletes? Instead of this cases, we can use the JOIN statement.
> There is improvement using FK?

FK's improve data integrity - they protect your data from inadvertant data
manipulation which goes against your data model. They can be a little
painful to have in place while you are developing your model and regularly
altering data structure but can be imposed when your structure starts to
finalise.

> Why I can't create a foreing key after the tables has some data ou
> triggers? There is a special rule for this?

Usually this is becuase existing data does not conform to the contraints
imposed by the FK. You can make your data conform e.g. ensure no nulls are
present etc, then assert your change.

Alan

>
> Thank you all for the attention.
>
> Platform: WinXP Pro, Delphi 6 Pro (SP2) and FireBird 1.5.
>
> --
>
> ..::
> Marcello Fontolan
> marcello@...
> ::..
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>