Vous êtes sur la page 1sur 50

DB2 Associate Mock Test Time Duration: 2 Hr. 30 Min.Passing Percentage: 80% 1.

Which allows to access other DB2 servers, but cannot accept requests from oth er remote clients? A)DB2 Personal Edition B)DB2 Workgroup Server Edition C)DB2 Enterprise Server Edition D)DB2 Data Warehouse Edition

2. Which one is false? A)Structured Query Language is the standard language for manipulating data in aR elational Database Management System. B)Database Management Systems act as an interface used to communicate withdataba ses. C)The Hierarchical data model organizes data in tables with columns and rows. D)DB2 is a Database Management System.

3. Name the entities used to model data in the Relational Model? A. A collection of instances of entities. B. Relations, attributes and tuples. C. A collection of instances of record types. D. Table, rows and columns 4. Which is the lowest cost DB2 product that can be legally installed on an HP-U X server? A)DB2 Express-C B)DB2 Express C)DB2 Personal Edition

D)DB2 Enterprise Server Edition

5. Consider the following scenario. We have a table, table_1, which has only one column storing an integer value. The following statements are executed successfully in the order shown:

CREATE SEQUENCE my_seq START WITH 1 INCREMENT BY 1 CACHE 5

INSERT INTO table_1 VALUES (NEXT VALUE FOR my_seq); INSERT INTO table_1 VALUES (NEXT VALUE FOR my_seq);

After a db2 terminate and reconnection to the database, the following statement was issued:

INSERT INTO table_1 VALUES (NEXT VALUE FOR my_seq); SELECT * FROM table_1

What value will be the last value returned by the query? A. 1 B. 2 C. 3 D. 6 6. Which one is true about Relational Databases? A. A column can store values of different data types. B. A table consists of columns and rows. C. Rows In the same table can have a different set of columns. D. Rows are also known as fields of the table.

7. Which is used to create and debug user-defined functions? A)SQL Assist B)Control Center C)Command Editor D)Developer Workbench

8. False about keys in the relational model? A. Primary keys are defined by a subset of attributes of a relation. B. Primary keys uniquely identify each tuple of the relation. C. Primary keys define the relationship between two tables. D. A relation can have multiple foreign keys. 9. Given the following table definition:

SALES -------------------------SALES_DATE DATE SALES_PERSON CHAR(20) REGION CHAR(20) SALES INTEGER

Which of the following SQL statements will remove all rows that had a SALES_DATE in the year 1995? A. DELETE * FROM sales WHERE YEAR(sales_date) = 1995 B. DELETE FROM sales WHERE YEAR(sales_date) = 1995 C. DROP * FROM sales WHERE YEAR(sales_date) = 1995 D. DROP FROM sales WHERE YEAR(sales_date) = 1995 10. Which tool used to automate table reorganization operations? A)Control Center

B)Command Center C)Command Line Processor D)Task Center

11. Given the following tables:

CURRENT_EMPLOYEES -------------------------EMPID INTEGER NOT NULL NAME CHAR(20) SALARY DECIMAL(10,2) ENABLED CHAR(1)

PAST_EMPLOYEES -------------------------EMPID INTEGER NOT NULL NAME CHAR(20) SALARY DECIMAL(10,2) Assuming PAST_EMPLOYEES is empty and CURRENT_EMPLOYEES is populated, which of the following statements will copy all past employees (enabled column i s 'N') from CURRENT_EMPLOYEES to table PAST_EMPLOYEES? A INSERT INTO past_employees VALUES (current_employees WHERE ENABLED = 'N') B. INSERT INTO past_employees (SELECT empid, name, salary FROM current_employees) C. INSERT INTO past_employees (SELECT * FROM current_employees WHERE ENABLED = 'N')

D. INSERT INTO past_employees (SELECT empid, name, salary FROM current_employees WHERE ENABLED in ('N')) 12. Which of the following is true about columns? A. Each column consists of one or more records B. Columns are where the individual pieces of information are stored for each r ecord C. Columns must be designated a specific data type D. Columns are also known as records 13. Major difference between relational data and XML data? A)Relational data is self-describing; XML data is not B)Relational data has inherent ordering; XML data does not C)Relational data must be tabular; XML data does not have to be tabular D)Relational data is comprised of entities; XML data is comprised of numbers, characters, and dates

14. Authentication takes place? A. Just before DB2 executes a SQL statement sent by a client application. B. When the user connects to the database. C. When the user disconnects from a database. D. It is part of DB2 server startup process 15. Which event will NOT cause a trigger to be activated? A. DELETE B. SELECT C. INSERT D. UPDATE 16. In client-server environment, which two can be used to verify passwords? A)System Catalog B)User ID/password file

