Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Foreign key problem

Re: Foreign key problem

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Tue, 13 Jun 2006 13:21:31 GMT
Message-ID: <vZyjg.21937$A26.493587@ursa-nb00s0.nbnet.nb.ca>


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

No, Fredrik, the names don't have to match. Consider a table with two columns: manager and employee that are both foreign keys referencing an employee table. The columns cannot both have the same name. Received on Tue Jun 13 2006 - 08:21:31 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US