0

databases Online Quiz - 119

Description: databases Online Quiz - 119
Number of Questions: 20
Created by:
Tags: databases
Attempted 0/20 Correct 0 Score 0

Archived Redo Log is

  1. It consists of Redo Log files that have archived before being reused.

  2. It consists of Redo Log files that have archived after being reused.

  3. It consists of Redo Log files that is archiving when currently being reused.

  4. It consists of Redo Log files that have archived not being reused.


Correct Option: A

Examine the syntax for creating a DEPARTMENT table: CREATE TABLE ABCD( A NUMBER(4), B VARCNAR2(30), C NUMBER(6), D NUMBER(4)) STORAGE(INITIAL 200K NEXT 200K PCTINCREASE 50 MINEXTENTS 1 MAXEXTENTS 5) TABLESPACE userdata; What is the size defined for the fifth extent?

  1. 500K

  2. 300K

  3. 675K

  4. 275K


Correct Option: C

The control file defines the current state of the physical database. Which dynamic performance views obtain information from the control file?

  1. V$LOG

  2. V$THREAD

  3. V$DATAFILE

  4. All of the above


Correct Option: D

Control file contains information about

  1. database

  2. redo logfile & datafile

  3. archivelog file location

  4. All of the above


Correct Option: D

What is a Parallel Server

  1. Multiple instances accessing the same database (Only In Multi-CPU environments)

  2. Multiple instances accessing the same database (Only In single-CPU environments)

  3. Multiple instances accessing the different database (Only In single-CPU environments)

  4. Single instance accessing the multiple database (Only In Multi-CPU environments)


Correct Option: A

Which of the following tasks can be performed by using the TO_CHAR function?

  1. Convert '10'to 10

  2. Convert 'TEN' to 10

  3. Convert 10 to '10'

  4. Convert a character expression to a date


Correct Option: C

Evaluate the following SQL statement: SELECT ROUND (TRUNC (MOD (1600, 10),-1), 2) FROM dual; What will be displayed?

  1. 100

  2. 0

  3. 1

  4. 10


Correct Option: B
  1. This value causes the optimizer to the rule-based approach for all SQL statements in the session regardless of the presence of statistics and to optimize with a goal of best throughput

  2. This value causes the optimizer to the rule-based approach for all SQL statements in the session in regard of the presence of statistics and to optimize with a goal of best throughput

  3. This value causes the optimizer to the cost-based approach for all SQL statements in the session regardless of the presence of statistics and to optimize with a goal of best throughput

  4. This value causes the optimizer to the cost-based approach for all SQL statements in the session regard of the presence of statistics and to optimize with a goal of best throughput


Correct Option: C

What is the correct use of the Trunc command on a date?

  1. SELECT TRUNC(TO_DATE('12-Feb-99','DD-MON-YY'), 'YEAR') "Date " FROM DUAL;

  2. SELECT TRUNC(TO_DATE('12-Feb-99','DD-MON-YY'), 'YEAR') FROM DUAL;

  3. TRUNCATE=To_Date('09-Jan-02,DD-MON-YY,'YEAR',"Date" from Dual;

  4. Date =TRUNCATE(To_DATE('09-Jan-02','DD-MON-YY'),'YEAR'),'YEAR)"DATE: from DUAL;


Correct Option: A

How do I eliminate duplicate rows in an Oracle database?

  1. DELETE FROM table_name WHERE ROWID IN (SELECT MAX (ROWID) FROM table_name GROUP BY duplicate_values_field_name);

  2. DELETE FROM table_name WHERE ROWID NOT IN (SELECT MAX (ROWID) FROM table_name GROUP BY duplicate_values_field_name);

  3. DELETE FROM table_name WHERE ROWID IN (SELECT MIN (ROWID) FROM table_name GROUP BY duplicate_values_field_name);

  4. DELETE FROM table_name WHERE ROWID IN (SELECT AVG (ROWID) FROM table_name GROUP BY duplicate_values_field_name);


Correct Option: B

Which Oracle access method is the fastest way for Oracle to retrieve a single row?

  1. Primary key access

  2. Access via unique index

  3. Table access by ROWID

  4. Full table scan


Correct Option: C

Which command will delete all data from a table and will not write to the rollback segment?

  1. DROP

  2. DELETE

  3. CASCADE

  4. TRUNCATE


Correct Option: D

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) DROP - This option is incorrect because the DROP command is used to delete an entire table, including its structure, from the database. It does not delete data from a table without writing to the rollback segment.

Option B) DELETE - This option is incorrect because the DELETE command is used to delete specific rows from a table based on a condition. It does not delete all data from a table without writing to the rollback segment.

Option C) CASCADE - This option is incorrect because the CASCADE keyword is used in conjunction with the DROP command to delete dependent objects along with the table. It does not delete all data from a table without writing to the rollback segment.

Option D) TRUNCATE - This option is correct because the TRUNCATE command is used to delete all data from a table without writing to the rollback segment. It is a faster operation than DELETE as it does not generate undo logs for each deleted row.

The correct answer is D) TRUNCATE. This option is correct because it deletes all data from a table without writing to the rollback segment.

Which of the following SQL functions can operate on any datatype?

  1. TO_CHAR

  2. LOWER

  3. LPAD

  4. MAX

  5. CEIL


Correct Option: D

Which of the following is an important consideration when tuning an SQL statement?

  1. The number of CPUs on the server

  2. The degree of parallelism on the tables

  3. The use of bitmap indexes

  4. The quality of the SQL optimization


Correct Option: D

AI Explanation

To answer this question, you need to understand the concept of tuning an SQL statement. Let's go through each option to understand why it is correct or incorrect:

Option A) The number of CPUs on the server - This option is incorrect because the number of CPUs on the server does not directly affect the tuning of an SQL statement. The number of CPUs may impact the overall performance of the server, but it is not a specific consideration for tuning an SQL statement.

Option B) The degree of parallelism on the tables - This option is incorrect because the degree of parallelism on the tables also does not directly affect the tuning of an SQL statement. The degree of parallelism determines how many parallel execution servers are used to process a SQL statement, but it does not specifically relate to tuning the statement.

Option C) The use of bitmap indexes - This option is incorrect because the use of bitmap indexes is a consideration for indexing strategies, but it is not directly related to tuning an SQL statement. Bitmap indexes can improve the performance of certain queries, but they do not specifically address the tuning of an SQL statement.

Option D) The quality of the SQL optimization - This option is correct because the quality of the SQL optimization is an important consideration when tuning an SQL statement. SQL optimization involves analyzing the query execution plan, indexing strategies, statistics, and other factors to improve the performance of the SQL statement. Tuning the SQL statement involves optimizing the query execution plan and making changes to the SQL code to improve its efficiency.

The correct answer is D) The quality of the SQL optimization. This option is correct because it highlights the importance of optimizing the SQL statement to improve its performance.

What best describes the relationship between indexes and SQL performance?

  1. Indexes are only used in special cases

  2. Indexes are used to make table storage more efficient

  3. Indexes rarely make a difference in SQL performance

  4. Indexes exist solely to improve query speed


Correct Option: D

Which of the following SQL clauses is used to select data from 2 or more tables?

  1. HAVING

  2. JOIN

  3. WHERE

  4. BETWEEN


Correct Option: B
- Hide questions