C)Client Operating System D)Communications layer E)Application Server

17. Which one is a reason for using databases to store data INSTEAD of the many alternatives? A. Databases store data in an unstructured way for faster insert performance. B. Databases are cheaper to use than other alternatives. C. Databases are an intrinsic functionality of most Operating Systems, thus it' s widely available to applications. D. Databases allow multiple users to handle and change the data without losing data and its consistency. 18. An incremental cumulative backup is? A. Backup all of the data that has changed since the last successful full or del ta backup. B. Backup of a single table space. C. Backup of the entire database. D. Backup all of the data that has changed since the last full backup. 19. Which two authorities allow a user to create a new database? A)SYSADMN B)SYSCTRL C)SYSMAINT D)DBADM E)CREATEDB

7. Which of the following options best describes a domain found in the table bel ow?

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. Manager Domain = (N) B. Name Domain = (Set of all Possible Names) C. Extension Doman = (53412) D. ID Domain = (1, 2, 3) 8. 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 followi ng 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. 22. Which will allow user USER1 to change the comment associated with a table na med 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

23. Buffer pools are associated with table spaces so that they can increase perf ormance by caching data in memory. Which of the following is true? A. A table space can only be associated with a buffer pool that has the same pag e size. B. A table space can only be associated with a buffer pool that has a smaller o r same page size. C. A table space can only be associated with a buffer pool that has a larger or same page size. D. A table space can only be associated with a buffer pool that has a larger pa ge size. 24. Which one is true about a well-formed XML document? A. Has one or more root nodes. B. Tags can have at most one attribute. C. Always has a single document node. D. End tags are optional. 25. Which two database objects may the SELECT privilege be controlled? A)Sequence B)Nickname C)Schema D)View Index

26. Which one is true about Static SQL? A. It takes advantage of the table statistics at runtime. B. The structured of the SQL statement must be completely specified at the precompilation phase. C. It is compiled and executed by an application at run-time. D. Static SQL does not exist. 27. Using DB2's CLP, to access a remote database for the first time, it is neces sary to: A. First catalog the remote system or node, and then catalog the database within the remote node B. First register the remote system user in the system catalog, and then setup a SSH communication to the remote node C. DB2 cannot use databases in remote systems unless SYSADM authority is grante d to the local user D. First list all the remote databases with the db2 list database directory com mand, and then select the remote database from the list 28. Which two privileges is required in order to use a package? A)BINDADD B)BIND C)CONNECT D)EXECUTE E)USE

29. Which privilege permits a user to create objects within a schema? A. CONTROL B. ALTER C. REFERENCES D. CREATEIN

30. What is the purpose of a DB2 Access Plan? A. SQL developers can define Access Plans to tell DB2 the best way to retrieve t he data from a SQL query. B. Describes the order of operations to access data necessary to execute a SQL or XQuery statement C. To replicate data between a DB2 database and relational databases from other vendors D. To visually construct complex DML statements and examine the results of thei r execution 31. Which of the following is not true about DB2 Instances: A)It has a stand-alone DB2 environment. B)Only one instance can exist using the same DB2 executable files. C)Each instance has its own configuration file. D)There could be multiple instances per data server.

32. Consider a Stored Procedure with the following definition:

CREATE OR REPLACE PROCEDURE proc1 (p1 INTEGER, OUT p2 VARCHAR(20)) BEGIN

END @

Using DB2 CLP, which of the following commands would successfully execute proced ure PROC1?

A. CALL proc1(1, DEFAULT) B. CALL proc1(1, ?) C. CALL proc1(1) D. None of the above 33. Which of the following DB2 client/driver packages is NOT suitable for develo ping ODBC applications? A. IBM Data Server Client B. IBM Data Server Driver for ODBC and CLI C. IBM Data Server Runtime Client D. IBM Data Server Driver Package 34. Which of the following is not correct for Workgroup servers A)Limited to 16GB memory B)Available for Linux, Unix, Windows, zLinux C)Limited to 16 processing cores or 4 sockets D)Designed for larger workloads than DB2 Express

35. Which of the following commands below to drop(if it already exists) sample d atabase A)db2 drop sample B)db2 drop db C)drop db sample D)db2 drop db sample

36. ...is an ordered set of pointers inside a base table. A)index B)trigger

C)sequence D)view

