CBSE Class 12 Informatics Practices Java Database Connectivity To MySQL Assignment



1. What is the importance of java.sql.*; in java jdbc connection ?

Ans: The java.sql.package has to be imported first before we can create a java jdbc connection to the database.

2. What is DriverManager ?

Ans: DriverManager a class of java.sql package that controls a set of JDBC drivers. Each driver has to be registere with this class.

3. What is the purpose of connection.close() method?

Ans: This method is used for disconnecting the connection. It frees all the resources occupied by the database.

4. Name the four components of JDBC.

Ans: JDBC consisits of four components: The JDBC API, JDBC Driver Manager, The JDBC Test Suite and JDBC-ODBC Bridge.

5. What are the steps involved in establishing a connection? 

Ans:To establishing a connection we need to follow two steps: a) loading the driver and b) making a connection.

6. What is ResultSet ?

Ans:A result set (represented by a ResultSet object) refers to a logical set of records that are fetched from the database by executing a query and made available to the applicationprogram.

7. What type of parameter that used in executeQuery( ) method?

Ans: The executeQuery( ) method has a single String parameter. This parameter must be valid SQL command.

8. What is Connection? What is its role?

Ans: A Connection (represented through Connection object) is the session between the application program and the database. To do anything with database, one must have a connection object.

9. What all JDBC classes/objects are used in a database connectivity application?

Ans: a) DriverManager Class b) Connection Object c)Statement Object d) ResultSet Object

10. What is JDBC? What is its basic functionality?

Ans: The JDBC(Java Database Connectivity ) API defines interfaces and classes for writing database applications in Java by making database connections. Using JDBC we can send SQL, PL/SQL statements to almost any relational database. JDBC is a Java API for executing SQL statements and supports basic SQL functionality. It provides RDBMS access by allowing us to embed SQL inside Java code. Because Java can run on a thinclient, applets embedded in Web pages can contain downloadable JDBC code to enable remote database access.

11. What is the JDBC-ODBC Bridge?

Ans: The JDBC-ODBC Bridge is a JDBC driver which implements JDBC operations by translating them into ODBC operations. To ODBC it appears as a normal application program. The Bridge implements JDBC for any database for which as ODBC driver is available. The Bridge is implemented as the sun.jdbc.odbc Java package and contains a native library used to access ODBC.

12. Explain the purpose of DriverManager.

Ans:The DriverManager looks after the managing the drivers for a JDBC application. When it is instantiated it makes an attempt to load the driver classes. When the method getConnection( ) is invoked, the driver manager attempts to locate the suitable driver. The DriverManager obtains the information about the drivers such as registering, locating, finding the drivers loaded, setting the time to wait when it tries to get the connection to a database.

Please refer to attached file for CBSE Class 12 Informatics Practices Java Database Connectivity To MySQL Assignment



Click to View or Download pdf file
Click for more Informatics Practices Study Material

Latest NCERT & CBSE News

Read the latest news and announcements from NCERT and CBSE below. Important updates relating to your studies which will help you to keep yourself updated with latest happenings in school level education. Keep yourself updated with all latest news and also read articles from teachers which will help you to improve your studies, increase motivation level and promote faster learning

CBSE Boards Answer Sheet Evaluation Class 10 and Class 12

HRD Minister Ramesh Pokhriyal, through a video conference with all the education ministers of the state, discussed the further steps to be taken to smoothen the education process during the Covid-19 lockdown. The most important topic which was discussed repeatedly on...

Class 12 Board Exams Datesheet Announced

CBSE has announced the datesheet of the remaining class 12 board exams, see below:  

Board Exams Class 10 and Class 12 Datesheet 2020

CBSE has announced the datesheet for the remaining exams of class 10 and class 12 exams. The exams are going to start in July. The class 10 and 12th board exams will be conducted for the remaining 29 papers from July 1 to July 15, 2020, at various centers nominated by...

CBSE Board Exams in July Press Release

CBSE has released press note for the dates for the CBSE Board exams for Class 10. CBSE said “With regards to conduct of Class X examinations several queries are being received by the CBSE. In this context, it is once again reiterated that remaining examinations of...

Board Exams Class 10 and 12 Notification by CBSE

Because of the prevailing condition of spread of COVID-19 pandemic in the country, special efforts are required for conducting examinations in a safe manner. As a number of students have shifted from the district of their school to some other district in the country,...

CBSE Online Training for Teachers 2020

It is clear that this pandemic has utterly disrupted an education system that many assert was already losing its relevance. Enhancing professional development digitally is a need in the times of COVID-19, where social distancing and remote interactions is the new...

Studies Today