List:General Discussion« Previous MessageNext Message »
From:John Meyer Date:October 6 2007 11:13am
Subject:Re: do I need two tables or one will do just fine?
View as plain text  
Afan Pasalic wrote:
> hi,
> I have a employees table (first name, last_name, address, city, state, 
> zip, phone,...).
> though, I got a requested to add additional info about people, like 
> phone_extension, zip+4, nick, DOB... that will not be used very often.
> what would be better solution:
> a) add these columns to employees table
> b) create separate table employees_addition_info with these fields and 
> store info if any (with employee_id of course)
>
> one friend of mine suggest me to keep all data in one table since the 
> "empty" fields will be NULL and  there will not be a lot of wasted 
> space. specially because I'll never have more than 200K records (right 
> now I have about 50K records). and "normalization" will not improve a 
> lot?
>
> any suggestions?


Keep the one table.
Unless you can make the case that all of those attributes can be 
logically grouped together, I'd keep them in the primary table to 
eliminate unnecessary joins.  And as far as "normalizing", you're pretty 
much setting up tables employee_info_1 and employee_info_2 and when you 
end the table name or field name with a number, that's a big clue you're 
not normalizing the data.
Thread
do I need two tables or one will do just fine?Afan Pasalic5 Oct
  • RE: do I need two tables or one will do just fine?Jerry Schwartz5 Oct
  • RE: do I need two tables or one will do just fine?Daevid Vincent5 Oct
  • Re: do I need two tables or one will do just fine?John Meyer6 Oct
    • Re: do I need two tables or one will do just fine?afan pasalic8 Oct