Oracle Database and JDBC Fundamentals
Test your knowledge of Oracle database features including SQL functions, indexes, datatypes, constraints, and JDBC connectivity for Java applications.
Questions
What is the use of reuse storage clause when used with truncate table statement?
- specifies that the empty space created by deleting the records must be retained for this table and should not be used by other tables
- specifies that the empty space created by deleting the records, can be used by other tables.
- specifies that this transaction can be rolled back later
- This clause cannot be used with truncate statement
Which of the following are valid pseudocolumns in oracle?
- rowid
- row_num
- sl_no
- rownum
- sid
For which of these constraints, an unique index is automatically created while creating constraints?
- Primary Key
- Check
- Unique
- Not Null
- Foreign Key
1.Which statements about JDBC are true? (2 answers)
- JDBC is an API to connect to relational-, object- and XML data sources
- JDBC stands for Java DataBase Connectivity
- JDBC is an API to access relational databases, spreadsheets and flat files
- JDBC is an API to bridge the object-relational mismatch between OO programs and relational
- Which packages contain the JDBC classes?
- java.jdbc and javax.jdbc
- java.jdbc and java.jdbc.sql
- java.sql and javax.sql
- java.rdb and javax.rdb
- Which type of driver provides JDBC access via one or more ODBC drivers?
- Type 1 driver
- Type 2 driver
- Type 3 driver
- Type 4 driver
4.Which type of driver converts JDBC calls into the network protocol used by the database management system directly?
- Type 1 driver
- Type 2 driver
- Type 3 driver
- Type 4 driver
5.Which type of Statements can execute parameterized queries?
- PreparedStatement
- ParameterizedStatement
- ParameterizedStatement and CallableStatement
- All kinds of Statements (i.e. which implement a sub interface of Statement)
6.What is, in terms of JDBC, a DataSource?
- A DataSource is the basic service for managing a set of JDBC drivers
- A DataSource is the Java representation of a physical data source
- A DataSource is a registry point for JNDI-services
- A DataSource is a factory of connections to a physical data source
To ensure proper data conversion between databases with different character sets, you must ensure that
- ASCII characters are capitalized
- INT data consists of non-negative numbers
- CHAR data consists of well-formed strings.
- CHAR data consists of at least a nil string
- None of the choices.
Which of the following correctly describe the LONG columns (choose all that apply):
- You can use them to store long text strings
- They have many of the characteristics of VARCHAR2 columns
- They store variable-length character strings containing up to 2 gigabytes
- None of the choices.
Which of the following are the valid datetime datatypes in Oracle (choose all that apply):
- TIMESTAMP WITH LOCAL TIME ZONE
- TIMESTAMP
- TIMESTAMP WITH TIME ZONE
- DATE
Which of the following are the restrictions of creating bitmap indexes (choose all that apply):
- You cannot specify BITMAP for a domain index
- You cannot specify both UNIQUE and BITMAP
- You cannot specify BITMAP when creating a local index.
- You cannot specify BITMAP when creating a global partitioned index
Text literals have properties of which of the following datatypes (choose all that apply):
- CHAR
- CLOB
- VARCHAR2
- Float
A sequence generates values that are often used for (choose all that apply):
- primary keys
- sales figures
- foreign keys
- unique keys
What's command to start DBCONSOLE service on database installed on Linux?
- emctl start dbconsole
- start dbconsole
- dbconsole start
- emctl dbconsole start
In Oracle, the result of comparison conditions can be (choose all that apply):
- TRUE
- UNKNOWN
- ERROR
- NULL
- FALSE
What is default location for portlist.ini file?
- $ORACLE_HOME/sysman/install
- $ORACLE_HOME/install
- $ORACLE_HOME/rdbms/admin/install
- $ORACLE_HOME/dbs/install
What command is used to reclaim unused space for table TABLE1?
- ALTER TABLE TABLE1 SHRINK;
- ALTER TABLE TABLE1 SHRINK SPACE;
- ALTER TABLE TABLE1 SHRINK UNUSED;
- ALTER TABLE TABLE1 SHRINK ROWs;
Single-row functions can appear in which of the following (choose all that apply):
- WHERE clauses
- START WITH and CONNECT BY clauses
- select lists
- HAVING clauses