Loading
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45www.dacc.edu.inPROF . SUPRIYAMANESUBJECT CODE: 602 SUBJECT NAME: ADVANCED JAVAUnit 1 : JDBC1) Which of the following contains both date and time?A) Java.io.dateB) Java.sql.dateC) Java.util.dateD) Java.util.dateTimeAnswer:D2) Which of the following is advantage of using JDBC connection pool?A) Slow performanceB) Using more memoryC) Using less memoryD) Better performanceAnswer:D3) Which of the following is advantage of using PreparedStatement in Java?A) Slow performanceB) Encourages SQL injectionC) Prevents SQL injectionD) More memory usageAnswer:C
Page 1
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45www.dacc.edu.inPROF . SUPRIYA MANE4) Which one of the following contains date information?A) Java.sql.TimeStampB) Java.sql.TimeC) java.io.TimeD) java.io.TimeStampAnswer:A5) What does setAutoCommit(false) do?A) commits trAnsweraction after each queryB) explicitly commits trAnsweractionC) does not commit trAnsweraction automatically after each queryD) never commits trAnsweractionAnswer:C6) Which of the following is used to call stored procedure?A) StatementB) PreparedStatementC) CallableStatmentD) CalledStatementAnswer:C7) Which of the following is used to limit the number of rows returned?A) setMaxRows(int i)B) setMinRows(int i)
Page 2
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45www.dacc.edu.inPROF . SUPRIYA MANEC) getMaxrows(int i)D) getMinRows(int i)Answer:A8) Which of the following is method of JDBC batch process?A) setBatch()B) deleteBatch()C) removeBatch()D) addBatch()Answer:D9) Which of the following is used to rollback a JDBC trAnsweraction?A) rollback()B) rollforward()C) deleteTrAnsweraction()D) RemoveTrAnsweraction()Answer:A10) Which of the following is not a JDBC connection isolation levels?A) TRANSWERACTION_NONEB) TRANSWERACTION_READ_COMMITTEDC) TRANSWERACTION_REPEATABLE_READD) TRANSWERACTION_NONREPEATABLE_READ
Page 3
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45www.dacc.edu.inPROF . SUPRIYA MANEAnswer:D11) Which driver uses ODBC driver to connect to the database?A) JDBC-ODBC bridge driverB) Native - API driverC) Network Protocol driverD) Thin driverAnswer:A12) How many JDBC product components does the Java software provides?A)3B) 2C) 4D) 5Answer:A13) How many types of JDBC drivers are available?A) 3B) 4C) 2D) 5Answer:B
Page 4
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45www.dacc.edu.inPROF . SUPRIYA MANE14) Which result set generally does not show changes to the underlying databasethat are made while it is open. The membership, order, and column values ofrows are typically fixed when the result set is created?A) TYPE_FORWARD_ONLYB) TYPE_SCROLL_INSENSITIVEC) TYPE_SCROLL_SENSITIVED) ALL MENTIONED ABOVEAnswer:B15) JDBC is a Java API that is used to connect and execute query to the databaseA) TrueB) FalseAnswer:A16) Which method is used for an SQL statement that is executed frequently?A) prepare StatementB) prepare CallC) create StatementD) None of the aboveAnswer:A
Page 5
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45www.dacc.edu.inPROF . SUPRIYA MANE17) What is used to execute parameterized query?A) Statement interfaceB) PreparedStatement interfaceC) ResultSet interfaceD) None of the aboveAnswer:B18) Which JDBC product components does the Java software provide?A) The JDBC driver managerB) The JDBC driver test suiteC) The JDBC-ODBC bridgeD) All mentioned aboveAnswer:D19) JDBC stands for?A) Java database connectivityB) Java database conceptC) Java database communicationsD) None of the aboveAnswer:A20) Which class has traditionally been the backbone of the JDBC architecture?A) JDBC driver managerB) JDBC driver test suite
Page 6
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45www.dacc.edu.inPROF . SUPRIYA MANEC) JDBC-ODBC bridgeD) All mentioned aboveAnswer:A21) The JDBC-ODBC Bridge supports multiple concurrent open statements perconnection?A) TrueB) FalseAnswer: A22) Which of the following allows non repeatable read in JDBC Connection?A) TRANSWERACTION_READ_UNCOMMITTEDB) TRANSWERACTION_READ_COMMITTEDC) TRANSWERACTION_SERIALIZABLED) TRANSWERACTION_REPEATABLE_READAnswer: D23) Which of the following statements is false as far as different type ofstatements is concern in JDBC?A) Regular StatementB) Prepared StatementC) Callable StatementD) Interim StatementAnswer: D24) Which of the following methods are needed for loading a database driver inJDBC?A) registerDriver() methodB) Class.forName()C) Both A and BD) getConnection()Answer: C
Page 7
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45www.dacc.edu.inPROF . SUPRIYA MANE25) Which of the following is false as far as type 4 driver is concern?A) Type 4 driver is “native protocol, pure java” driverB) Type 4 drivers are 100% Java compatibleC) Type 4 drivers uses Socket class to connect to the databaseD) Type 4 drivers can not be used with NetscapeAnswer: D26) To execute a stored procedure “totalStock” in a database server, which of thefollowing code snippet is used?A) Statement stmt =connection.createStatement();stmt.execute(“totalStock()”);B) CallableStatement clbstmnt = con.prepareCall(“{calltotalStock}”);cs.executeQuery();C) StoreProcedureStatementstmt=connection.createStoreProcedure(“totalStock()”);spstmt.executeQuery();D) PrepareStatement pstmt =connection.prepareStatement(“totalStock()”);pstmt.execute();Answer: B27) Which driver is efficient and always preferable for using JDBC applications?A) Type – 4B) Type – 1C) Type – 3D) Type – 2Answer: A28) JDBC facilitates to store the java objects by using which of the methods ofPreparedStatementsetObject () 2. setBlob() 3. setClob()A) 1, 2B) 1,2,3C) 1,3D) 2,3Answer: B29) Which statement is static and synchronized in JDBC API?A) executeQuery()B) executeUpdate()C) getConnection()
Page 8
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45www.dacc.edu.inPROF . SUPRIYA MANED) prepareCall()Answer: C30) The JDBC-ODBC bridge isA) Three tieredB) MultithreadedC) Best for any platformD) All of the aboveAnswer: B31) All raw data types (including binary documents or images) should be read anduploaded to the database as an array ofA) byteB) intC) booleanD) charAnswer: A32) The class javA)sql.Timestamp has its super class asA) javA)sql.TimeB) javA)util.DateC) javA)util.TimeD) None of the aboveAnswer: B33) BLOB, CLOB, ARRAY and REF type columns can be updated inA) JDBC 1.0B) JDBC 4.0C) JDBC 2.0D) JDBC 3.0Answer: D34) Which of the following methods finds the maximum number of connectionsthat a specific driver can obtain?A) Database.getMaxConnectionsB) Connection.getMaxConnectionsC) DatabaseMetaDatA)getMaxConnectionsD) ResultSetMetaDatA)getMaxConnectionsAnswer: C
Page 9
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45www.dacc.edu.inPROF . SUPRIYA MANE35) Are prepared statements actually compiled?A) Yes, they compiledB) No, they are bound by the JDBC driverAnswer: A36) When the message “No Suitable Driver” occurs?A) When the driver is not registered by Class.forname() methodB) When the user name, password and the database does not matchC) When the JDBC database URL passed is not constructed properlyD) When the type 4 driver is usedAnswer: C37) Which driver is called as thin-driver in JDBC?A) Type-4 driverB) Type-1 driverC) Type-3 driverD) Type-2 driverAnswer: A38) How many trAnsweraction isolation levels are defined in javA)sql.Connectioninterface?A) 4B) 3C) 5D) 2Answer: C39) Which method is used to perform DML statements in JDBC?A) execute()B) executeQuery()C) executeUpdate()D) executeResult()Answer: C40) What is the disadvantage of Type-4 Native-Protocol Driver?A) At client side, a separate driver is needed for each database.B) Type-4 driver is entirely written in JavaC) The driver converts JDBC calls into vendor-specific database protocolD) It does not support to read MySQL datA)Answer: A
Page 10
Download this file to view remaining 49 pages
Related documents:
- Ethical Values for Student Life - Notes
- History of the USA 1776-1945 Question Bank (Fill in the Blanks) - Question Bank
- Ayurvedic Tradition Of Kerala MCQs - MCQ
- Psychology (Paper I) 2016 Question Paper - Question Paper
- Commerce and Accountancy (Paper I) 2017 Question Paper - Question Paper
- METHODS AND TECHNIQUES ON BUSINESS DATA ANALYSIS - Notes
- Special Education - Question Bank
- ADE (UNIT-III) MCQs - MCQ
- Logical Reasoning Questions and Answers - Question Bank
- BRM Unit 2 Methods of Data Collection - Notes
- Ssac-364 ( definations)
- Business Analytics using R Programming MCQs - MCQ
- Human Resource Practices MCQs - MCQ
- Audit Course notes - Notes
- Urban Sociology - Questions with answers - Question Bank
- Agricultural Engineering Paper I - Question Bank
- Matrices & Determinants (Solved MCQs and Notes) - Notes
- MG6851-Principles of Management qbank - Question Bank
- UPSC 2021 Prelims ART AND CULTURE Answer Key with Explanation - Question Bank
- Literary Criticism Question bank with Answers - Question Bank