37. In DB2 9.7, which of the following functions can be used to create tables fr om XML documents? A. XMLTABLE B. TABLEXML C. XML2RELATIONAL D. XML2TABLE 38. If circular logging is used, the following types of backup are allowed: A. Online full backup B. Offline full backup C. Online incremental backup D. Offline incremental backup 39. Which of the following tools would you use if you need to execute SQL statem ents against a DB2 database from the command line? A. DB2 Health Center B. DB2 Command Line Processor C. DB2 Command Line Advisor D. DB2 Control Center 40. Which of the following statements is NOT true regarding Table Spaces on DB2? A. A Table Space is a logical object in between logical table and physical conta iners B. All tables, indexes, and other data are stored in a table space C. A Table Space is a logical object required to store data, indexes and tables in temporary memory D. A Table Space is always associated to a Buffer Pool

41. Which of the following commands would delete the SAMPLE database? A. db2 drop sample B. db2 delete database sample C. db2 drop sample db D. db2 drop database sample

42. Which of the following SQL statements can be used to remove data from table "users": A. REMOVE TABLE users B. DROP TABLE users C. DELETE TABLE users D. ALTER TABLE users 43. In the following statement db2_node indicates.. Catalog tcpip node db2_node remote mysystem server db2tcp42 A. Host name B. Ip address C. Alias name D. service name 44. Which of following best describe the below statement: A)create database TESTDB2 ON c: B)database is created on drive C: C)automatic storage is enabled D)storage path is c: E)None of the above

45. If table TABLE1 contains 250 rows, which of the following statement will onl y 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

46. Which of the following installation packages does NOT contain the GUI admini stration tools? A. DB2 Data Server Enterprise Edition B. DB2 Data Server Express-C Edition C. IBM Data Server Client D. IBM Data Server Runtime 47. Consider table TB1 defined as below:

CREATE TABLE TB1 ( C1 INTEGER PRIMARY KEY, C2 VARCHAR(10)) Considering the following statements are successfully executed in CLP with auto -commit disabled, how many rows are INSERTED in table TB1

INSERT INTO TB1 VALUES (1, 'John') INSERT INTO TB1 VALUES (1, 'John') COMMIT INSERT INTO TB1 VALUES (1, 'John') ROLLBACK A. 0 B. 1 C. 2 D. 3

48. Which of the following is true about Table Spaces in DB2? A. A Table Space is a file managed by the operating system where DB2 can store d ata. B. A Table Space is always associated with a buffer pool. C. A Table Space to store user's temporary table data is automatically created when a database is created. D. A Table Space can be managed by the database (DB2) or by an external applica tion. 49. Which of the following is NOT part of the XQuery FLOWR expression? A. FOR clause B. LET clause C. ORDER BY clause D. WITH clause 50. Which of the following is a tool to configure automatic database backup? A. Configure Automatic Maintenance wizard B. Design Advisor C. Explain tool D. EXPORT utility 51. What is authorization? A. Authorization is a process that checks whether you have sufficient privilege s to perform the desired database operation. B. Authorization is the process where the DBA gathers information to see who wi ll have access to the database. C. Authorization is the process where the DB2 database checks with Windows secu rity to see if you have access to the DB2 database. D. Authorization is a process that validates that you are who you claim to be b y verifying your user ID and password. 52. Given the following table: USERS -------------------------ID INTEGER NOT NULL

NAME CHAR(20) NOT NULL PASSWORD VARCHAR(30) Which INSERT statement is not correct? A)INSERT INTO USERS VALUES ( 13, 'ABC', 'xyz') B)INSERT INTO USERS VALUES ( 13, 'ABC', NULL ) C)INSERT INTO USERS VALUES ( 13, '', 'xyz') D)INSERT INTO USERS VALUES ( 13, NULL, 'xyz')

53. Which of the following statements can be used to increase the marks of all s tudents 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'

54. Which of the following is not true for Views: A)provide a logical ordering of the rows of a table B)can be used to enforce the uniqueness of records stored in a table. C)provide a fast, efficient method for locating specific rows of data in very la rge tables. D)can force a table to not use clustering storage

55. Which of the following tools can be used to develop stored procedures? A. DB2 CLP

B. DB2 Command Editor

C. IBM Data Studio D. All of the Above

56. Your company has asked you to create a database to store and organize data a bout the structure of the company. You want to store branch and employee data as well as data onthe products that each employee in your company deals with. In order to r educe redundancy, how many tables should you create? Consider that your model should b e tailored to reduce the possible number of NULL values in the table(s). A. 1 B. 2 C. 3 D. 4 57. Which of the following statements is FALSE regarding Buffer Pools? A. Buffer Pools work as a cache, storing data that is read from table spaces. B. Pages in a Buffer Pool can be 4k, 8k, 16k and 32k in size. C. A database can only have one Buffer Pool. D. The size of a Buffer Pool can be automatically resized by STMM 58. Which of the following is NOT a supported type of trigger? A. AFTER B. BEFORE C. DURING D. INSTEAD OF 69. Given the following two tables:

