Explanation of `Connection`, `DriverManager` and `SQLExeption` in Java

java dev.to

1. Connection Represents a live connection to your database You use it to: execute SQL (SELECT, INSERT, etc.) manage transactions (commit, rollback) Think of it as: a session between your Java app and the DB. A connection (session) with specific database. SQL statements are executed and results are returned within the context of a connection. 2. DriverManager Responsible for creating the Connection It: finds the correct JDBC driver (e.g., MySQL) opens the

Read Full Tutorial open_in_new
arrow_back Back to Tutorials