It will be a personal memo that divides the process of connecting the Java database into 5 stages. We apologize for any inconvenience, but we would appreciate it if you could teach us!
Java-database connection / Java-MySQL connection ① Overview of JDBC and JDBC driver (2) JDBC driver acquisition method (for MySQL) and data connection preparation ③-1 How to set CLASSPATH in environment variable ③-2 How to set CLASSPATH to Eclipse build bus ④ Load JDBC driver ⑤ Connect to database (MySQL) to search table information and display search results
To connect to a database using a Java program, you need to use a mechanism called "JDBC (Java DataBase Connectivity)".
JDBC is a general term for APIs for accessing databases such as MySQL and PostgreSQL and spreadsheets (data files) such as Excel from Java language programs.
In order to use JDBC, the vendors that provide each database and the vendors that provide spreadsheets provide parts called "JDBC drivers". To connect to a database or spreadsheet, you need to download the "JDBC driver".
This is because the standard system libraries provided by the JDK do not include the components to connect to each database or spreadsheet.
The standard system library provided by the JDK includes the "JDBC Driver Manager", which is used to call the JDBC driver. The JDBC driver connects to the database specified by the JDBC driver manager.
Java-database connection / Java-MySQL connection ① Overview of JDBC and JDBC driver (2) JDBC driver acquisition method (for MySQL) and data connection preparation ③-1 How to set CLASSPATH in environment variable ③-2 How to set CLASSPATH to Eclipse build bus ④ Load JDBC driver ⑤ Connect to database (MySQL) to search table information and display search results
Recommended Posts