I want to save an array of strings that I have in my java program to a mysql table field or column. What is the best way to save this array knowing that you can't save an array as a one column in the database table. I know that it's better to use normalization but I need to save the array into a one column and not into individual columns. Is it a good idea to concatenate all the elements of the array into one string and save it into the table as a Text field???.... Thanks for your help !!!!!!
Take the 2-minute tour
×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
|
closed as unclear what you're asking by jlordo, Bohemian, Sean Owen, Bill the Lizard♦ Jun 27 '13 at 15:42
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.
It highly depends on what usage this string array has. If you won't be concatenating and splitting very often, it's ok. IMHO you can do this and observe the performance. If the performance is not good, then consider another approach, like:
|
|||||||||||||
|