You were wondering about a separate phone number table? Most phone numbers (esp. cell phones and home phones) belong to only one person. If that were your only data, then creating a new table may not make sense. However, dozens of people can share a common number (like in a large office. Each person doesn't get their own number rather they get their own extension). Phone numbers can also be international (you can't rely on (ac) ###-#### being able to hold the whole number). Other phone numbers come with access codes (Dial a number, wait for a tone, type in your access code, get connected). What happens if someone has 3 cell phone numbers? ( I know someone like that, they are a salesperson and they have to use a different phone (for the service and for the better rates) depending on where they are in the world). You wouldn't want 3 fields on your table with 1 of them being empty for all but one record, would you?
A mapping table like was described would equate a user_id to a phone_id and could also contain a PIN# or an Extension # for those users that need them. If you wanted to get really fancy, you could put a startdate and a stopdate on the mapping table. That way if you ever wanted to see a history of who had that number, there it would be. (If anyone ever belonged to the same number more than once, they would have multiple records in this table) Basically, you end up with better, more accessible data doing the phone numbers in their own table. You could add more fields like phone_type (cell, fax, pager, blackberry, etc), and notes for each phone ("This is an EU #") and maybe even a "do not call" flag (or would that go on the mapping table? hmmm...) Shawn Green Database Administrator Unimin Corporation - Spruce Pine "Chris W. Parker" <[EMAIL PROTECTED]> wrote on 10/12/2004 12:55:54 PM: > Justin Smith <mailto:[EMAIL PROTECTED]> > on Tuesday, October 12, 2004 8:48 AM said: > > > What you have so far looks good, but what I learned from doing my > > ecomm project was that it is beneficial to make a separate table for > > anything and everything that you might have more than one of... > > Addresses, phone numbers, and email addresses are all great > > candidates for breaking out into another table. > > interesting you say that because i was going to do this same thing > except not as completely as i probably should (which i think is what you > are suggesting). what i mean is, my extra table of addresses was going > to be merely shipping addresses for the customer and nothing else. but i > guess i should change it from being just shipping addresses to include > any kind of address relating to the customer? > > but what about phone numbers? i'm a bit unsure on that one. in my table > as it is now, i have three: business, home, and fax. in what case would > having a phone (number) table be beneficial? > > > > I hope this helps. > > yes thank you. > > > > chris. > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] >