Read and download free pdf of CBSE Class 12 Informatics Practices Java Database Connectivity To MySQL Assignment. Get printable school Assignments for Class 12 Informatics Practices. Class 12 students should practise questions and answers given here for Java Database Connectivity To Mysql Informatics Practices in Class 12 which will help them to strengthen their understanding of all important topics. Students should also download free pdf of Printable Worksheets for Class 12 Informatics Practices prepared as per the latest books and syllabus issued by NCERT, CBSE, KVS and do problems daily to score better marks in tests and examinations
Assignment for Class 12 Informatics Practices Java Database Connectivity To Mysql
Class 12 Informatics Practices students should refer to the following printable assignment in Pdf for Java Database Connectivity To Mysql in Class 12. This test paper with questions and answers for Class 12 Informatics Practices will be very useful for exams and help you to score good marks
Java Database Connectivity To Mysql Class 12 Informatics Practices Assignment
Brief Summary of the Chapter:
In this chapter we shall know how to connect the front end NetBeans application with back-end databases through JDBC,ODBC for making GUI applications.
KEY POINTS:
• Classes used for Database Connectivity
- Driver Manager Class,
- Connection Class,
- Statement Class,
- ResultSet Class
• Prerequisites for connecting to MySQL from Java
MySQL provides connectivity for client applications developed in the Java Programming language via a JDBC driver known as MySQL Connector/J
• Connection:
A connection is the session between the application program and the database. To do anything with database, one must have a connection object.
• Connecting to MySQL from Java :
Steps for Creating Database Connectivity Application
There are mainly six steps –
Step-1 Import the Packages Required for Database Programming.
Step-2 Register the JDBC Driver
Step-3 Open a Connection
Step-4 Execute a Query
Step-5 Extract Data from Result set
Step-6 Clean up the Environment
Now to connect to a database, you need to know database’s complete URL, the user’s Id and password- Jdbc:mysql://localhost/<database-name>?user=”username” & password=”password”
• ResultSet Methods
A result set (represented by a ResultSet object) refers to a logical set records that are fetched from the database by executing a query and made available to the application –program. There are various resultSet methods such as:-
• next( ) :moves the cursor forward on row.
• first( ) :moves the cursor to the first row in the ResultSet Object.
• Last( ) :moves the cursor to the last row in the ResultSet object.
• relative(in rows) :moves the cursor relative to its current position.
• Absolute(int rno) :positions the cursor on the rno-th row of the ResultSet object.
• getRow( ) :Retrieves the current row number the cursor is pointing at.
That is if cursor is at first row the getRow( ) will return 1.
SOLVED QUESTIONS:
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.
6. 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.
7. 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.
8. 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.
9. 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.
10. 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 application program.
11. 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.
12. 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.
13. 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
14. 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 thin client, applets embedded in Web pages can contain downloadable JDBC code to enable remote database access.
15. 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.
16. 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.
17. Name the methods which are useful for executing SQL statements.
Ans: There are two methods which are responsible for executing SQL statements. These are:
• executeQuery( )- For SQL statements that produce a single result set (like simple SQL query).
• executeUpdate( )- For executing INSERT,UPDATE OR DELETE statements and also SQL DDL(Data Definition Language) statements.
Unsolved Questions:
1. Differentiate between JDBC and ODBC ?
2. What are the main tasks of JDBC ?
3. What are the various steps involved in establishing a JDBC connection?
4. Name the method used to trigger an update query using JDBC.
CBSE Class 12 Informatics Practices Data Handling using Pandas Assignment |
CBSE Class 12 Informatics Practices Societal Impacts Assignment |
More Study Material
CBSE Class 12 Informatics Practices Java Database Connectivity To Mysql Assignment
We hope you liked the above assignment for Java Database Connectivity To Mysql which has been designed as per the latest syllabus for Class 12 Informatics Practices released by CBSE. Students of Class 12 should download and practice the above Assignments for Class 12 Informatics Practices regularly. We have provided all types of questions like MCQs, short answer questions, objective questions and long answer questions in the Class 12 Informatics Practices practice sheet in Pdf. All questions have been designed for Informatics Practices by looking into the pattern of problems asked in previous year examinations.
Assignment for Informatics Practices CBSE Class 12 Java Database Connectivity To Mysql
Our team of expert teachers have referred to NCERT book for Class 12 Informatics Practices to design the Informatics Practices Class 12 Assignments. If you practice at least one test paper daily, you will get higher marks in Class 12 exams this year. Daily practice of Informatics Practices course notes and related study material will help you to clear all your doubts and have stronger understanding of all concepts. You can download all Revision notes for Class 12 Informatics Practices also from www.studiestoday.com absolutely free of cost.
Java Database Connectivity To Mysql Assignment Informatics Practices CBSE Class 12
All questions and their answers for the assignment given above for Class 12 Informatics Practices have been developed as per the latest curriculum and books issued for the current academic year. The students of Class 12 can rest assured that the best teachers have designed the questions of Informatics Practices so that you are able to revise the entire syllabus if you do the assignments. Lot of MCQ questions for Class 12 Informatics Practices have also been given in the worksheets and assignments for regular use. All study material for Class 12 Informatics Practices students have been given on studiestoday.
Java Database Connectivity To Mysql Assignment CBSE Class 12 Informatics Practices
Regular assignment practice helps to get a more comprehensive understanding of Java Database Connectivity To Mysql concepts. Assignments play a crucial role in understanding Java Database Connectivity To Mysql in CBSE Class 12. Students can download all the assignments of the same chapter in Class 12 Informatics Practices in Pdf format. You can print them or read them online on your computer or mobile.
CBSE Informatics Practices Class 12 Java Database Connectivity To Mysql Assignment
CBSE Class 12 Informatics Practices latest books have been used for coming up with the latest questions and solutions for the above assignment. If you have revised all concepts relating to Java Database Connectivity To Mysql then you should attempt all questions given in the test sheets above. We have also provided lot of Worksheets for Class 12 Informatics Practices which you can use to further make your self stronger in Informatics Practices
You can download free Pdf assignments for CBSE Class 12 Informatics Practices Java Database Connectivity To Mysql from StudiesToday.com
The Java Database Connectivity To Mysql Class 12 Informatics Practices Assignments have been designed based on latest CBSE syllabus for Class 12 Informatics Practices issued for the current academic year
Yes, These printable assignments for Java Database Connectivity To Mysql Class 12 Informatics Practices are free to download and print
All topics given in Java Database Connectivity To Mysql Informatics Practices Class 12 Book for the current academic year have been covered in the given assignment
No, all Printable Assignments for Java Database Connectivity To Mysql Class 12 Informatics Practices have been given for free and can be downloaded in Pdf format
Just click on the View or Download button below, then another window with the Pdf will be visible, just click on the Pdf icon to download the free assignments for Java Database Connectivity To Mysql Class 12 Informatics Practices
Yes, apart from Informatics Practices you can download free assignments for all subjects in Class 12
Our team of expert teachers at studiestoday.com have provided all answers for the practice questions which have been given in Class 12 Informatics Practices Java Database Connectivity To Mysql assignments
Solved assignments have been provided on StudiesToday for all chapters in Class 12 Informatics Practices assignments
Latest syllabus issued for current academic year by CBSE has been used to design assignments for Class 12
Yes, we have provided detailed answers for all questions given in assignments for Class 12 Informatics Practices
Download free solved assignments for Class 12 Informatics Practices and practice them daily to get better marks in examinations
Yes, students in Class 12 will be able to understand the concepts by solving Informatics Practices for Java Database Connectivity To Mysql
Yes, we have given practice assignments for all important topics given in Java Database Connectivity To Mysql