Tuesday, February 18, 2025

CST 363 - Week 6

I learned about using the JDBC API to connect a Spring Boot application with a MySQL database. I used JdbcTemplate to manage database connections and wrote SQL queries using PreparedStatements to prevent errors and avoid security risks. I learned how to insert, update, and retrieve data using JDBC, making sure that all values were set correctly before running the queries. One important thing I worked on was handling auto-generated primary keys after inserting data, which helped me store and manage new records properly.

Debugging SQL errors was a big part of my learning. I fixed issues like "Column index out of range" and "No value specified for parameter" by carefully checking the number of columns returned in queries and making sure all parameters were set. I also learned how to use ResultSet to get data from the database and store it in Java objects. Working with JDBC helped me understand how databases and web applications work together, and I now feel more confident in handling database operations in Java.

No comments:

Post a Comment

CST 334 - Week 8

I spent most of my time reviewing the materials to get ready for the final exam. The final covers two big topics, concurrency and persistenc...