TAB1 -----------------COL_1 COL_2 ----- ----A 10 B 12

C 14

TAB2 ------------------COL_A COL_B ----- ----A 21 C 23 D 25

Assuming the following results are desired:

COL_1 COL_2 COL_A COL_B A 10 A 21 B 12 - C 14 C 23 - - D 25

Which of the following joins will produce the desired results? A. SELECT * FROM tab1 INNER JOIN tab2 ON col_1 = col_a B. SELECT * FROM tab1 LEFT OUTER JOIN tab2 ON col_1 = col_a C. SELECT * FROM tab1 RIGHT OUTER JOIN tab2 ON col_1 = col_a D. SELECT * FROM tab1 FULL OUTER JOIN tab2 ON col_1 = col_a

60. Which of the following best define what a transaction is? A. A sequence of one or more SQL operations grouped together, also known as a single unit of work. B. A set of independent operations that can be executed in parallel. C. A data isolation level that can help prevent deadlocks by allowing reads on previously committed data. D. An object of a DB2 database. 61. Consider Table1 has no rows initially and that the auto commit feature is di sabled. After execution of the following statements: INSERT INTO Table1 VALUES (1, ABC ) INSERT INTO Table1 VALUES (2, DEF ) INSERT INTO Table1 VALUES (3, DEF ) COMMIT ROLLBACK INSERT INTO Table1 VALUES (4, GHI ) COMMIT INSERT INTO Table1 VALUES (5, DEF ) ROLLBACK COMMIT How many rows will be inserted in TB1? A)0 B)1 C)4 D)3

62. Given the following queries: SELECT c1 FROM tab1; SELECT c1 FROM tab2;

Which set operators can be used to produce a result data set that contains only records that are not found in the result data set produced by each query after duplicate rows have been eliminated? A)UNION B)INTERSECT C)EXCEPT D)MERGE

63. Which is a valid wildcard character in a LIKE clause of a SELECT statement? A)% B)* C)? D)\

64. Which two statements are true about the HAVING clause? A)The HAVING clause is used in place of the WHERE clause. B)The HAVING clause uses the same syntax as the WHERE clause. C)The HAVING clause can only be used with the GROUP BY clause. D)The HAVING clause accepts wildcards.

65. The following SQL statement: DELETE FROM tab1 WHERE CURRENT OF csr1 WITH RR Is used to perform which type of delete operation? A)Positioned

B)Searched C)Embedded D)Dynamic

66. Which of the following is true about Relational Databases and the Relational Data Model? A. A table does not allow duplicates and a relation does. B. A domain is the smallest unit of data. C. A column is the equivalent to a tuple. D. A domain is the set of some possible values for a specific field 67. Which of the following is NOT a DML statement? A. SELECT B. INSERT C. ALTER D. UPDATE 68. Given the following table definition:

SALES -------------------------SALES_DATE DATE SALES_PERSON CHAR(20) REGION CHAR(20) SALES INTEGER

Which of the following SQL statements will remove all sales that occurred in 199 5? A..DELETE * FROM sales WHERE YEAR(sales_date) = 1995 B. DELETE FROM sales WHERE YEAR(sales_date) = 1995 C. REMOVE * FROM sales WHERE YEAR(sales_date) = 1995 D. REMOVE FROM sales WHERE YEAR(sales_date) = 1995 69. Which of the following best describes the benefits of supporting XQuery's TR ANSFORM expression in DB2? A. It can be used to modify both XML and relational data, providing a common lan guage for developers n to handle the database data.

B. When used in a UPDATE statement, it simplifies the update of XML documents s tored in the database, since all processing is done by the DB2 engine. C. It is very useful to change XML nodes when the XML document is loaded in the client application. D. It can be used to automatically clean up unnecessary tags in a XML document, providing smaller documents thus saving space in the database. 70. Which of the following statements revoke access to SAMPLE database from user TOM? A. REVOKE CONNECT ON sample FROM USER tom B. REVOKE ACCESS FROM USER tom ON DATABASE C. REVOKE ACCESS FROM USER tom ON sample D. REVOKE CONNECT ON DATABASE FROM USER tom 71. How can an application modify the isolation level of operations running agai nst a DB2 database? A. Isolation level can be changed for a particular SQL statement. B. Isolation level can only be changed for the whole user session and all opera tions in that session will be affected. C. Isolation level to be used can be specified when executing the COMMIT operat ion. D. Isolation level is determined at the moment an application connects to the database. To change the isolation level, an application is required to create a new connection specifying the desired level. 72. Which Data Model was created with the focus of providing better data indepen dence? A. Relational B. Hierarchical

