I want to store a Vector<Vector<Object>> in mysql database. What is the best data Tpye that i can use in mysql and java to store and retrieve the datas.

Recommended Answers

All 2 Replies

You can either do one of to thing..

[1] If you know what the vector sizes are, create a table within mysql for the vector vector where the mysql table is the same size.

[2] create a table with a field that has a data type "BLOB". Save the vector vector as a binary string to this BLOB field. I recommend you use a unique ID to associate the BLOB with an identifier.

fpsasm: one of the reasons to use Vector, is because you don't know up front what the size will be, and the size can change.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.