Question: Task 4 Connecting a java program to a database Create a new java project inside your IDE, IntelliJ. Add a new java class to the

Task 4 Connecting a java program to a database Create a new java project inside your IDE, IntelliJ. Add a new java class to the src-folder of your project and call it DatabaseConnection Connect your program to the classicmodels database. (Make sure that you have added classicmodels to your MYSQL-server). Write two different methods in DatabaseConnection class. One for retrieving data from database and the other for updating or deleting) data in the database (you can decide about what the methods shall do). resultset, executeQuery and execute Update shall be used in this task and you need to make sure that you understand the difference between executeQuery and execute Update and when you shall use each of them. It is up to you how advance you want your program to be, but you have to create at least two methods: one for executeQuery and one for execute Update and make sure that both methods work properly
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
