IBM DB2 9 Family Fundamentals Sample Questions:
1. Which of the following deletion rules on CREATE TABLE will allow parent table rows to be deleted if a dependent row exists?
A) ON DELETE SET NO VALUE
B) ON DELETE CASCADE
C) ON DELETE NO ACTION
D) ON DELETE RESTRICT
2. Which of the following modes, when used with the LOCK TABLE statement, will cause the DB2 Database Manager to acquire a table-level lock that prevents other concurrent transactions from accessing data stored in the table while the owning transaction is active?
A) SHARE MODE
B) EXCLUSIVE MODE
C) RESTRICT MODE
D) ISOLATED MODE
3. The following triggers were defined for a table named SALES in the order shown:
CREATE TRIGGER trigger_a NO CASCADE BEFORE UPDATE ON sales REFERENCING NEW AS new FOR EACH ROW SET new.commission = sale_amt * .05 WHERE invoice = n.invoice;
CREATE TRIGGER trigger_b AFTER INSERT ON sales REFERENCING NEW AS new FOR EACH ROW UPDATE sales SET bill_date = CURRENT DATE + 30 DAYS WHERE invoice = n.invoice;
CREATE TRIGGER trigger_c NO CASCADE BEFORE DELETE ON sales FOR EACH ROW SIGNAL SQLSTATE '75005' SET MESSAGE_TEXT = 'Deletes not allowed!';
Which of the following statements is NOT true?
A) Each time a row is inserted into the SALES table, trigger TRIGGER_A is fired first, followed by trigger TRIGGER_B
B) Whenever a row is inserted into the SALES table, the value in the BILL_DATE column is automatically set to 30 days from today
C) Whenever a row in the SALES table is updated, all three triggers are fired but nothing happens because none of the triggers have been coded to trap update operations
D) Once a row has been added to the SALES table, it cannot be removed
4. Given the following query:
SELECT last_name, first_name, age, hire_date
FROM employee WHERE age > 40 Which of the following clauses must be added to return the rows sorted by AGE, oldest first, and by LAST_NAME, from A to Z?
A) ORDER BY age DESC,last_name
B) SORT BY age DESC,last_name
C) ORDER BY age ASC,last_name
D) SORT BY age ASC,last_name
5. Which of the following describes the model used by the Geodetic Extender?
A) Flat earth
B) 3-D Square
C) Trapezoidal
D) Round earth
Solutions:
| Question # 1 Answer: B | Question # 2 Answer: B | Question # 3 Answer: C | Question # 4 Answer: A | Question # 5 Answer: D |

We're so confident of our products that we provide no hassle product exchange.


By Troy


