Re: Foreign key problem

From: x <x_at_not-exists.org>
Date: Wed, 14 Jun 2006 12:18:36 +0300
Message-ID: <e6ok3c$9rs$1_at_nntp.aioe.org>


<frebe73_at_gmail.com> wrote in message
news:1150175956.098492.15000_at_i40g2000cwc.googlegroups.com...
> I am working on an application which need a data model that reflects
> the schema structure. My tables are ("*" indicates primary key column):
>
> tableinfo(*table_name)
> columninfo(*table_name, *col_name)
> fk(*fk_name, pk_table, fk_table)
> fk_column(*fk_name, *fk_column, pk_column)

> My problem is the last table, fk_column. How can I define a foreign key
> for fk_column.fk_column (and pk_column) referencing the table
> columninfo? The column table_name is not an member of the table
> fk_column, but it could easily be joined from the fk table, but I don't
> think that helps me with defining the foreign key constraint?

My problem is with these:

> fk(*fk_name, pk_table, fk_table)
> fk_column(*fk_name, *fk_column, pk_column)

I don't think they are right.
Have you put your functional dependecies throughout a normalization algorithm ?
How can you disallow redundant fk between two tables for example ? Received on Wed Jun 14 2006 - 11:18:36 CEST

Original text of this message