MySQL Forums
Forum List  »  Newbie

Re: How to store data
Posted by: Arie Nagel
Date: August 19, 2005 02:49AM

You could just make a VARCHAR field and enter a string 'code1, code2 ...coden)'

However if you want something approaching a normalized database you really should create a third table. In it you store the applicant_id and the job_code (I'm assuming these columns are primary keys in their tables). Each combination represents an interest.

Something like this:

CREATE TABLE interests(
job_id INT(4),
applicant_id INT(5),
PRIMARY KEY(job_id, applicant_id)

If you still want to output a comma separated list of job codes you could then use this:

WHERE applicant_id = 1;

Options: ReplyQuote

Written By
August 19, 2005 12:44AM
Re: How to store data
August 19, 2005 02:49AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.