If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Design Question

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-01-08, 20:43
jray18 jray18 is offline
Registered User
 
Join Date: Nov 2008
Posts: 2
Design Question

I haven't don't much in the way or designing a high traffic, production database, but now I find myself in a project where I need to do just that. I have the need to store multiple values per user for several fields. For example, one field is education history in which the user can store as many education records as they'd like. My question is, would it be better to store these values in a separate table that I can join? I saw another method that stored all the values in a single text field for each user record and simple stored the information to parse the data out. This would avoid me from doing 4 or 5 joins on each select, but I didn't know if there was a downside to it. Thanks in advance! Feel free to ask for more information if any of my description is confusing.
Reply With Quote
  #2 (permalink)  
Old 11-01-08, 22:03
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
the downside is that you cannot search it without doing a table scan, and that doesn't scale (the query gets slower and slower the more rows there are)

every one-to-many relationship should gets its own separate table
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book

Last edited by r937; 11-01-08 at 22:42.
Reply With Quote
  #3 (permalink)  
Old 11-01-08, 22:18
jray18 jray18 is offline
Registered User
 
Join Date: Nov 2008
Posts: 2
Thanks for the feedback! I did not think about searching, but that does make perfect sense. I appreciate the time you took to respond. Thanks again.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On