TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

JDBC

JDBC API Components

Overview

Let’s learn JDBC API Components in this tutorial. JDBC API is a collection of classes and interfaces that provide database access. Using the JDBC API, we can access any database. The core JDBC API is comprised of two main packages. We automatically get both packages when we download the Java on the machine.

The two packages are as follows:

java.sql.*;
javax.sql.*;

 

 

JDBC API TestingDocs

JDBC Components

The main JDBC API Components are as follows:

  • DriverManager
  • Connection
  • Statement
  • ResultSet
  • ResultSet Metadata

DriverManager

DriverManger manages the JDBC drivers and establishes the connection to the database. It uses the JDBC URL to establish the connection to the database. It returns the Connection object on a successful database connection.

Connection

The Connection object represents the session to the connected database. The createStatement() method creates a Statement object to send SQL statements to the database.

Statement

The Statement object is used for executing the SQL statements and returns the SQL query results.

Example: stmt.executeQuery(sqlQuery)

ResultSet

The ResultSet object refers to the SQL query result table. The ResultSet object maintains a cursor pointing to the current row of the query result table. We can use a while loop to iterate through the ResultSet.

—

Oracle Database Tutorials on this website:

https://www.testingdocs.com/oracle-database-tutorials-for-beginners/

More information about Oracle Database:

https://www.oracle.com/database/

Related Posts

tnsnames File Oracle TestingDocs

JDBC /

Connect to Oracle Database using JDBC Thin Driver

Display Oracle Database Table JDBC

JDBC /

Display data from Oracle Database table using JDBC

JDBC /

JDBC ResultSet Interface

Configure Build Path Eclipse

JDBC /

Configure JDBC Driver in Java Project

JDBC DriverManager Class

JDBC /

JDBC DriverManager Class

‹ JDBC ResultSet Interface› Display data from Oracle Database table using JDBC

Recent Posts

  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Print Triangle Pattern Flowchart
  • RAPTOR Editions
  • Flowgorithm Conditional Breakpoint Statement
  • Flowgorithm Read Numbers from File Example
  • Search Text File Flowchart Example
  • Flowgorithm Turtle Graphics Symbols
  • Draw Circle using Flowgorithm Turtle

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version