Re: table join

  • From: "jaromir nemec" <jaromir@xxxxxxxxxxxx>
  • To: <jkstill@xxxxxxxxx>, <roger_xu@xxxxxxxxxxx>
  • Date: Sun, 5 Feb 2006 13:03:56 +0100

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

  ----- Original Message ----- 
  From: Jared Still 
  To: roger_xu@xxxxxxxxxxx 
  Cc: Oracle-L@Freelists. Org (E-mail) 
  Sent: Thursday, February 02, 2006 7:21 PM
  Subject: Re: table join


  Breaking 1NF strikes again.

  -- 
  Jared Still
  Certifiable Oracle DBA and Part Time Perl Evangelist


  On 2/1/06, Roger Xu <roger_xu@xxxxxxxxxxx> 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


Other related posts: