java - whats the different between JConnection and JDBC? -


I used this code in a small demo project. But what exactly is the difference between the brightness pattern and the JunkNeck package from JDBC

  package mypackage; Import org.j2os.shine.jconnection. *; Import java.sql.ResultSet; Public class class 1 {public static zero chief (string [] args throws exceptions {JDBC mydb = new JDBC (); System.out.println (mydb.login ("com.mysql.jdbc.Driver", "jdbc: mysql: // localhost / test", "root", "root", true)); Mydb.executeSQLQuery ("Enter the product (name) values ​​('test')"); Mydb.commit (); //////////////////////////////////////////////// //////////////// mydb.login ("com.mysql.jdbc.Driver", "jdbc: mysql: // local host / test", "root", "root" , truth); Results reset r = mydb.getSQLQueryContent ("Choose from the product"); While (r.next ()) {System.out.println (r.getString ("name")); } Mydb.commit (); }}  

I have not used it, but it shows up instantly The purpose of JConnection is to extract some of the JDBC drugs. In other words, JDBC is a low level API for interacting with SQL database, and the JCC is a high-level library.

In your example, there is no JDBC statement nor connection. Remember to manage them and stop them, even with exceptions, getting the correct statement type etc., along with the new commanders can also be pain for old hands of JDBC.

There are several structures that work directly on JDBC unnecessary (iBatis, Hibernate, etc ...) but if you have to code JDBC directly, JConnection will reduce the amount of boilerplate you write .

Edit: From:

What is JConnection? JConnection is a tool for developers on the DB layer which resolves many fond problems. This tool helps you work with JDBC and Hibernate. JDBC Class This class helps you make less engagement with the statement and connection unit in JDBC.


Comments