Skip to main content

Posts

Showing posts from June, 2013

JDBC Driver types

Application that use JDBC require JDBC drivers. JDBC drivers are software libraries that communicate between a java application and a database. All JDBC drivers follow the API defined in java SE .                                                          There are four type of drivers available distinguished by their architecture they are: Type 1: JDBC-ODBC Bridge This is an old type when the jdbc is started  ODBC is the dominant  model to communicate with the data base. And java first communicate with database through ODBC. -communicates through ODBC drivers installed on client Can talk to any database But -not  100% Java and not portable -drivers must be on the same computer as application -the ODBC driver must match the database version Type 2:native API/partly Java Communicates through OS specific Api Better performance than JDBC/ODBC Bridge But -not  100% Java and not portable -native API driver must be

What is JDBC and History of JDBC

What is JDBC? JDBC is a java-based API for connecting to relational databases such as mysql , sql,sql server ,postgresql and many others. JDBC stands for “Java Database Connectivity ”. JDBC introduced in 1997 as a part of JDK 1.1 and it been a part of all release of java SE since 1997.   History of JDBC Who uses JDBC? Common uses: -web-based applications hosted by java Enterprise Edition(JEE) servers -Desktop applications working with local and remote databases. Not-so common uses: -Android application  -calls to web service middleware are more common  Alternative to JDBC -Higher level abstraction(usually part of larger application frameworks)   -Spring JdbcTemplate  -RIFE Data mapping APIs -           Hibernate: the most popular object-relational mapping (ORM) API -           I batis: Apache project for mapping SQL results to Java objects -           Java Persistence API(JPA): Part of the java