DATABASE CONNECTIVITY TO MYSQL - PowerPoint PPT Presentation

1 / 6
About This Presentation
Title:

DATABASE CONNECTIVITY TO MYSQL

Description:

DATABASE CONNECTIVITY TO MYSQL To Connect to a relational database from within Java Application, can be done using JDBC API of Java. It mainly do the following tasks. – PowerPoint PPT presentation

Number of Views:28
Avg rating:3.0/5.0
Slides: 7
Provided by: others
Category:

less

Transcript and Presenter's Notes

Title: DATABASE CONNECTIVITY TO MYSQL


1
  • DATABASE CONNECTIVITY TO MYSQL

2
  • To Connect to a relational database from within
    Java Application, can be done using JDBC API of
    Java. It mainly do the following tasks.
  • Establish a connection with a database.
  • Send SQL statements to database server.
  • Process the result obtained.

3
Classes Used for Database Connectivity
  • Four main classes in the JDBC API that are
    generally used for database connectivity.
  • DriverManager Class
  • Connection Class
  • Statement Class
  • ResultSet Class

4
Prerequisites for connecting to MySQL from Java
  • MySQL provides connectivity for client
    applications developed in the Java programming
    language via a JDBC driver, which is called MySQL
    Connector/J

5
To check the availability
  • Start NetBeans IDE
  • Click Tools Libraries
  • In the Library box, look for MySQL JDBC driver
    under the class Libraries.
  • Note down its path

6
Steps for creating database connectivity
applications
  • Import the packages required for database
    programming
  • Register the JDBC driver
  • Open a connection
  • Execute a Query
  • Extract Data from the Result set
  • Clean up the environment
Write a Comment
User Comments (0)
About PowerShow.com