JDBC Interfaces and Methods
Test your knowledge of Java Database Connectivity (JDBC) interfaces including DatabaseMetaData, ResultSetMetaData, ParameterMetaData, ResultSet, and DriverManager.
Questions
Which of the following methods is defined in the DatabaseMetaData interface in Java database programming?
- getMaxTableLength()
- getMaxTables()
- getMaxCharLiteralLength()
- getMaxUserLength()
- getSchema()
Which of the following methods is not defined in the ResultSetMetaData interface?
- getColumnClassName(int column)
- getScale(int column)
- isCaseSensitive(int column)
- getColumnSize(int column)
- isSearchable(int column)
Which of the following methods is not defined in the DriverManager class in Java database programming?
- getConnection(String url, String user, String password)
- deregisterDriver(Driver driver)
- getLoginTimeout()
- registerDriver(Driver driver)
- getLog()
Which of the following methods is not defined in ParameterMetaData in Java database programming?
- isSigned(int param)
- isNullable(int param)
- getParameterCount()
- getParameterName(int param)
- getParameterType(int param)
Which of the following methods in DatabaseMetaData retrieves the maximum number of columns this database allows in a table?
- getMaxColumns()
- getMaxColumnsInTable()
- getMaxColsInTable()
- getMaxCols()
- None of these
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?
- getTime()
- Time()
- getMilliseconds()
- getTimeInMilliseconds()
- Milliseconds()
Which of the following methods is not defined in the DatabaseMetaData interface?
- allProceduresAreCallable()
- allTablesAreSelectable()
- autoCommitFailureClosesAllResultSets()
- dataDefinitionCausesTransactionCommit()
- allTablesSelected()
Which of the following methods is not defined in the ResultSet interface in Java?
- cancelRowUpdates()
- deleteRow()
- clearWarnings()
- deleteColumn()
- absolute(int row)
Which of the following methods is present in the ResultSet interface in Java database programming?
- moveToCurrentRow()
- moveToNextRow()
- moveToPreviosRow()
- moveToFirstRow()
- moveToLastRow()
Which of the following methods in the DatabaseMetaData retrieves the maximum number of characters this database allows for a column name?
- getMaxColumnLength()
- getMaxColumnNameLength()
- getMaxColNameLength()
- getMaxColLength()
- getColumnNameLength()
Which of the following methods in the ResultSet interface refreshes the current row with its most recent value in the database?
- rowRefresh()
- refreshRow()
- refreshIt()
- refreshAll()
- refreshCurrentRow()
Which of the following methods in DatabaseMetaData interface retrieves the JDBC driver's major version number?
- getMajorDriverVersion()
- getMajorVersion()
- getDriverVersion()
- getDriverMajorVersion()
- getDriversMajorVersion()
Which of the following methods is present in the DatabseMetaData interface in Java database programming?
- isReadOnly()
- isCurrency(int column)
- isDefinitelyWritable(int column)
- isWritable(int column)
- isReadOnly(int Column)
Which of the following methods is present in the ResultSetMetaData interface in Java database programming?
- isWritable(int column)
- isReadable(int column)
- getColumnsName(int column)
- getColumnsCount()
- getSchema(int column)
Which of the following methods in the ParameterMetaData interface retrieves the designated parameter's database-specific type name?
- getParameterName(int param)
- getParameterType(int param)
- getParameterTypeName(int param)
- getParameterNameType(int param)
- getTypeOfParameter(int param)