Subject | Re: [firebird-support] very basic questions about FK |
---|---|
Author | Mark Rotteveel |
Post date | 2009-10-14T17:39:03Z |
Sergio H. Gonzalez wrote:
domain to drop the NOT NULL clause. Saves a lot of work I'd say.
Mark
--
Mark Rotteveel
>> Why you don't want to let field to be null AND _use_ foreign key?As primary keys are implicitly NOT NULL, you can simply alter your
>
> Well... at this point, I'm sure I was WRONG!! But somehow I believed that that
> wasn't a "good practice"... I have just one domain "ID" in my databases defined
> as not null and I used it to ALL my IDs (PK or FK)...
>
> I'm happy I asked here, because I now realize there's nothing bad in having FK
> null !! So I will create a new domain "ID_FK" which allows null and will change
> all (ohh, my god!! there's a lot!!) the FK fields to that domain and will use
> null values when I have nothing to point...
domain to drop the NOT NULL clause. Saves a lot of work I'd say.
Mark
--
Mark Rotteveel