| | |
Database Table Design
Please support our Database Design advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jun 2007
Posts: 3
Reputation:
Solved Threads: 0
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?
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?
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?
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?
******************
15 minutes of research can save you 50% or more. forum.feodorgeorgiev.com
***Need Web Hosting?
******************
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?
******************
15 minutes of research can save you 50% or more. forum.feodorgeorgiev.com
***Need Web Hosting?
******************
![]() |
Similar Threads
- Help on General Best Practices for Table/Database Design (Database Design)
- insert data from one form into two diffent database table (JSP)
- Database table convert to xml document to cache (VB.NET)
- How can I create database/table images in MySQL (PHP)
- Send all items in a listBox to SQL server database table (ASP.NET)
- database table design problems (Database Design)
Other Threads in the Database Design Forum
- Previous Thread: exercise in DIstributed Database Systems
- Next Thread: want a search facility
| Thread Tools | Search this Thread |





