The Artima Developer Community
Sponsored Link

Design Forum
database search question

1 reply on 1 page. Most recent reply: Jul 31, 2003 6:40 AM by David

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
leo dawson

Posts: 4
Nickname: omairsoft
Registered: Jul, 2003

database search question Posted: Jul 29, 2003 11:56 PM
Reply to this message Reply
Advertisement
hi everyone

i have a question. I have a site where users can select their top 10 skills. Basically the form consists of 10 different check boxes and the users can check as many as they want where each check box corresponds to a particular skill.

Now this is my question. After the users select their skills, should i get the check box values and concatenate them into one string seperated by comma's and store that one string in one text field of the database or should i have 10 different columns in the database to store these values. Is this a good practice.

Now based on these values, I need to perform a keyword search to find a user of a particular skill.

What I was planning to do is to store all the skills of a particular user as one string (seperated by comma) in the database. And while searching by keyword , retrieve this string stored in the database and check if the entered keyword exists in that string or not.

I would really appreciate any advice on the same. Is this the best way to do it. The programming language i'm using is java and the database is mysql.

thanks
leo


David

Posts: 150
Nickname: archangel
Registered: Jul, 2003

Re: database search question Posted: Jul 31, 2003 6:40 AM
Reply to this message Reply
Personally, I wouldn't. From a size point of view, saving a boolean value for each skill is likely to be far more efficient than having a VARCHAR field that you have to encode/decode on every change and it'll also make searching much slower.

In my mind the only question is whether this list of available skills could change, in which case you'll probably need an intersection entity:

client 1----------* client_skills *----------1 skill

Flat View: This topic has 1 reply on 1 page
Topic: Framework for Application to Detect Database Failure Previous Topic   Next Topic Topic: Can anyone help me on pseudocode?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use