C. Semantic D. Network 73. Which of the following is the lowest cost DB2 product that can be legally in stalled on a windows server that has 4 CPUs capable of performing row compression? A. DB2 Express Edition B. DB2 Workgroup Edition C. DB2 Express-C Edition D. DB2 Enterprise Edition 74. A company has a large amount of data to store and wants to be able to do the following with the data:

Have a standard interface for accessing the data. Have multiple users with the ability to insert, update and delete data. Make changes to the data without risk of losing data and its consistency. Have the capability to handle huge volumes of data and users. Have tools for data backup, restore and recovery.

What data storage method is the most optimal solution for the company? A. Text files B. Comma delimited data files C. Spreadsheets D. Database 75. Which of the following options will perform an offline table space recovery? A. RESTORE DATABASE SAMPLE TABLESPACE (MYTBSP) OFFLINE FROM /tbspbkp B. RESTORE DATABASE SAMPLE TABLESPACE (MYTBSP) FROM /tbspbkp C. RESTORE DATABASE SAMPLE TABLESPACE (MYTBSP) ONLINE FROM / tbspbkp D. There is no option to restore a table space in DB2 76. Given the following table definition:

SALES --------------------------------------------INVOICE_NO CHAR(20) NOT NULL SALES_DATE DATE SALES_PERSON CHAR(20) REGION CHAR(20) SALES INTEGER If the following SELECT statement is executed, which describes the order of the rows in the result data set produced? SELECT * FROM sales A)The rows are sorted by INVOICE_NO in ascending order. B)The rows are sorted by INVOICE_NO in descending order. C)The rows are ordered based on when they were inserted into the table. D)The rows are not sorted in any particular order.

77. Which DB2 data types does NOT have a fixed length? A)INT B)CHAR C)XML D)DOUBLE

78. Given the requirements to store employee names, employee numbers, and when e mployeeswere hired, which built-in data types CANNOT be used to store the day an employee was hired? A)Character Large Object

B)Time C)Varying-Length Character String D)Timestamp

79. Which two are optional and do not have to be specified when creating a table ? A)Table name B)Column name C)Default constraint D)Column data type E)NOT NULL constraint

80. Which CANNOT be used to restrict specific values from being inserted into a column in aparticular table? A)Index B)Check constraint C)Referential constraint D)Default constraint

81. Which of the following privileges permits a user to update the comment assoc iated with atable? A. ALTER B. CONTROL C. CREATEIN D. REFERENCES

82. What is the default isolation level in DB2 9.7 for Linux, Unix and Windows f or new databases? A. Cursor Stability B. Cursor Stability with Currently Committed semantics C. Uncommitted Read D. None of the above 83. Which of the following is true about the Information Model? A. Allows specification of objects in a detailed level. B. It can describe objects but not the relationships between them. C. It is a group of descriptions explaining objects of a data model. D. Data models can be used to map an Information Model to a software implementa tion 84. Assuming that you are currently connected to a DB2 database, which of the fo llowing commands will terminate your connection? A. db2 connect reset B. db2 connect end C. db2 connect kill D. db2 connect finalize 85. Giving the following create table statement

CREATE TABLE student_marks (student_name CHAR(20) NOT NULL, student_number INTEGER NOT NULL, math INTEGER, phys INTEGER, engl Integer)

Which of the following statements will retrieve the student's name who does NOT have a phys mark? A. SELECT student_name FROM student_marks WHERE phys = ' ' B. SELECT student_name FROM student_marks WHERE phys = NULL

C. SELECT student_name FROM student_marks WHERE phys = 0

D. SELECT student_name FROM student_marks WHERE phys is NULL 86. In embedded SQL code, which of the following is true about delimiters? A. Used by the OS to delimit system variable declaration. B. Used by the database to indicate the end of a column. C. Used by compiler to indicate the end of the program. D. Used by PRECOMPILER to identify SQL statements to be translated. 87. Given the following UPDATE statement:

