Home / CSE MCQs / JDBC ::

CSE MCQs :: JDBC

  1. Which statements about JDBC are true?
  2. A.
    JDBC is an API to connect to relational-, object- and XML data sources
    B.
    JDBC stands for Java DataBase Connectivity
    C.
    JDBC is an API to access relational databases
    D.
    JDBC is an API to bridge the object-relational mismatch between OO programs and relational databases

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. Which packages contain the JDBC classes?
  4. A.
    java.jdbc and javax.jdbc
    B.
    java.jdbc and java.jdbc.sql
    C.
    java.sql and javax.sql
    D.
    java.rdb and javax.rdb

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. To run a compiled Java program, the machine must have what loaded and running?
  6. A.
    Java virtual machine
    B.
    Java compiler
    C.
    Java bytecode
    D.
    A Web browser

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. What is the Life Cycle of Session bean ? Stateless session bean is instantiated by
  8. A.
    newInstance()
    B.
    create()
    C.
    Both of these
    D.
    None

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. Which method is used to perform DML statements in JDBC?
  10. A.
    execute()
    B.
    executeQuery()
    C.
    executeUpdate()
    D.
    executeResult()

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. The interface ResultSet has a method, getMetaData(), that returns a/an
  12. A.
    Tuple
    B.
    Value
    C.
    Object
    D.
    Result

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. Which of the following methods are needed for loading a database driver in JDBC?
  14. A.
    registerDriver() method
    B.
    Class.forName()
    C.
    Both A and B
    D.
    getConnection()

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. How can you execute a stored procedure in the database?
  16. A.
    Call method execute() on a CallableStatement object
    B.
    Call method executeProcedure() on a Statement object
    C.
    Call method execute() on a StoredProcedure object
    D.
    Call method run() on a ProcedureCommand object

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. _______ is an open source DBMS product that runs on UNIX, Linux and Windows.
  18. A.
    MySQL
    B.
    JSP/SQL
    C.
    JDBC/SQL
    D.
    Sun ACCESS

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. Which are the new features adding in to the JDBC 4.0?
  20. A.
    Auto-loading of JDBC driver class
    B.
    Connection management enhancements
    C.
    Support for RowId SQL type
    D.
    All of the above

    View Answer

    Workspace

    Discuss Discuss in Forum