Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 Best way to handle phone number extension?

Author  Topic 

dhw
Constraint Violating Yak Guru

332 Posts

Posted - 2009-07-15 : 18:24:18
Hi All -

I am beginning to design a new database and need to make it scalable for the user's phone numbers - could be home, mobile, work, etc.

So, my thought is to have a PhoneType table (includes an identity column, tinyint, as the PK) and a description ("home", "mobile", "work") and also a UserPhone table that would include the UserID, PhoneTypeID, PhoneNumber and then a PrimaryFlag.

Since work phones can have extensions, my original thought was simply to add PhoneExtension to the table. However, I am now wondering if it would be better to put the PhoneExtension in another table since NOT every phone will have an extension. Maybe some sort of PhoneAttributes table? Not sure if anyone else has run into this.

thanks
- will

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2009-07-15 : 23:29:49
I'll use a column for ext and make it nullable
Go to Top of Page

dhw
Constraint Violating Yak Guru

332 Posts

Posted - 2009-07-16 : 11:19:09
thanks. Yeah, that was my original plan too. I was thinking that the majority of rows (home and mobile) won't have an extension and some decent amount of work phones won't either....so the idea of having a column of data that wasn't getting used alot made me think about moving the data to another table.

appreciate the feedback.
Go to Top of Page
   

- Advertisement -