Jump to content

table design ? grouped phone list


argan328

Recommended Posts

Hi all.  Table design question:

 

So far I have a general login table with username/password/email, etc. and a couple of other tables with the username as primary in order to link them.

 

I need to give users a phonebook entry option to store phone numbers -- but here's what's holding me up: I need to also allow users to group phone numbers together in different ways. For example grouping phone numbers as Personal contacts, Business Contacts, Rotary Club contacts, etc.

 

Do I need one table for each user? Or one table for each grouped phone list? I can't figure out how I would fit all those requirements into rows in one table.

;D

Thanks so much in advance! Any help I can get is much appreciated!

Link to comment
https://forums.phpfreaks.com/topic/40923-table-design-grouped-phone-list/
Share on other sites

Assuming the user's create their own groups...

User

==========

id | name

----------

1  | Bob

2  | Sally

 

User_Phone_Group

=======================

id | user_id | name

-----------------------

1  | 1      | Business

2  | 1      | Home

3  | 2      | Work

4  | 2      | Pals

5  | 1      | Pizza

 

Phone

===================================

id | user_phone_group_id | number

-----------------------------------

1  | 1                  | 123-4567

2  | 1                  | 234-5678

3  | 3                  | 987-6543

4  | 5                  | 765-4321

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.