JDBC

JDBC   

Java Data Base Connectivity

What is JDBC ??

      JDBC is a layer between the User Interface and the Database.

Connectivity Steps:

        In this section I am going to explain the connectivity between the Java Program  and the MySQL database. For this we need to download the Connector/J driver. You can download from the here.

Note: Based on the database such as MySQL, Oracle you've to download the proper Driver, then only the driver connectivity will done without any errors.

JDBC Architecture



Creating Project by using Eclipse

Click :
File -> New  -> Dynamic Web Project
Enter Project Name and hit Finish Button


Next You have to Connect the Driver

  • Project -> Driver -> Database


 For the eclipse users import the mysql-connector-java-5.1.34-bin.jar in the

 Web Content ->
         META-INF ->
                  WEB-INF ->
                                lib ->

You can also drag & drop method to add the .jar file in the Project.

The next you have to connect the driver in the program. Just follow the code

Create the .java in the Java Resource: src click Package -> class file 








1 comment:

  1. JDBC is more complex but you make it as easier one.. thanks sir

    ReplyDelete