Relational Database Concepts and SQL Fundamentals

Comprehensive quiz covering SQL operations, database transactions, indexing, normalization, and database tools including DB2 and SQL*Plus.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which datatype you use to store a large block of text data having size around 3,500 characters in length ?

  1. CLOB
  2. BLOB
  3. BFILE
  4. VARCHAR2
Question 2 Multiple Choice (Multiple Answers)

Which of the following are transactional control commands? A.COMMIT B.UPDATE C.SAVEPOINT D.SET TRANSACTIONS

  1. COMMIT
  2. UPDATE
  3. SAVEPOINT
  4. SET TRANSACTIONS
Question 3 True/False

The scale of a numeric value is the total length allowed for values.

  1. True
  2. False
Question 4 True/False

Having no duplicate or redundant data in a database and having everything in the database normalized is always the best way to go.

  1. True
  2. False
Question 5 True/False

If you have committed several transactions and have several more transactions that have not been committed and you issue a rollback command, all your transactions for the same session will be undone.

  1. True
  2. False
Question 6 True/False

A SAVEPOINT actually saves transactions after a specified amount of transactions have executed.

  1. True
  2. False
Question 7 True/False

The AVG function returns an average of all rows from a select column including any NULL values.

  1. True
  2. False
Question 8 True/False

You must also use the GROUP BY clause whenever using the HAVING clause.

  1. True
  2. False
Question 9 True/False

The HAVING clause tells the GROUP BY which groups to include.

  1. True
  2. False
Question 10 True/False

The main reason for a composite index is for aggregate function usage in an index.

  1. True
  2. False
Question 11 Multiple Choice (Single Answer)

What type of join would you use to return records from one table, regardless of the existence of associated records in the related table?

  1. OUTER JOIN
  2. RIGHT JOIN
  3. INNER JOIN
  4. LEFT JOIN
Question 12 Multiple Choice (Multiple Answers)

Which of the following statements about roles are true?

  1. Roles can be granted to other roles
  2. Privileges can be granted to roles
  3. Roles can be granted to synonyms
  4. Roles can be granted to users
Question 13 Multiple Choice (Single Answer)

Which of the following dictionary views gives information about the position of a column in a primary key?

  1. ALL_PRIMARY_KEYS
  2. ALL_TABLES
  3. ALL_IND_COLUMNS
  4. USER_CONSTRAINTS
Question 14 Multiple Choice (Single Answer)

Which of the following is the transaction control that prevents more than one user from updating data in a table?

  1. Commits
  2. Locks
  3. Savepoints
  4. Rollbacks
Question 15 Multiple Choice (Single Answer)

Which of the following methods should you use to increase the number of nullable columns for a table?

  1. Use the alter table statement
  2. Ensure that all column values are NULL for all rows
  3. First, increase the size of adjacent column datatypes, and then add the column
  4. Add the column, populate the column, and then add the not NULL constraint
Question 16 Multiple Choice (Single Answer)

Once defined, how long will a variable remain defined in SQL*Plus?

  1. Until the database is shut down
  2. Until the instance is shut down
  3. Until the statement completes
  4. Until the session completes
Question 17 Multiple Choice (Single Answer)

Which of the following product will not accept remote database request?

  1. DB2 UDB WSUE
  2. DB2 UDB PE
  3. DB2 UDB WSE
  4. DB2 UDB ESE
Question 18 Multiple Choice (Single Answer)

Which of the following does DB2 Configuration Advisor recommend?

  1. SQL statements
  2. Views
  3. DDL
  4. Database configuration parameter settings
Question 19 Multiple Choice (Single Answer)

What is the prefix key for executing an OS command in the DB2 CLP?

  1. &
  2. %
  3. !
  4. @
Question 20 Multiple Choice (Single Answer)

Which of the following tool allows you to display data of a table?

  1. Task Center
  2. Command Center
  3. Health Center
  4. All of above