Week 23: CST 363 Week 6: Java and MySQL
As we are getting close to the end of this course, I’ve really been enjoying the projects we’ve been working on. This week, we dove into database programming with Java and MySQL using the Connector/J JDBC driver. One of the key things I learned was how to set up a connection between a Java program and a MySQL database using the DriverManager.getConnection() method. This is super important for running SQL queries and handling operations like SELECT, INSERT, UPDATE, and DELETE.
We also covered how to manage queries in Java using the Statement and PreparedStatement interfaces. While Statement works for basic queries, PreparedStatement is more secure because it helps prevent SQL injection by handling user input safely.
Overall, this week really boosted my confidence in connecting Java applications to databases, running queries, and managing results efficiently.
Comments
Post a Comment