Re: Can we solve this -- NFNF and non-1NF at Loggerheads

From: Paul <paul_at_test.com>
Date: Mon, 07 Feb 2005 17:08:33 +0000
Message-ID: <4207a092$0$73319$ed2619ec_at_ptn-nntp-reader03.plus.net>


strider5 wrote:

>>Maybe it's because I'm used to thinking relationally, but I just can't
>>think of any examples where a RVA would be necessary or even just
>> useful.

>
> imagine a catalog table with 2 columns :
> tablename and keycols (RVA ), both atrributes compound the key...

Why can't this be done in standard relations?

Surely you just have:

  • one table (Tables?) with one row per tablename.
  • another table (Keys?) with a primary key of {tablename, key_name} and maybe attributes to denote uniqueness etc.
  • a third table (Key_Columns?) with a primary key of {tablename, key_name, col_name}

This is assuming you just want key names to be unique per table rather than database-wide, if not, remove the tablename column. Maybe I have some other details wrong, but you get the idea that it should be possible in principle.

Although this seems at first sight more complex because it uses more tables, I think it's better in the long run because it's forcing you to break down your knowledge into simple first-order predicates.

Paul. Received on Mon Feb 07 2005 - 18:08:33 CET

Original text of this message