Re: Foreign key problem
From: Kenneth Downs <knode.wants.this_at_see.sigblock>
Date: Tue, 13 Jun 2006 15:50:31 -0400
Message-Id: <ihh3m3-k3r.ln1_at_pluto.downsfam.net>
Date: Tue, 13 Jun 2006 15:50:31 -0400
Message-Id: <ihh3m3-k3r.ln1_at_pluto.downsfam.net>
frebe73_at_gmail.com wrote:
>> I can tell you how we did it, and perhaps this will help.
>>
>> Our tables look more like this:
>>
>> TABLEINFO (*table_name)
>> COLUMNINFO (*table_name, *col_name)
>> FK (*table_name,*table_name_par)
>>
>> TABFLAT(*table_name,*col_name)
>>
>> A table is defined by making entries into either COLUMNINFO or FK. You
>> put non-FK columns into a table by making entries into COLUMNINFO.
>>
>> When an entry is made into FK, it establishes a foreign key but it also
>> adds columns to the child table.
> > Columns in the fk (child) table need to have the same name as in the > primary table, or? > > /Fredrik
By convention yes. We prefer this to the obfuscations that ensue otherwise. See my reply to mAmsterdam for more detail.
-- Kenneth Downs Secure Data Software, Inc. (Ken)nneth_at_(Sec)ure(Dat)a(.com)Received on Tue Jun 13 2006 - 21:50:31 CEST