Database Table Design

Reply

Join Date: Jun 2007
Posts: 3
Reputation: vijayoracle is an unknown quantity at this point 
Solved Threads: 0
vijayoracle vijayoracle is offline Offline
Newbie Poster

Database Table Design

 
0
  #1
Jun 29th, 2007
Currently i am designing database for Portal.
On Portal screen, There are some fields which are having multiselection facility

e.g

1) professional is one of the field having
1)photographer
2)skydiving
3)painter
4)modeling

are values, User can have more then one profession.

Same type of 30 fields are available on single screen.

So the storage for single such field i have to created new table for multiple values storage.
For that total 30 child table get created for a single screen.

Can any one help me, how do i manage this in minimum tables?
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 30
Reputation: sibir1us is an unknown quantity at this point 
Solved Threads: 2
sibir1us's Avatar
sibir1us sibir1us is offline Offline
Light Poster

Re: Database Table Design

 
0
  #2
Jun 29th, 2007
All you need is actually just 3 tables:
1) table with the customer information (customerID, name, age, etc)
2)Lookup table for the proffessions (professionId, professionName, etc)
3) table for CustomerProffessions (custommerProffessionId, etc)
Make sure that the CustomerProffessions table has 2 foreign keys: customerID and professionId. That solves your problem nicely, dont you think?
******************
15 minutes of research can save you 50% or more. forum.feodorgeorgiev.com

***Need Web Hosting?
******************
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 3
Reputation: vijayoracle is an unknown quantity at this point 
Solved Threads: 0
vijayoracle vijayoracle is offline Offline
Newbie Poster

Re: Database Table Design

 
0
  #3
Jun 30th, 2007
Thanks for reply.

I have 30 different filed like "professional" on single screen. How do i manage in three tables?
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 30
Reputation: sibir1us is an unknown quantity at this point 
Solved Threads: 2
sibir1us's Avatar
sibir1us sibir1us is offline Offline
Light Poster

Re: Database Table Design

 
0
  #4
Jun 30th, 2007
Try to understand what "primary-foreign key" relationship is and how to use lookups.
******************
15 minutes of research can save you 50% or more. forum.feodorgeorgiev.com

***Need Web Hosting?
******************
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC