Spring JBDC Interview Questions and Answers - 1
Question: 1
What is JDBC Driver Interface?
The JDBC Driver Interface provides vendor specific implementations of the abstract classes provided by the JDBC API.
Each Vendor’s driver must provide implementations of the java.sql.Connection, Statement, PreparedStatement, CallableStatement, ResultSet and driver.
Question: 2
What packages are used in JDBC?
There are 8 packages:
java.sql.Driver,
Connection,
Statement,
PreparedStatement,
CallableStatement,
ResultSet,
ResultSetMetaData,
DatabaseMetaData.
Question: 3
What are the types of statements in JDBC?
Statement – to be used createStatement() method for executing single SQL statement.
PreparedStatement – To be used preparedStatement() method for executing same SQL statement over and over.
CallableStatement – To be used prepareCall() method for multiple SQL statements over and over.
Question: 4
What is the difference between JDBC 1.0 and JDBC 2.0?
The JDBC 2.0 API includes many new features in the java.sql package as well as the new Standard Extension package, javax.sql. This new JDBC API moves Java applications into the world of heavy duty database computing.
The new JDBC Standard Extension API, an integral part of Enterprise Java Beans (EJB) technology, allows you to write distributed transactions that use connection pooling, and it also makes it possible to connect to virtually any tabular data source, including files and spread sheets.
The JDBC 2.0 API includes many new features like
Scrollable result sets
Batch Updates
Connection Pooling
Distributed transactions
set autocomit()
Question: 5
What is JDBC?
JDBC is a set of Java API for executing SQL statements.
This API contains of a set of classes and interfaces to enable programs to write pure Java Database applications.
JDBC is a layer of abstraction that allows users to choose between database. It allows you to change to a different engine and to write to a Single API.
JDBC allows you to write database applications in Java without having to concern yourself with the underlying details of a particular database.
JDBC standards for Java Database Connectivity. It is a specification given by Sun Microsystems and standards followed by X/Open SAG (SQL Access Group) CLI (Call Level Interface) to interact with the DB.
7000+ Acronyms and Abbreviations Quiz Questions Pdf More
7000+ Question Tags Exercises with Answers Pdf More
7000+ TNPSC Group 4 Study Material Pdf free Download More
7000+ TNPSC Group 4 General English Question Paper with Answers More
7000+ Prepositions Exercises for Class 10 with Answers Pdf More
100+ Universe, Earth, Solar System, Stars, Space Questions Answers More
Top 50+ Past Tense Questions and Answers More
1000+ Advanced Excel MCQ Questions and Answers Pdf More
1000+ Engineering Materials MCQ Questions & Answers Pdf More
1000+ Advanced C Programming Interview Questions & Answers More