UPDATE employees SET workdept = (SELECT deptno FROM department WHERE deptno = 'A01') WHERE workdept IS 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 only succeed if the data retrieved by the subquery does n ot contain multiple records. C. The statement will succeed; if the data retrieved by the subquery contains m ultiple records, only the first record will be used to perform the update D. The statement will only succeed if every record in the EMPLOYEES table has a null value in the WORKDEPT column 88. Which of the following objects you would need to create in order to execute a block of code every time table TB1 is updated? A . An AFTER trigger B. A UDF C. A Stored Procedure D. An User Defined Type 89. You were assigned the task of importing a large amount of data into a DB2 da tabase. Considering you must Have logged information about the rows imported and that yo u want to perform the load as fast as possible, which of the tools would you be th e best choice for the job?

A. DB2 INSERT B. DB2 IMPORT C. DB2 LOAD D. DB2 CLP 90. Which of the following properties is related to the fact that a committed tr ansaction guaranteesthat all of the operations are completed and in a roll backe d transaction the effect of all operations are reverted? A. Consistency B. Atomicity C. Isolation D. Durability 91. Given the statement: CREATE TABLE tablea (col1 INTEGER NOT NULL, CONSTRAINT const1 CHECK (col1 in (100, 200, 300)) Which can be inserted into TABLEA? A)0 B)NULL C)100 D)'100'

92. Which causes a lock that is being held by an application using the Cursor St ability isolation level to be released? A)The cursor is moved to another row B)The row the cursor is on is deleted by the application C)The row the cursor is on is deleted by another application D)The row the cursor is on needs to be updated by another application

93. A table contains a list of all seats available at a football stadium. A seat consists of a section number, a seat number, and whether or not the seat has been assigned. A ticket a gent working at the box office generates a list of all unassigned seats. When the age nt refreshes the list, it should only change if another agent assigns one or more u nassigned seats. Which is the best isolation level to use for this application? A)Repeatable Read B)Read Stability C)Cursor Stability D)Uncommitted Read

94. Which of the following is TRUE about CASCADE delete rule: A)Enforces the presence of a parent row for every child after all the referentia lconstraints are applied. B)Implies that deleting a row in parent table automatically deletes any related rows independent table. C)Ensures that deletion of a row in parent table sets values of foreign key in a nydependent row to null (if nullable). D)Prevents any row in parent table from being deleted if any dependent rows are found.

95. Query: SELECT * FROM TABLE T1 INNER JOIN T2 ON T1.ID = T2.ID is equivalent t o : A)SELECT * FROM TABLE T1,TABLE T2 WHERE T1.ID = T2.ID B)SELECT * FROM TABLE T1 Left outer join TABLE T2 WHERE T1.ID = T2.ID C)SELECT * FROM TABLE T1 full join TABLE T2 WHERE T1.ID = T2.ID D)SELECT * FROM TABLE T2 Right outer join TABLE T1 WHERE T1.ID = T2.ID

96. which of the following isnot TRUE for Repeatable Read A)Highest level of isolation B)Locks the entire table or view being scanned for a query C)Provides minimum concurrency D)none of the above

97. Default isolation for DB2 9.5 A)Repeatable read B)Read stability C)Cursor stability D)Currently Committed

98. Which one of the following is true for Granting SYSADM authority to the grou p 'grp': A)UPDATE DB CFG USING SYS_GROUP GROUP1 B)UPDATE DBM CFG USING SYSADM_GROUP GROUP1

C)UPDATE DBM USING SYSADM_GROUP GROUP1 D)UPDATE DBM CFG USING SYSADM GROUP1

99. Which of the following false for Online Backup A)Allows other applications or processes to access the database B)Available to users during backup C)Can backup to disk, tape, TSM and other storage vendors D)Does not allow other applications or processes to access the database

100. Which package privilege is required to rebind, drop or execute a package A)CONTROL B)BIND C)EXECUTE D)USAGE

101. Which is not the isolation in db2? A) repeateable read B) uncommited read C) currently commited D) all are isolation levels 102. Which isolation is default in DB2 9.7 version? A) cursor stability B) read stability C) currently commited D) none of these 103. How to off currently committed isolation level? A) update command options using cur_commit off B) update command options using currently commit of C) update db cfg using cur_commit disabled D) we can not make if of because it is default. 104. By default authentication for DB2 server is on? A) server B) client C) kerboros D) server_encrypt 105. Which of the following is NOT a valid data model? a) Information model

b) Network model c) Relational model d) File model 106. Which of the following data models provides better Data Independence? a) Relational b) Object-Oriented c) Network d) Semantic 107. pureXML does not comes packaged with which of the following DB2 Editions? a) DB2 Express-C b) DB2 Express c) DB2 Workgroup Server Edition d) DB2 Enterprise Server Edition 108. Which of the following is NOT true about Buffer Pool in DB2? a) It is an area of main memory used to cache table data. b) Each database in DB2 must have atleast one buffer pool. c) Page size of the tablespace must be exactly the same as that of the Buffer po ol page size. d) Buffer pools once created cannot be dropped. 109. When does authentication takes place in DB2? a) When a user power on the system on which DB2 is installed.

