Java & MySQL

I have doubt on two questions!!!

1. I want to store / retrive a Java array into one of the column in the MySQL table. How to do that?

 int[] a = {1,2,3,4,5,6} or {1,2,3} ; //dynamic

to be stored in one the table in the database say my_array_table.

Please guide me as soon as possible.

2. Then another questions is, should i use Connector / J for  MySQL or JDBC API is more than enough for using MySQL?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

1. Serialize it and store the it as bytes
2. >>should i use Connector / J for  MySQL. Yes. That *is* JDBC (it's the driver)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Store everthing seperaty. So you can always use sql. It's a bit more work but things are alway readable.
And another possibilty is to save all in a long string.

For your seconde question: use Connector/J. It's good and handy. I use it for more then 3 years!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.