Answer the question
In order to leave comments, you need to log in
Java: What's the best way to design a MySQL (JDBC) database class?
It is required to create a DataBankManager class, with the help of which other classes (let's call them Process1, Process2) will save data to the database / read data from there. Moreover, these other processes will work in parallel (in the sense of multithreading). So the question is: what is the best way to implement the DataBankManager? So far, I've come up with a few options:
public void saveSomeData(Data data) {
PreparedStatement pstmt = connection.prepareStatement("INSERT ...");
pstmt.executeBatch();
pstmt.close();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question