b) When a user issues the CONNECT command to connect to a DB. c) It takes place after a connection to the DB is established. d) authention is not required at all in DB2. 110. Given the following stored procedure: CREATE PROCEDURE UPDATE_SALARY_IF (IN employee_number CHAR(6), IN rating SMALLINT) LANGUAGE SQL BEGIN . . .. . .. . Which command will excute/invoke the above stored procedure? a) CALL update _salary_if( 112 ,?) b) EXECUTE update_salary_if (112,?) c) CALL update_salary_if(112,?) d) RUN update_salary_if( 112 ,?) 111. Which of the following type of TRIGGER can be made on a view? a) Instead of b) After Trigger c) Before Trigger d) Execute trigger 112. Which Command if issued, will disconnect ALL the Applications/users from th e database a) force applications all b) connect reset c) Diconnect d) Deactivate all 113. In which of the following Logging type , SECONDARY log files are allocated if Primary Log files are full? a) Incremental b) Circular c) Archival

d) Delta 114. Which of the following options is TRUE about applications developed with Em bedded SQL? a. Application code is embedded inside the DB2 database. b. Application needs to be precompiled. c. Application can be directly compiled by the programming language compiler. d. Application code can be compiled by DB2 compiler. 115. Which of the following is NOT a valid approach for storing XML documents? a. Shredding XML documents into tables in a RDBMS b. Storing XML documents in CLOB columns c. Inserting XML documents in an integer column d. Using an external XML-only database 116. Which of the following is NOT displayed by DB2 Access Plan? a. Properties for operators b. Indexes or columns c. Global information Authorization type d. Authorization type 117. Which of the following statements is FALSE? a. The ALTER sequence privilege allows a user to perform administrative tasks li ke restarting the sequence, changing the increment value for the sequence, and add or change the comment associated with the sequence.

b. When the GRANT statement is executed with the WITH GRANT OPTION clause specified, the user/group receiving privileges is given the ability to grant the CONTROL privilege to others. c. The USAGE privilege is the sequence privilege that allows a user to use the PREVIOUS VALUE and NEXT VALUE expressions that are associated with the sequence. d. The ALTER privilege for tables allows a user to modify the structure of a tab le. 118. Which of the following commands produces a backup image from a database? a. START BACKUP DATABASE SAMPLE USING D:\bkp b. BACKUP DATABASE SAMPLE TARGET= D:\bkp c. BACKUP DATABASE SAMPLE TO D:\bkp d. START BACKUP DATABASE SAMPLE TO D:\bkp 119. Which of the following commands can be used to undo operations executed ins ide a unit of work? a. COMMIT b. ROLLBACK c. RETURN d. UNDO TRANSACTION 120. If the sequence(s1) is created with start value 200 and incremented by 5, c ache 5.what valueis generated if we use next value for s1. A) gives error to generate value. B) 205 C) 200 D) none of these 121. On which of the following operations Trigger cannot be used . A)Update B)Insert C)Drop D)Delete

122. Which of the following is not true for well-formed XML document: A)Each element begins with a start tag and ends with an end tag. B)An element can contain other elements, attributes, or text nodes. C)Attribute values must be enclosed in double quotes. Text nodes, on the other h and, should not. D)It can have one or more root element.

123. Which of the following is NOT a valid method of authentication that can be used by DB2 9? A)SERVER B)SERVER_ENCRYPT C)CLIENT D)DCS

124. Which are NOT stored in the system catalog tables? A)SQL statements used to create views B)SQL statements used to create triggers C)SQL statements used to create constraints D)Table names

125. which of the following command is used to reorganise the table? A) reorganize table table_name B) reorganize table_name C) reorg table table_name

D) reorg table_name

126. Application A is running under the Repeatable Read isolation level and hold s an Update lock on table TAB1. Application B wants to query table TAB1 and cannot wait for Appli cation A to release its lock. Which isolation level should Application B run under to ach ieve this objective? A. Repeatable Read B. Read Stability C. Cursor Stability D. Uncommitted Read 127. Which of the following is a characteristic of High Availability? A. It allows compression of data. B. It allows definition of a policy to guarantee quality of service to applicat ions. C. It allows replication of data to a standby server that can take over in case of failure. D. It allows high performance of a DB2 server by distributing workload across s everal machine. 128. If secondary log files are to be allocated until the unit of work commits o r 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

