Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: table join
Hi Jared,
> Breaking 1NF strikes again.
I never thought about modelling of names in this context but it is apparently pretty hard to store this information normalized.
First of all storing the name in the same table as the person / contact is a venial sin against 1NF as one posses 0..N names.
first_name or last_name is nothing else as storing of highly redundant piece of detail information in the master table.
Even worst, in some countries a part of name is inherited from the fathers name; of course a FK to the fathers record instead of the "replication" is the right solution here.
I left out some minor issues as sequence number as a part of name etc.
Regards,
Jaromir D.B. Nemec
Breaking 1NF strikes again.
--
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist
On 2/1/06, Roger Xu <roger_xu_at_dp7uptx.com> wrote:
Table A:
Lastname (Mike)
Firstname (Johnson)
Phone(323-442-5678)
Table B:
Lastname-Firstname(MikeJohnson)
StreetAddress(1242 Main St.)
Zip(76222)
How do I join these two tables?
select B.Lastname-Firstname,A.Phone,B.StreetAddress,B.Zip
from A,B
where B.Lastname-Firstname = A.Lastname + A.Firstname
-- http://www.freelists.org/webpage/oracle-lReceived on Sun Feb 05 2006 - 06:03:56 CST
![]() |
![]() |