What is JDBC?

Sql question


JDBC stands for Java Database Connectivity, which is a standard Java API for database-independent connectivity between the Java programming language and a wide range of databases.

The JDBC library includes APIs for each of the tasks mentioned below that are commonly associated with database usage.

  • Making a connection to a database.
  • Creating SQL or MySQL statements.
  • Executing SQL or MySQL queries in the database.
  • Viewing & Modifying the resulting records.

For example, if you are trying to implement login module in swing or jsp server:

  1. Fetch values from text box
  2. Make a connection to database
  3. Fire an query
  4. Fetch result in Java code
  5. Use that result to authenticate user whether he or she is logging in with valid credentials or not
1 Like