| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: A second qs on multivalued dependencies.
Well after a little bit more thinking I realized that this is a
generalization of my previous question on lookup tables.
What I am doing again is building a separate entity that serves as a lookup
table for a finite combination of values.
This time, however, the lookup table is not for just one field but for two (3 in my original db) which might justify the existance of a separate table.
For instance, a lookup table PHONETYPE with a phonetype attribute and values
{Home, Work, Cellular} doesnt serve much purpose since I can have a field
PhoneType in the table PHONE.
But in this case, leaving those fields in the original table medium would
introduce some redundancy because I would have to repeat two fields
(capacity and physicaltype) multiple types instead of using a mediumtypeid
foreign key in their place.
I guess I am explaining this to myself in writing :-)
Cheers!
Konstantinos
PS: I got Ullman's Principles of Database Systems Second Edition for only 6.50$. It is old but well written and classic isn't it?
Whether the difference being
"Tony" <andrewst_at_onetel.com> wrote in message
news:ed8a00fa.0410150538.38e802f1_at_posting.google.com...
> "Kostas" <noemail_at_noemail.net> wrote in message > news:<10mupanj91aio15_at_corp.supernews.com>...
> > That works, but you don't HAVE to instroduce a surrogate key into > every table. You could just do this: > > create table MediumType (PhysicalType, Capacity, > primary key (PhysicalType, Capacity)); > > create table OpticalMedium (MediumID primary key, PhysicalType, > Capacity, > foreign key (PhysicalType, Capacity) references MediumType);Received on Sat Oct 16 2004 - 16:40:56 CDT
![]() |
![]() |