Relational Database Concepts and SQL Fundamentals
Comprehensive quiz covering SQL operations, database transactions, indexing, normalization, and database tools including DB2 and SQL*Plus.
Questions
Which datatype you use to store a large block of text data having size around 3,500 characters in length ?
- CLOB
- BLOB
- BFILE
- VARCHAR2
Which of the following are transactional control commands? A.COMMIT B.UPDATE C.SAVEPOINT D.SET TRANSACTIONS
- COMMIT
- UPDATE
- SAVEPOINT
- SET TRANSACTIONS
The scale of a numeric value is the total length allowed for values.
- 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.
- 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.
- True
- False
A SAVEPOINT actually saves transactions after a specified amount of transactions have executed.
- True
- False
The AVG function returns an average of all rows from a select column including any NULL values.
- True
- False
You must also use the GROUP BY clause whenever using the HAVING clause.
- True
- False
The HAVING clause tells the GROUP BY which groups to include.
- True
- False
The main reason for a composite index is for aggregate function usage in an index.
- True
- False
What type of join would you use to return records from one table, regardless of the existence of associated records in the related table?
- OUTER JOIN
- RIGHT JOIN
- INNER JOIN
- LEFT JOIN
Which of the following statements about roles are true?
- Roles can be granted to other roles
- Privileges can be granted to roles
- Roles can be granted to synonyms
- Roles can be granted to users
Which of the following dictionary views gives information about the position of a column in a primary key?
- ALL_PRIMARY_KEYS
- ALL_TABLES
- ALL_IND_COLUMNS
- USER_CONSTRAINTS
Which of the following is the transaction control that prevents more than one user from updating data in a table?
- Commits
- Locks
- Savepoints
- Rollbacks
Which of the following methods should you use to increase the number of nullable columns for a table?
- Use the alter table statement
- Ensure that all column values are NULL for all rows
- First, increase the size of adjacent column datatypes, and then add the column
- Add the column, populate the column, and then add the not NULL constraint
Once defined, how long will a variable remain defined in SQL*Plus?
- Until the database is shut down
- Until the instance is shut down
- Until the statement completes
- Until the session completes
Which of the following product will not accept remote database request?
- DB2 UDB WSUE
- DB2 UDB PE
- DB2 UDB WSE
- DB2 UDB ESE
Which of the following does DB2 Configuration Advisor recommend?
- SQL statements
- Views
- DDL
- Database configuration parameter settings
What is the prefix key for executing an OS command in the DB2 CLP?
- &
- %
- !
- @
Which of the following tool allows you to display data of a table?
- Task Center
- Command Center
- Health Center
- All of above