123ArticleOnline Logo
Welcome to 123ArticleOnline.com!
ALL >> Computer-Programming >> View Article

Introduction Of Java Jdbc

By Author: The Best Institute to Learn Java Training in Banga
Total Articles: 347

What is API Programming interface (Application programming interface) is a report that contains depiction of the extensive number of components of a thing or programming. It addresses classes and interfaces that item activities can bring after to talk with each other. An API can be made for applications, libraries, working structures, et cetera .. Pushed JAVA Training in bangalore JDBC Driver JDBC Driver is an item fragment that enables java application to interface with the database.
There are 4 sorts of JDBC drivers:
1. JDBC-ODBC interface driver
2. Native-API driver (for the most part java driver)
3. Network Protocol driver (totally java driver)
4. Thin driver (totally java driver)
1) The ODBC driver ought to be presented on the client machine.
2) Native-API driver The Native API driver uses the client side libraries of the database. The driver changes over JDBC procedure calls into nearby calls of the database API. It isn't made absolutely in java. Ideal position:
performance refreshed than JDBC-ODBC associate driver. Weight:The Native driver ought to be presented on the each client machine. The Vendor client library ought to be presented on client machine. 3) Network Protocol driver The Network Protocol driver uses middleware (application server) that converts JDBC calls clearly or roundaboutly into the trader specific database tradition. It is totally formed in java. Favored stance: No client side library is required in light of usage server that can perform numerous errands like looking at, stack modifying, logging et cetera. Weaknesses:
Network reinforce is required on client machine.Requires database-specific coding to be done in the inside level. Maintenance of Network Protocol driver ends up being over the top in light of the way that it requires database-specific coding to be done in the middle level. 4) Thin driver The thin driver changes over JDBC calls particularly into the trader specific database tradition. That is the reason it is known as thin driver. It is totally formed in Java vernacular. Good position:
Better execution than each and every other driver. No writing computer programs is required at client side or server side. Injury: Drivers depends upon the Database. 5 Steps to interface with the database in java There are 5 phases to interface any java application with the database in java using JDBC. They are according to the accompanying: Register the driver class
• Creating affiliation
• Creating clarification
• Executing questions
• Closing affiliation
Register the driver class The forName() procedure for class is used to enroll the driver class. This technique is used to capably stack the driver class. Accentuation of forName() methodology open static void forName(String className)throws ClassNotFoundException 2) Create the affiliation challenge The getConnection() technique for DriverManager class is used to develop relationship with the database. 1) open static Connection getConnection(String url)throws SQLException 2) open static Connection getConnection(String url,String name,String mystery word) hurls SQLException 3) Create the Statement dissent The createStatement() system for Connection interface is used to make enuncia
The topic of decree is fit to execute request with the database. open Statement createStatement()throws SQLException 4) Execute the request The executeQuery() procedure for Statement interface is used to execute request to the database. This procedure reestablishes the topic of ResultSet that can be used to get each one of the records of a table. open ResultSet executeQuery(String sql)throws SQLException 5) Close the affiliation challenge By closing affiliation dissent enunciation and ResultSet will be closed normally. Best core java training in Bangalore

The adjacent() methodology for Connection interface is used to close the affiliation. Phonetic structure of close() methodology open void close()throws SQLException Case to interface with the Oracle database in java For interfacing java application with the prophet database, you need to take after 5 phases to perform database organize. For this situation we are using Oracle10g as the database. So we need to know following information for the prophet database:
Driver class: The driver class for the prophet database is oracle.jdbc.driver.OracleDriver. Connection URL: The affiliation URL for the oracle10G database is jdbc:oracle:thin:@localhost:1521:xe where jdbc is the API, prophet is the database, thin is the driver, localhost is the server name on which prophet is running, we may in like manner use IP address, 1521 is the port number and XE is the Oracle advantage name.
You may get every one of these information from the tnsnames.ora record. Username: The default username for the prophet database is structure. Password: Password is given by the customer at the period of presenting the prophet database. Two ways to deal with stack the compartment record: 1.paste the ojdbc14.jar report in jre/lib/ext envelope 2.set classpath 1) stick the ojdbc14.jar record in JRE/lib/ext coordinator: Initially, look through the ojdbc14.jar archive by then go to JRE/lib/ext envelope and paste the compartment record here. 2) set classpath: There are two ways to deal with set the classpath:
• temporary • permanent

Total Views: 67Word Count: 1071See All articles From Author

Computer Programming Articles

1. Voip Phone System
Author: Unknown Member

2. How Inventory Management Software Can Grow Business?
Author: Unknown Member

3. Selenium Rc – Components And Usage Of Rc In Automation Testing
Author: Unknown Member

4. Strategies To Improve While Utilizing Selenium Webdriver By Testers
Author: Unknown Member

5. Samsung Is Very Particular On Releasing Its Galaxy X
Author: Unknown Member

6. Computer Programing
Author: Unknown Member

7. Automation Testing – Selenium Testing Tool Components (part-2)
Author: Unknown Member

8. Machine Learning In Finance: Why, What & How
Author: Unknown Member

9. Automation Testing – Selenium Testing Tool Components
Author: Siyaram Ray

10. How To Pair Your Airpods With Ipad, Iphone, Apple Watch, Mac, And Apple Tv
Author: Joey Williams

11. How To Download & Install Ios 12.1 Beta 2 In Your Iphone
Author: Ethan Grey

12. How To Fix Err_connection_reset Error For Macos
Author: Joey Williams

13. Coherent Aid For Android Application Development
Author: Daniel Carl

14. How To Fix Windows Update Error 0x80240034
Author: Ethan Grey

15. Widening Selenium With Image Recognition
Author: Siyaram Ray

Login To Account
Login Email:
Password:
Forgot Password?
New User?
Sign Up Newsletter
Email Address: