What I know there is no super easy way to write your hashtable to a database, since you want to store a java object. The most common tool/framework to do stuff like this is hibernate which lets you define java objects to database mapping and then you can simply retrieve and store object in the database without having to handle sql to much.
You basically make a hibernate mapping file, an xml file which stores information on how an object is stored in the database and its relations to other objects etc. Then you have the corresponding java Object Prod. You can then use hibernate like the following...
Get a session
start a database transaction
//do work
commit transaction
where work can be for example.
Query q = session.createQuery("from Prod");
List<Prod> prods = q.list();
or create a new Prod and persist it...
Prod p = new Prod( input... );
session.save(p);
This way you don't have to handle sql inserts and getting out info from a db table and storing it to an object, hibernate does that for you.
If you use netbeans for example for your project there are built in tools that helps you create everything you need for hibernate to work. There are wizards that can access your DB, create suitable mapping and java Object files, and then you just use it. But you'll need to read a little on the basics of hibernate.
…