Java Databases (GATE - CS)

Database Connectivity questions

15 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of the following methods is not defined in ResultSetMetaData interface?

  1. getColumnClassName(int column)
  2. getScale(int column)
  3. isCaseSensitive(int column)
  4. getColumnSize(int column)
  5. isSearchable(int column)
Question 2 Multiple Choice (Single Answer)

Which of the following methods is not defined in DatabaseMetaData interface?

  1. allProceduresAreCallable()
  2. allTablesAreSelectable()
  3. autoCommitFailureClosesAllResultSets()
  4. dataDefinitionCausesTransactionCommit()
  5. allTablesSelected()
Question 3 Multiple Choice (Single Answer)

Which of the following methods is defined in DatabseMetaData interface in Java Database Programming?

  1. getMaxTableLength()
  2. getMaxTables()
  3. getMaxCharLiteralLength()
  4. getMaxUserLength()
  5. getSchema()
Question 4 Multiple Choice (Single Answer)

Which of the following methods is not defined in the ResultSet interface in Java?

  1. cancelRowUpdates()
  2. deleteRow()
  3. clearWarnings()
  4. deleteColumn()
  5. absolute(int row)
Question 5 Multiple Choice (Single Answer)

Which of the following methods in Timestamp class returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this Timestamp object?

  1. getTime()
  2. Time()
  3. getMilliseconds()
  4. getTimeInMilliseconds()
  5. Milliseconds()
Question 6 Multiple Choice (Single Answer)

Which of the following methods in ResultSet interface refreshes the current row with its most recent value in the database?

  1. rowRefresh()
  2. refreshRow()
  3. refreshIt()
  4. refreshAll()
  5. refreshCurrentRow()
Question 7 Multiple Choice (Single Answer)

Which of the following methods in DatabaseMetaData interface retrieves the JDBC driver's major version number?

  1. getMajorDriverVersion()
  2. getMajorVersion()
  3. getDriverVersion()
  4. getDriverMajorVersion()
  5. getDriversMajorVersion()
Question 8 Multiple Choice (Single Answer)

How many methods are defined in Date class in Java?

  1. 10
  2. 9
  3. 8
  4. 7
  5. 6
Question 9 Multiple Choice (Single Answer)

Which of the following methods is present in DatabaseMetaData in Java Database Programming?

  1. isReadOnly()
  2. isCurrency(int column)
  3. isDefinitelyWritable(int column)
  4. isWritable(int column)
  5. isReadOnly(int Column)
Question 10 Multiple Choice (Single Answer)

Which of the following methods is not defined in the DriverManager class in Java Database Programming?

  1. getConnection(String url, String user, String password)
  2. deregisterDriver(Driver driver)
  3. getLoginTimeout()
  4. registerDriver(Driver driver)
  5. getLog()
Question 11 Multiple Choice (Single Answer)

Which of the following methods is not defined in ParameterMetaData interface in Java Database Programming?

  1. isSigned(int param)
  2. isNullable(int param)
  3. getParameterCount()
  4. getParameterName(int param)
  5. getParameterType(int param)
Question 12 Multiple Choice (Single Answer)

Which of the following methods in DatabaseMetaData retrieves the maximum number of columns allowed in a table by Java Database?

  1. getMaxColumns()
  2. getMaxColumnsInTable()
  3. getMaxColsInTable()
  4. getMaxCols()
  5. None of these
Question 13 Multiple Choice (Single Answer)

Which of the following methods in DatabaseMetaData interface retrieves the maximum number of characters the database allows for a column name?

  1. getMaxColumnLength()
  2. getMaxColumnNameLength()
  3. getMaxColNameLength()
  4. getMaxColLength()
  5. getColumnNameLength()
Question 14 Multiple Choice (Single Answer)

Which of the following methods in ParameterMetaData interface retrieves the designated parameter's database-specific type name?

  1. getParameterName(int param)
  2. getParameterType(int param)
  3. getParameterTypeName(int param)
  4. getParameterNameType(int param)
  5. getTypeOfParameter(int param)
Question 15 Multiple Choice (Single Answer)

Which of the following methods is present in ResultSetMetaData interface in Java Database Programming?

  1. isWritable(int column)
  2. isReadable(int column)
  3. getColumnsName(int column)
  4. getColumnsCount()
  5. getSchema(int column)