You are on page 1of 4

Q) Which of the following XML fragment correctly indicates the result of the given statement below?

values (XMLELEMENT (name "Name", XMLNAMESPACES( DEFAULT 'htpp://sample.default.nspace.com'), XMLATTRIBUTES ('MALE' as "Gender"), XMLCONCAT( XMLELEMENT (name "FirstName", 'Amitabh'), XMLELEMENT (name "LastName", 'Patel'))))

A. <Name xmlns="htpp://sample.default.nspace.com" Gender="MALE"> <FirstName>Amitabh</FirstName> <LastName>Patel</LastName> </Name> B. <Name xmlns="htpp://sample.default.nspace.com"> <Gender>MALE</Gender> <FirstName>Amitabh</FirstName> <LastName>Patel</LastName> </Name> C. <Name Gender="MALE"> <FirstName>Amitabh <LastName>Patel</LastName></FirstName> </Name> D. None of the above

Q) Which one of the following SQL statements will inline XML documents smaller than 1000 bytes, stored within the EMPINFO column? A. CREATE TABLE EMPLOYEES (empid char(8), empinfo XML inline length(1024)) B. ALTER TABLE EMPLOYEES ALTER COLUMN empinfo SET INLINE LENGTH 1000

C. CREATE TABLE EMPLOYEES (empid char(8), empinfo XML) SET INLINING (1000) D. CREATE TABLE EMPLOYEES (empid char(8), empinfo XML DEFAULT INLINE 1000) Q) Given the following UPDATE statement: UPDATE employees SET workdept = (SELECT deptno FROM department) WHERE workdept = NULL

Which of the following describes the result if this statement is executed? A. The statement will fail because an UPDATE statement cannot contain a subquery B. The statement will fail because the WORKDEPT column appears in the SET and WHERE clause at the same time. C. The statement will only succeed if table DEPARTMENT has only 1 row. D. The statement will only succeed if every record in the EMPLOYEES table has a null value in the WORKDEPT column

Q) Which of the following is NOT a SQL/XML function in DB2 9.7? A. XMLQUERY B. XMLEXISTS C. EXISTS D. XMLCAST Q) After the following SQL statement is executed: GRANT ALL PRIVILEGES ON TABLE student TO USER user1

Assuming user USER1 has no other authorities or privileges, which of the following actions is USER1 allowed to perform? A. Grant all privileges on table STUDENT to other users. B. Drop a view associated to the table STUDEN.

C. Drop the table STUDENT. D. None of the above. Q) Which of the following properties is related to the fact that a committed transaction guarantees that all of the operations are completed and in a roll backed transaction the effect of all operations are reverted? A. Consistency B. Atomicity C. Isolation D. Durability Q) Assume a table which contains the following columns: EMP_ID EMP_NAME PHONE EMAIL SALARY

Which of the following is the simplest way to restrict users from viewing SALARY information, while still allowing them to see the other values? A. Encrypt the table's data. B. Create a view that does not contain the SALARY column. Grant access to the view and revoke access from the original table. C. Revoke SELECT access for the SALARY column from users who should not see SALARY data. D. Store SALARY data in a separate table and grant SELECT privilege for that table to the appropriate user Q) Consider the following scenario. You have 3 tables with the same name (TABLE_1) under 3 different schemas (SYSIBM, DEFAULT and DB2INST1). You are connected to a DB2 database

in your Linux server as db2inst1 and issue the following statement: SELECT * FROM table_1 Which table will you be selecting data from: A. You get an error because your query is ambiguous, as the table schema is not specified B. SYSIBM.table_1 C. DEFAULT.table_1 D. DB2INST1.table_1

Q) If secondary log files are to be allocated until the unit of work commits or storage is

exhausted, which type of logging is used? A. Circular logging B. Archival logging C. Infinite logging D. It cannot be done in DB2

You might also like