Explain the Java packages which contain JDBC classes and interfaces Java.SQL, Javax.SQL java.sql:
java.sql is an API to access and process the data stored in a database, typically a relational database using Java. Different drivers can be installed dynamically for the access of various databases, using a framework which is in-built in this JDBC API.
javax.sql:
javax.sql is a JDBC API for the server side for accessing and processing the data from the databases typically a relational database using Java. It is the essential part for J2EE. This API provides the facilities such as connection pooling, distributed transactions and row sets for the enterprise applications. An interface by name DataSource is provided in this API as an alternative to DriverManager to establish the connection.
DataSource and RowSet usage is direct, for the applications, where as connection pooling, distributed transactions are implemented by an infrastructure called middle-tier.
|