C. Inserting XML Documents in An Integer Column
C. Inserting XML Documents in An Integer Column
2) The link between a column or set of columns in one table that refers to the set of column in another table is?
A. Pointer
B. Cursor
C. Primary key
D. Foreign key
4) Which of the following is the best implementation for a User Defined Function that emphasizes on database
operations, considering that performance is critical to the application?
A. Java external function
B. SQL PL function
C. Composed function
D. C built-in function
5) Which of the following is NOT a valid approach for storing XML documents?
6) The four basic SQL statements of the Data Manipulation Language are:
A. Relational Database Management Systems use Structured Query Language to interact with
databases.
B. Database Management Systems act as an interface used to communicate with databases.
C. Applications can choose to bypass the Database Management System when accessing databases for
performance reasons.
D. DB2 is a Database Management System.
A. Table
B. Tree
C. Node
A. REFERENCES
B. EXECUTE
C. CALL
D. USAGE
11) Considering you have a server with 4 processor cores and 8GB of memory, which of the following is the
lowest cost DB2 edition that can be used to take advantage of all server's resources?
A. DB2 Enterprise Edition
A. 3
B. 4
C. 5
D. 6
D. Namespaces help to uniquely identify XML elements by associating them to an URL, which is a valid
web page.
A. A constraint can be added to an existing table using the ALTER TABLE statement.
B. Two or more same values can be assigned to the column when there is a unique constraint.
C. The NOT NULL constraint can be used to ensure that a particular column in a table is never
assigned a zero value
D. The predefined value assigned by a default constraint can not be overwritten.
15) One transaction is trying to acquire a lock to modify a row in table A. Consider the database lock timeout
(locktimeout) parameter is set to 20 and that DB2 checks for deadlocks every 60 seconds. What will happen to
the transaction after 20 seconds waiting?
A. DB2 will randomly select one application and rollback its current transaction to try to free up the lock
being held.
B. The application will rollback and the application will receive an error.
C. The application will commit but the operation waiting for the lock is not completed.
D. The application will commit because after 20 seconds are passed the transaction acquires the lock by
force.
B. Only one instance can exist using the same DB2 executable files.
17) Consider the following scenario. You are currently connected to a database called MYDB as the user
MYUSER. When creating a table within this database, you use the command:
CREATE TABLE MYTABLE (DEPT CHAR(3) NOT NULL)
Under which schema is the table MYTABLE created?
A. MYDB
B. MYUSER
C. DB2INST1
D. You get an error because your command is ambiguous, as the table schema is not specified.
18) Consider the following. As the user MYUSER, you issue the following command:
CREATE ALIAS A1 for T1
What will be the result of the command?
B. A parsing mechanism, which uses a binary tree-based algorithm to process XML nodes.
D. A parsing mechanism, which uses the PHP SAX interface to process XML nodes.
D. A COMMIT can be executed right after a ROLLBACK statement in order to revert the effects of the
ROLLBACK.
A. A record
B. An entity
C. A field
D. A table
22) Assuming that you are currently connected to TESTDB, which of the following will allow the view of the
database manager settings with details?
23) Which of the following statements is FALSE regarding Buffer Pools on DB2?
A. Smaller buffer pool works better for a small, sequentially accessed table space.
B. Larger buffer pool works better for a table space for an OLTP application.
C. A database can have more than one Buffer Pool.
D. A table space can have only one Buffer Pool associated to it.
B. Indexes or columns
C. Global information
D. Authorization type
25) Which of the following is the correct syntax for using the XMLTRANSFORM SQL/XML function?
26) Which of the following isolation levels lets you see data that has been updated by other applications before
it is committed?
A. Cursor stability
B. Read stability
C. Repeatable read
D. Uncommitted read
27) Which of the following statements can be used to increase in 10% the salary of all employess in department
D1:
D. The Storage Optimization feature for DB2 Enterprise edition includes Row, Index, Temporary
Table and XML Compression.
29) What is the lowest privilege/authority required to execute the following SQL statement?
CREATE VIEW view1 AS SELECT * FROM table1 WHERE AGE > 18
A. REFERENCES privilege on table1
C. DBADM authority
D. SYSADM authority
33. Which will allow user USER1 to change the comment associated with a table named TABLE1?
A) GRANT UPDATE ON TABLE table1 TO user1
B) GRANT CONTROL ON TABLE table1 TO user1
C) GRANT ALTER ON TABLE table1 TO user1
D) GRANT REFERENCES ON TABLE table1 TO user1
34. Which two database objects may the SELECT privilege be controlled?
A) Sequence
B) Nickname
C) Schema
D) View
E) Index
38. Which of the following commands below to drop(if it already exists) sample database
A) db2 drop sample
B) db2 drop db
C) drop db sample
D) db2 drop db sample
42. If table TABLE1 contains 250 rows, which of the following statement will only return
the first 25 of the rows?
A) SELECT * FROM table1 MAXROWS 25
B) SELECT * FROM table1 RETURN FIRST 25 ROWS
C) SELECT * FROM table1 WHILE ROW < 25
D) SELECT * FROM table1 FETCH FIRST 25 ROWS ONLY
44. Which of the following statements can be used to increase the marks of all
students in science subject by 10%:
A) UPDATE student WHERE subject = ‘science’ SET marks = marks * 1.1
B) UPDATE student SET marks = (marks * 1.1)
C) UPDATE student SET marks = marks * 1.1 WHERE subject = ‘science’
D) UPDATE marks = marks * 1.1 ON TABLE student WHERE subject = ‘science'
ENROLL
------------------
student_id course_id
------ -----
2 PHY_102
2 DB_101
3 PHY_102
1 CSI_201
3 MAT_202
After executing the query:
SELECT P.name, COUNT AS COUNT FROM STUDENT LEFT JOIN ENROLL
ON id=student_id, PROFESSOR AS P
GROUP BY P.name
What would the result be?
A. NAME COUNT
---------------- --------
Angie 1
Jenny 3
Mark 1
B. NAME COUNT
---------------- --------
Angie 6
Jenny 12
Mark 6
C. NAME COUNT
---------------- --------
Angie 1
Jenny 2
Mark 1
D. NAME COUNT
---------------- --------
Angie 3
Jenny 6
Mark 3
D. Adding GROUP BY to a SELECT statement will always return less rows than the same SELECT
statement without the GROUP BY clause.
5) Consider TB1 has no rows initially and that the auto commit feature is disabled. After execution of the
following statements, how many rows will be inserted in TB1?
INSERT INTO TB1 VALUES (1, 'ABC')
INSERT INTO TB1 VALUES (2, 'DEF')
COMMIT
INSERT INTO TB1 VALUES (3, 'GHI')
ROLLBACK
COMMIT
A. 0
B. 1
C. 2
D. 3
7) If table TABLE1 contains 50 rows, which of the following statement will only return the first five of the
rows?
A. SELECT * FROM table1 MAXROWS 5
8) If the current session has an isolation level of CS, which of the following will change the isolation level to
UR for the current statement?
9) Which of the following commands can be used to undo operations executed inside a unit of work?
A. COMMIT
B. ROLLBACK
C. RETURN
D. UNDO TRANSACTION
10) Consider the following statement. "Indexes can be created on computed columns." Is this statement:
A. True.
B. False.
B. ALTER
C. DROP
14) The SELECT privilege is NOT available for which of the following database objects?
A. Sequence
B. Nickname
C. View
D. Table
15) Which of the following statements is TRUE regarding the case when a client using the
SERVER_ENCRYPT authentication type connects to a server using the SERVER authentication type?
A. Data will be passed to the server encrypted.
C. Server will be unable to process the encrypted data and an error will occur.
C. Restore the full backup from Sunday, the incremental cumulative backup from Tuesday, the
incremental delta from Wednesday, then roll forward the database using the transaction log files.
D. Restore the full backup from Sunday, the delta incremental from Wednesday, then roll forward the
transaction log files.
17) Which of the following is true about the table below?
CREATE TABLE EMPLOYEE (
ID INTEGER NOT NULL,
NAME VARCHAR(30) NOT NULL,
EXTENSION INTEGER NOT NULL,
MANAGER VARCHAR(30) NOT NULL
PRIMARY KEY (ID));
TERMINATE;
ID NAME EXTENSION MANAGER
1 John S 53412 Y
2 Susan P 54123 N
3 Jennifer L 51234 N
A. ID is a value found in the EMPLOYEE table
B. CALL proc1(?)
C. CALL proc1(NULL)
19) Which of the following packages have the smallest footprint but is still suitable for executing JDBC
applications?
A. IBM Data Server Client
C. Each row has a value of an item or set of items that uniquely identifies that row in the table
D. Each column typically is called by its column name or column header or attribute name
21) Which of the following information is NOT part of the backup file name?
A. Database alias
C. Instance name
D. Backup type
22) Which of the following commands produces a backup image from a database?
A. START BACKUP DATABASE SAMPLE USING D:\bkp
D. Essentially data can be thought of as the result of observations based on things like measurements
and statistics.
24) Which of the following is NOT a valid authentication type that can be used by DB2?
A. CLIENT
B. CLIENT_ENCRYPT
C. SERVER
D. SERVER_ENCRYPT
25) Given the options below, which of the following statements can alter a table?
A. ALTER
B. CHANGE
C. UPDATE
26) Which one of the following is a valid XPATH expression to retrieve an attribute value within an XML
document?
A. /customerinfo/name/cid
B. /customerinfo/name/text(@cid)
C. /customerinfo/name/data(@cid)
D. /customerinfo/name/"cid"
27) Which of the following languages can NOT be used to create a UDF in DB2 9.7?
A. Perl
B. SQL PL
C. Java
D. C#
C. Be unique
D. Be numeric
D. Healthy Summary tab summarizes the status of the last operation to run in the database.
45. A user wants to create objects within a schema which of the following privileges permits to perform the
same?
A. CONTROL
B. ALTER
C. REFERENCES
CREATEIN
46. Which of the following types of backup are allowed if circular logging is used,:
A. Online full backup
B. Offline full backup
C. Online incremental backup
D. Offline incremental backup
47. If you need to execute SQL statements against a DB2 database from the command line Which of the
following
tools would you use ?
A. DB2 Task Center
B. DB2 Command Line Processor
C. DB2 Journal
D. DB2 Control Center
49. About Relational Databases and the Relational Data Model which of the following is true?
A. A table does not allow to store data.
B. A tuple is the smallest unit of data.
C. A column is the equivalent to a row.
D.A domain is the set of some possible values for a specific field
50. Which of the following commands will terminate your connection assuming that you are currently
connected
to a DB2 database,?
A. db2 connect reset
B. db2 connect upset
C. db2 connect kill
D.db2 connect end