Professional Documents
Culture Documents
Tutorial Week 8
Tutorial Week 8
Tutorial Week 8
Our readings (lecture notes and video lecture) this week discuss the JDBC (Java Database
connectivity). Write the answers for all questions in the table according to your understanding.
PLEASE USE YOUR OWN WORDS. DO NOT COPY FROM THE WEB.
Questions Answers
1. What are the advantages of developing database The advantages of developing
applications using Java? database applications using Java is
Platform independence Java
program will run on any platform
and access any relational database.
2. Describe the following JDBC interfaces: Driver, Driver is to load JDBC drivers
Connection, Statement, and ResultSet. Connection establishing connection
to the database
Statement preparing and executing
an SQL statement
ResultSet is for the output
3. Write a code fragment to load a JDBC driver. Class.forName(“JDBCDriverClass”);
4. Create a connection object using Connection connection =
DriverManager.getConnection() method. DriverManager.getConnection();
5. Describe the differences between execute, Execute method should be used if
executeQuery, and executeUpdate. the execution produces
multiple result sets, multiple update
counts, or a
combination of result sets and
update count.
MMR2020@FSKM
Lecture Assignment
MMR2020@FSKM