databases Online Quiz - 72

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

Consider the following table called EMPLOYEES: ID FIRSTNAME LASTNAME JOB LEVEL 1 Paul Jones DBA 2 2 George Baker MGR 1 3 Roger Melvin CLERK 3 4 Jim Smith MGR 1 5 Kevin Street CLERK 3 6 Chris Eaton MGR 1 If the following SQL statement is executed, how many rows will be deleted? DELETE FROM employees WHERE 1 = 1

  1. 0

  2. 1

  3. 3

  4. 6

Correct Option: D

Given the following two tables: TAB1 C1 C2 1 Antarctica 2 Africa 3 Asia 4 Australia TAB2 CX CY 5 Europe 6 North America 7 South America Which of the following SQL statements will insert all rows found in table TAB2 into table TAB1?

  1. INSERT INTO tab1 SELECT cx, cy FROM tab2

  2. INSERT INTO tab1 VALUES (tab2.cx, tab2.cy)

  3. INSERT INTO tab1 VALUES (SELECT cx, cy FROM tab2)

  4. INSERT INTO tab1 (c1, c2) VALUES (SELECT cx, cy FROM tab2)

Correct Option: A

Given the following table and XML data stored in the CONTACTINFO column: CREATE TABLE clients( id INT PRIMARY KEY NOT NULL, name VARCHAR(50), status VARCHAR(10), contactinfo XML ) 25 EastCreek Toronto OntarioM8X-3T6 4165551358 9051112222 9051112222 by fax What is the result of the following XQuery expression? for $y in db2-fn:xmlcolumn('CLIENTS.CONTACTINFO')/Client//fax return $y

  1. 4165551358

  2. 9051112222

  3. No results because there is no child element

  4. No results because the XQuery expression is not a valid FLWOR expression

Correct Option: B

Given the following table and XML data stored in the EMPDETAILS column: CREATE TABLE employees (Emp-id INT PRIMARY KEY NOT NULL, Emp-name VARCHAR (20), Empdetails XML) The data in the EMPDETAILS are ProjectManager Chennai 987654 What is the result of the following XQuery Expression? For $y in db2-fn:xmlcolumn(EMPLOYEES. EMPDETAILS’)/Employee/designation return $y

  1. ProjectManager

  2. ProjectManager

  3. chennai

  4. 987654

Correct Option: A

In which situation is shredding XML data recommended?

  1. When the data is naturally tabular

  2. When the number of nodes are volatile

  3. When the data by nature has sparse attributes

  4. When the data is of low volume and requires a complex star-schema topology

Correct Option: A

Which of the following supports the XML data type?

  1. A unique index

  2. .A composite index

  3. A check constraint

  4. .A generated column

Correct Option: A

Review the following SQL, and choose the most appropriate option.

  1. The statement will show the number of jobs in each department

  2. The statement will show the number of employees in each department.

  3. The statement will generate an error.

  4. The statement will work if the GROUP BY clause is removed.

Correct Option: C

Which datatype stores data outside Oracle Database?


  2. BFILE

  3. BLOB

  4. NCLOB

Correct Option: B

The DEPT table has the following data

  1. The INSERT statement is invalid; a valid table name is missing.

  2. 50 is not a valid DEPTNO value, since the subquery limits DEPTNO to 10.

  3. The statement will work without error.

  4. A subquery and a VALUES clause cannot appear together.

Correct Option: B

The following statements are executed: create sequence my_seq; select my_seq.nextval from dual; select my_seq.nextval from dual; rollback; select my_seq.nextval from dual;

  1. 0

  2. 1

  3. 2

  4. 3

Correct Option: D

The current time in Dubai is 04-APR-2008 08:50:00, and the time in Dallas is 03-APR-2008 23:50:00. A user from Dubai is connected to a session in the database located on a server in Dallas. What will be the result of his query?

  1. 04?APR?2008 08:50:00

  2. 03?APR?2008 23:50:00

  3. 03?APR?2008 2324:50:00

  4. None of the above

Correct Option: B

I/O operations on the data warehouse is expensive ?

  1. True

  2. False

Correct Option: A

Which are appropriate scheduling tools for use in EIP database?




  4. All

Correct Option: D

What can be used to optimize the performance of simple SQL?


  2. HINTS


  4. ALL

Correct Option: D

COMPLETE REFRESH by default will _________________all rows in an mview before inserting new rows

  1. Create

  2. Delete

  3. Append

  4. Do Nothing

Correct Option: B

If the number of leaf blocks of index , scanned is less than 5000 then degree of parallelismis 2?

  1. True

  2. False

Correct Option: B

In which version release of Oracle the UTL_FILE package was released?

  1. 7.2

  2. 7.3.6

  3. 7.3.4

  4. 7.3.1

  5. None of the above

Correct Option: C
- Hide questions