129. Which of the following programming languages can be used to develop applica tions that require access to a DB2 database? A. Java B. PHP C. C# D. All of the above 130. Which Data Model was created with the focus of providing better data indepe ndence?

A. Semi-structured B. Hierarchical C. Relational D. Entity-Relationship 131. How does automatic storage work in DB2? A. Automatic storage simplifies storage management by allowing you to specify st orage paths where the database manager can place table space data, and where the database managerallocates space for various uses. B. Automatic storage is an option which is set when you create a DB2 database. It allows transactions that are written to the database to be automatically committed. C. Automatic storage is a function of DB2 that allows tables to be backed up au tomatically on a set schedule. D. Automatic Storage can be used to automatically reorganize the data on the ph ysical media in order. 132. Which of the following statements grants user John the ability to insert da ta to table tab1? A. GRANT ADD ON TABLE tab1 TO John B. GRANT INSERT ON TABLE tab1 TO John C. GRANT ADD ON TABLE tab1 TO USER John D. GRANT INSERT ON TABLE tab1 TO USER John 133. Which of the following programming languages can be used to develop UDFs? A. Java, Javascript, SQL B. C/C++, Java, .Net languages

C. SQL, C# .Net, Perl D. Perl, C/C++, SQL 134. Which of the following is FALSE about views? A. Do not contain real data B. Any view can be updated, independent of its definition C. When changes are made to data through a view, the data is changed in the und erlying table D. Can be used interchangeably with tables when retrieving data 135. A Dirty Read occurs when? A. A transaction read the same row of data twice and returns different data valu es with each read. B. A search based on some criterion returns additional rows after consecutive s earches during a transaction. C. Uncommitted data is returned, but the transaction that originated them was r olled back. D. Two transactions read and then attempt to update the same data, the second u pdate will overwrite the first update before it is committed. 136. What is the command to list all the tables in a all schemas? A) list tables B) list tables for schema_name C) list tables for all D) list tables for database_name 137. Why do we create explicit schema? A) because it is very difficult to create implicit schema B) to avoit the name collision of same tables. C) so as to control the access of some tables from other users D) so as to keep the data persistant through out the transaction. 138. Which of the following statement is true A) we can not create view from selecting the data from two tables B) we can create view without select query

C) we can create a alias for an alias. D) none of these 139. When creating a DB2 database, which of the following table spaces is NOT au tomatically created? A. User table space B. User temporary table space C. Catalog table space D. System temporary table space 140. Which of the following is NOT a SQL/XML function in DB2 9.7? A. XMLQUERY B. XMLEXISTS C. EXISTS D. XMLCAST

141. Which of the following is characteristic difference between Cursor Stabilit y and Currently Committed? A. Reader blocks Reader B. Reader blocks Writer C. Writer blocks Reader D. Writer blocks Writer

142. Assuming that you are currently connected to TESTDB, which of the following will allow the view of the database settings with details? A. db2 get db cfg with detail B. db2 get db cfg show detail C. db2 get dbm cfg with detail D. db2 get dbm cfg show deta 143. When using a Relational Database, which of the following does NOT apply? A. Accesses data using Data Manipulation Language (DML) such as SQL. B. Define your database schema using a Data Definition Language (DDL). C. Data is stored in a hierarchical model. D. You can use normalization to avoid redundant data in your tables. 144. Consider the following scenario. You have 3 tables with the same name (TABL E_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 145. Which of the following is NOT a Feature Pack that can add extra functionali ty to a DB2 server? A. Advanced Access Control B. Storage Optimization C. Performance Optimization D. pureXML 146. Considering the SQL statement below, which option best describes what ABS i s:

UPDATE tb1 SET col1 = ABS(col2) A. Stored Procedure B. Built-in function C. Trigger D. User Defined Type 147. When a user is connected to a database, which of the following privileges i s required for the user to use a package? A. BIND B. BINDADD C. EXECUTE D. USE 148. Which of the following is NOT true about the Information Model? A. Abstract management of objects at a conceptual level. B. Defines relationships between managed objects. C. Group of descriptions explaining objects of a data model. D. Data models can be used to map an Information Model to a software implementa tion 149. Which of the following is an XML-based language for transforming XML docume nts? A. XHTML

B. XSLT C. HTML D. Java 150. How to list all the schema names in a database? A) list schemas B) list schemas for all C) select schemaname from syscat.schemata D) select schemaname from syscat.database_name

Vous aimerez peut-être aussi