DB2...

38
1. Which of the following is not the way to catalog the database? A) search the network B) manual configuration C) using profile D) using system environment configuration file. 2. What are the entities used to model data in the relational Model? A collection instances of entities. Relations, attributes and tuples. A collection instances of record types. Tables, rows and columns 3 By default authentication for DB2 server is on? A) server B) client C) kerboros D) server_encrypt 4 which of the following will give u the best performance to large amounts of data into a db2 table a) Import b) Load c) Fast import d) bulk insert 5 which of the following is not a supported type of trigger? After Before During Instead of 6 Which of the following defines a transaction? A sequence of one or more SQL operations grouped together, also known as single unit of work A set of independent operations that can be executed in parallel A data isolation level that can help prevent deadlocks by allowing reads on previously committed data. An object of a DB2 database

description

DB2 details

Transcript of DB2...

Page 1: DB2...

1. Which of the following is not the way to catalog the database?A) search the networkB) manual configurationC) using profileD) using system environment configuration file.

2. What are the entities used to model data in the relational Model?• A collection instances of entities.• Relations, attributes and tuples. • A collection instances of record types.• Tables, rows and columns

3 By default authentication for DB2 server is on?• A) server • B) client• C) kerboros• D) server_encrypt

4 which of the following will give u the best performance to large amounts of data into a db2 tablea) Import b) Load c) Fast importd) bulk insert

5 which of the following is not a supported type of trigger?– After– Before– During – Instead of

6 Which of the following defines a transaction?• A sequence of one or more SQL operations grouped together, also known as single unit of work • A set of independent operations that can be executed in parallel• A data isolation level that can help prevent deadlocks by allowing reads on previously

committed data.• An object of a DB2 database

7 For better data independence which data model we was created?• Relational • Hierarchical• Semantic• Network

Page 2: DB2...

8 A dirty read occurs when?• A transaction read the same row of data twice and returns diff data values with

each read.• A search based on some criterion returns additional rows after consecutive

searches during a transaction.• Uncommitted data is returned, but the transaction that originated them as

rolled back.• Two transactions read and then attempt to update the same data, the second

update will overweight the first update before it is committed.

9 which of the following objects you would need to create in order to execute a block of code every time table TB1 is updated?

• In after trigger• udf• A stored procedure• An user defined type.

10 considering the SQL statement below, which option best describes what app.tax isselect app.tax(salary) from employee

• user defined function • stored procedure• Trigger• User defined type

11 which of the following programming languages can be user to develop UDF’s?• java, JavaScript, SQL• C/C++, java, .NET languages • SQL, C#, .nET , Perl• Perl,C/C++, SQL

12 Define Authorization?• Authorization is a process that checks whether you have sufficient provides to

perform the desired databases operation• Authorization is the process where the DBA gathers info to see who will have

access to the database.• Authorization is the process where the DB2 database checks with windows

security to see if you have access to the DB2 database• Authorization is a process that validates that you are who you clain to be by

verifying your user ID and password.

Page 3: DB2...

13 If circular logging is used, the following types of backup are allowed• online full backup• offline full backup • online incremental backup• offline incremental backup

14 which of the following is not true?• Structured query language is the standard language for manipuApplication A is

running under the repeatable read isolation level and holds an update lock on table TAB1. Application B wants to query table TAB1 and cannot wait for application A to release its lock. Which isolation level should application B run under to achieve this objective?

• Repeatable Read• Read stability• Cursor Stability• Uncommitted Read

20 Which of the following is characteristic of high availability?• It allows compression of data• It allows definition of a policy to guarantee quality of service to applications.• It allows replication of data to a standby server that can take over in case of

failure . • It allows high performance of a DB2 server by distributing workload across

several machines.

21 which of the following is true about Static SQL?• It takes advantage of the table statistics are runtime.• The structure of the SQL statement must be completely specifies at the

precompilation phase.• It is compiled and executed by an application at run-time.• Static SQL does not exist.

22 which of the following is true about relation databases and the relation data model?• A table does not allow duplicates and a relation does.• A domain is the smallest unit of data.• A column is the equivalent to tuple.• A domain is the set of some possible values for a specific field.

23 which of the following is NOT a SQL/XML function in DB2 9.7?• XMLQUERY• XMLEXISTS

Page 4: DB2...

• EXISTS • XMLCAST

24 which of the following elements are shown in a DB2 access plan?• Configuration parameters relevant to optimization.• Properties for operators.• Statistics• All of the above.

25 In embedded SQL, which of the following is an example of how to establish a connection to the sample database in DB2?

• EXEC SQL connect to sample• DB2 Connect to DB sample• EXEC connect to sample• EXEC db2 connect to database sample

26 In db2 9.7 which of the following functions can be used to create tables from XML documents?• XMLTABLE • TABLEXML• XML2RELATIONAL• BLE

27 what is the default isolation level in Db2 9.7 for Linux, Unix and windows for new databases?• Cursor stability • Cursor stability with current committed semantics • Uncommitted read• None of the above

28 Assuming that you are currently connected to a Db2 database which of the following commands will terminate your connection?

• Db2 connect terminate • Db2 connect end• Db2 Connect kill• Db2 Connect finalize

29 In which of the following Logging type , SECONDARY log files are allocated if Primary Log files are full?

a) Incrementalb) Circularc) Archivald) Delta

Page 5: DB2...

30 Given the option below which of the following it can remove a table from DB2?• remove• delete• del• drop

31 Which of the following is true about well-formed xml document?• mess or more root nodes • tags can here at most are attribute • always has a single document node • end tags are optional

32 Which of the following is true about table space in DB2?• a table space is a file managed by the as where db2 can store data• a TS is always associates with a buffer pool • a TS to store user’s temporary table data is automatically created when DB is created• a TS can be managed by the database (db2) or by an entered application

33 When using DBMS which do not apply.• Accesses data using DML such as SQL• define your DB schema using a DDL• data is stored in a hierarchical model • you can use normalization to avoid redundant data in tables

34 Using DB2 CPP to access a remote DB for the 1st time it is necessary • Catalog the remote system or node and then catalog the DB written the remote node • b. First register the remote system user in system catalog and then setup a SQL communication

to the remote node• db2 cannot use DB is remote system unless SYSADMIN authority is grated to local user • first list all the remote DB with the db2 list DB directly command and the select the remote DB

from the list

35 Which of the following is true about columns? • each columns consists of one or more records• columns are store the individual pieces of info are stores for each record• columns must be designated a specific data type • columns are also known as records

36 Which of following delete sample database?

Page 6: DB2...

• db2 drop sample • db2 delete database sample• db2 drop sample DB• db2 drop database sample

37 Which of the following is not part of the x query flow expression? • for clause• let clause• order by clause• with clause

38 which is true about RDBMS• a column can store value of different data type • a table consists of column and rows • rows in the same table can have a different set columns• rows are also known as fields of the table

39 Which is true about dynamic SQL • it is precompiled about binded in dynamic DB• the structure of an SQL statement must be completely specified at precompile time• it is compiled and executed by an application at run time • dynamic SQL does not exist

40 Which is an xml –based language for transforming xml document?• XHTML• XSLT • HTML• JAVA

41 What are the entities used to model data in relational model?• a collection of instances of entities• relation attributes and types • a collection on of instance of record type• table row and rows

42 SQL used to remove data from table users• remove table users• drop table users

Page 7: DB2...

• delete from table users • alter table users

43 Which of the following describes the fact that a committed transaction guarantee that all the operations are completed and in a roll backed transaction effected of all operations are reverted

• consistency.• atomicity • isolation• durability

44 statement that can add records to table.a. addrecb. addrecordc. insertd. add

45 Importing a large amount of data in db2 db. Considering you must have logged intl.about the row imported and that want to perform the load as fast as possible which of the tools would be best choice for the join

• a. db2 insert• b. db2 import• c. db2 load • d. db2 clcp

46 which of the following is characteristic difference b/w cursor stability and currently committeda. reader block readerb. reader block writerc. writer block readerd. writer block writer

47 which of the following statement is false about transactionsa. operations inside a transaction are executed in a parallelb. only 1 commit statement can be executed inside the same transactionc. transaction guarantee atomicity of a group of operation d. a rollback or commit statement finalize a transaction

48 Assuming that you are current connected to test db which of the following will allow the view of the database setting with details

a. db2 get db cfgb. db2 list db cfgc. db2 list all from db cfgd. db2 get all from db cfg

Page 8: DB2...

49 which of the following is not a supported type of trigger a. afterb. beforec. duringd. instead of

50 when a user is connected to database which of the following privileges is required for the user to use a package

a. bindb. bindaddc. executed. use

51 Which of the following is a tool to configure automatic database backup a. Configure automatic maintenance wizardb. design advisorc. explain toold. export utility

52 Considering the SQL statements below, which option best describes what ABS isUPDATE tb1 SET col1 =ABS (col2)

a) Stored Procedureb) Built in function c) Triggerd) User Defined

53 Which of the following 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 diff set of columnsd) Rows are also known as fields of the table.

54 In embedded SQL code, which of the following is true about delimiters?>a) Used by the OS to delimit system variable declarationb) Used by the DB to indicate the end of Columnc) Used by the compiler to indicate the end of the program.d) Used by the precompile to identify sql statements to be translated.

Page 9: DB2...

55 which of the following is false about viewsa. do not contain real datab. 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 underlying tabled. can be used interchangeably with table when retrieving data

56 Which of the following is not a tool that comes with db2A.db2 command windowB.db2 command line processorC.db2 script editorD.db2 first steps

57 1) A company has a large amount of data to store on wants to be able to do the following with the data

a)text filesb)databasec)spreadsheetsd)comma delimited data files

58 which of the following is false about the information model?a. provides the details to implement objects in db’s.b. defines relationships between manged objects.c. provides an abstract mangement of objects to a conceptual level.D. provides a conceptual /abstract model for designers.

59 Which of the following is created automatically when a db2 database is created?• Temp space1 table space• Sys cat space table space• IBMDEFAULT buffer pool• All the above

60 what are the advantages of using stored procedures?• Reduce network traffic• Centralize the location where code is stored and changed• Enforcement of business rules• All the above

61 Which of the following stores db2 `configuration information?• Dbmcfg• Dbcfg

Page 10: DB2...

• Db2 profile registey• All the above

62 If secondary log files are to be allocated until the unit of work commits or stores is exhausted , which type of logging is used

• Infinite logging• Archival logging• Circular logging • It can not be done in db2

63 Which of the following privileges permits a user to create objects with in a schema?• Control• Alter • References• Createin

64 Which of the following privileges permits a user to update the comments associated with a table?

• Control• Alter • Createin• References

65 which of the following programming language can be used to develop applications that required access to a DB2 database application

• A. java• B. php• C. c#• all the above

66 which is not DML statement?• A. alter• B. insert• C. select• update

67 DB2 authentication server is defined within• A. database configuration• B. database managed configuration• C. DB2 registery• D.systems catalog

Page 11: DB2...

68 which of the following table space is not created by default• 1)user temporary space • 2)syscatspace• 3)system temporary space• 4)user space1

69 which of the following is free version of db2?• a)DB2 Express-c • b )DB2 Express• c )DB2 Enterprise• d )DB2 workgroup

70 which of the following describes the C in Db2 Express-c editiona)c stands for C languageb)it is free to develop,destributec)it is 2gb memoey installabled)all the above

71 What is trusted context?a)It is a special area in a buffer pool that can be written only by a seletec set of users.b)it is a db2 capabilty that allows application to change users without breaking the connection

to the database .c)it is a db2 capability that allows users to establish a connection to the database without

providing username or password.d)it is a types of container in a table space that allows faster I/O operations.

72) What are the advantages of using Stored Procedures? A. Reduces network traffic B. Access to features that exist only on the server C. Enforcement of business rules D. All of the above

73) When creating a DB2 database, which of the following table spaces is NOT automatically created? A. User table space B. User temporary table space C. Catalog table space D. System temporary table space

Page 12: DB2...

74 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

75. Which of the following 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.

76. Which of the following statements best describes the XML Regions Index in DB2?

A.The Regions Index is a descriptor for referencing large objects in the LOB storage area. B.The Regions Index is a new type of XML index available in DB2 9.7. C.The Regions Index facilitates access to document regions in the XML data area. D.The Regions Index can be compressed by issuing an offline reorg operation on the table.

77. 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 procedure PROC1? A.CALL proc1(1, DEFAULT) B.CALL proc1(1, ?) C.CALL proc1(1)

Page 13: DB2...

D.None of the above

78. 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 implementation.

79. Which of the following options best describes a domain found in 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. Manager Domain =(N)

B. Name Domain = (Set of all Possible Names)

C. Extension Doman = (53412)

D. ID Domain = (1, 2, 3)

80. Given the following table:

GUESTS ------------------ name age ----- ----- Jenny 34 Rodney 36 Oliver 21 Angie 42 Tom 28 Vincenzo 25

What names would be displayed as the result of the following SQL query SELECT name FROM GUESTS WHERE name LIKE '%o_'

A.Oliver, Rodney, Tom, Vincenzo B.Rodney, Tom

Page 14: DB2...

C.Tom D.Oliver, Rodney, Tom

81. Buffer pools are associated with table spaces so that they can increase performance 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 page size. B.A table space can only be associated with a buffer pool that has a smaller or 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 page size.

82. 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

84. Which of the following best describes the benefits of supporting XQuery's TRANSFORM expression in DB2?

A. It can be used to modify both XML and relational data, providing a common language for developers to handle the database data.

B. When used in a UPDATE statement, it simplifies the update of XML documents stored 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

Page 15: DB2...

documents thus saving space in the database.

85.Which of the following is characteristic difference between Cursor Stability and Currently Committed?

A.Reader blocks Reader B.Reader blocks Writer C.Writer blocks Reader D.Writer blocks Writer

86. 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

87. Which of the following options can be used to check the minimum point in time (PIT) for a table space restore?

A.LIST TABLESPACES SHOW ALL B.RESTORE DATABASE SAMPLE TABLESPACE (MYTBSP) FROM /tbspbkp C.RESTORE DATABASE SAMPLE TABLESPACE (MYTBSP) ONLINE FROM /tbspbkp D.GET SNAPSHOT FOR TABLESPACE ON <database>

88.Which of the following programming languages can be used to develop applications that require access to a DB2 database?\

Page 16: DB2...

A. Java B. PHP C. C# D. All of the above

89. 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

90. 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 - -

Page 17: DB2...

C 14 C 23

91.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

92. 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

93. What is the default isolation level in DB2 9.7 for Linux, Unix and Windows for new databases?

A.Cursor Stability B.Cursor Stability with Currently Committed semantics C.Uncommitted Read D. None of the above

94. Given the following table definition:

SALES -------------------------- SALES_DATE DATE SALES_PERSON CHAR(20) REGION CHAR(20) SALES INTEGERWhich of the following SQL statements will remove all sales that occurred in 1995?

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

95. Your company has asked you to create a database to store and organize data about the structure of the company. You want to store branch and employee data as well as data on

Page 18: DB2...

the products that each employee in your company deals with. In order to reduce redundancy, how many tables should you create? Consider that your model should be tailored to reduce the possible number of NULL values in the table(s).

A.1B.2C.3D.4

96.Which of the following best describes the advantages of executing a set of DML statements inside a single transaction?

A The DBMS records those operations in the audit logs since they are grouped inside a transaction.

B.The DBMS stores the transaction operations so that the client applications can rerun the transaction more easily.

C. The DBMS guarantees that either all changes performed by the DML are stored, or in case of error, the changes are undone, leaving the database in a consistent state.

D. The DBMS guarantees that all operations are always executed successfully.

97. Two tables are created by the following statement

CREATE TABLE color ( c_id INTEGER NOT NULL PRIMARY KEY, C_desc CHAR(20))

CREATE TABLE object( o_id CHAR(2), o_desc CHAR(20), c_id INTEGER REFERENCES COLOR (c_id) ON DELETE CASCADE)

Which option correctly describes the change on the two tables after the statement below is executed:

DELETE FROM color WHERE c_id = 2

A.Only rows in table COLOR can be affected. B.Only rows in table OBJECT can be affected. C.Rows in both color and object with c_id = 2 will be deleted. D. No row will be deleted.

98.Which Data Model was created with the focus of providing better data independence?

Page 19: DB2...

A.Semi-structured B.Hierarchical C.Relational D.Entity-Relationship

99. Assuming that you are currently connected to a DB2 database, which of the following commands will terminate your connection?A.db2 connect reset B.db2 connect end C.db2 connect kill D.db2 connect finalize

100.Which of the following is NOT true about Relational Databases?

A.Each column contains a specific type of information.

B.Columns are where the individual pieces of information are stored.

C. A primary key can be composed of only one attribute.

D.Foreign keys are an attribute in one relation whose values match a primary key of another relation.

101The authentication method in a DB2 server is defined within:

A. The database configuration.

B.The system's catalog.

C.The DB2 registry.

D. The database manager configuration.

102Which of the following statements revoke access to SAMPLE database from user TOM?

Page 20: DB2...

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

103 Which of the following is NOT true 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.

104.Considering the SQL statement below, which option best describes what ABS is: UPDATE tb1 SET col1 = ABS(col2)

A. Stored Procedure

B.Built-in function

C.Trigger

D.User Defined Type

Which of the following stores DB2 configuration information?A. dbm cfgB. db cfgC. DB2 Profile RegistryD. All of the above

Your company has asked you to create a database to store and organize data about thestructure of the company. You want to store branch and employee data as well as data

Page 21: DB2...

on the products with which each employee interacts.In order to reduce redundancy, how many tables should you create?Consider that your model should be tailored to reduce the possible number of NULLvalues in the table(s).A. 1B. 2C. 3D. 4

Buffer pools are associated with table spaces so that they can increase performance bycaching data in memory. Which of the following is true?A. A table space can only be associated with a buffer pool that has thesame page siz

Which of the following is false about Relational Databases?A. Each column contains a specific type of information.B. A primary key can be composed of only one attribute.C. Each column stores individual pieces of information for a record.D. Foreign keys are an attribute in one relation whose values match a primarykey of another relation.

Given the following UPDATE statement:UPDATE employees SET workdept =(SELECT deptno FROM department)WHERE workdept IS NULL(6)Which of the following describes the result if this statement is executed?A. The statement will fail because an UPDATE statement cannot contain asubqueryB. The statement will fail because the WORKDEPT column appears in the SETand WHERE clause at the same time.C. The statement will succeed if table DEPARTMENT has only 1 row.D. The statement will only succeed if every record in the EMPLOYEES tablehas a null value in the WORKDEPT column

Which of the following is a reason for using databases to store data INSTEAD of themany 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’swidely available to applications.D. Databases allow multiple users to handle and change the data withoutlosing data and its consistency.

Which of the following best describes the benefits of supporting XQuery’sTRANSFORM expression in DB2:It can be used to modify both XML and relational data, providing a

Page 22: DB2...

common language for developers to handle the database dataWhen used in a UPDATE statement, it simplifies the update of XML documentsstored in the database.It is very useful to transform XML documents into other formats usingstylesheets.It can be used to automatically clean up unnecessary tags in a XML document,providing smaller documents thus saving space in the database.

Which of the following is true about the Information Model?A. Provides the specification of objects in a detailed level.B. Describes objects but not the relationships between them.C. Provides the details to implement objects in databases.D. Provides a conceptual/abstract model for designers

Consider the following scenario. We have a table, table_1, which has only one columnstoring an integer value. The following statements are executed successfully in theorder shown:CREATE SEQUENCE my_seq START WITH 1 INCREMENT BY 1 CACHE 5INSERT 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 wasissued:INSERT INTO table_1 VALUES (NEXT VALUE FOR my_seq);SELECT * FROM table_1What value will be the last value returned by the query?A. 1B. 2C. 3D. 6

Using DB2 CLP, which of the following commands would successfully executeprocedure PROC1?>A. CALL proc1(1, DEFAULT)B. CALL proc1(1, ?)C. CALL proc1(1)D. None of the above

Which of the following is false?A. Structured Query Language is the standard language for manipulating datain a Relational Database Management System.

Page 23: DB2...

B. A DBMS is a software system that manages databases.C. The Hierarchical data model organizes data in tables with columns androws.D. DB2 is a Database Management System

Which of the following tools can be used to develop stored procedures?A. DB2 CLPB. DB2 Command EditorC. IBM Data StudioD. All of the above

Which of the following options can be used to check the minimum point in time (PIT) fora table space restore?A. LIST TABLESPACES SHOW ALLB. RESTORE DATABASE SAMPLE TABLESPACE (MYTBSP) FROM /tbspbkpC. RESTORE DATABASE SAMPLE TABLESPACE (MYTBSP) ONLINE FROM/tbspbkpD. GET SNAPSHOT FOR TABLESPACE ON <database>

Which of the following is NOT a DML statement?A. ALTERB. INSERTC. SELECTD. UPDATE

While connected to the SAMPLE database, which of the following statements revokeaccess to the SAMPLE database from user TOM ?A. REVOKE CONNECT ON sample FROM USER tomB. REVOKE ACCESS FROM USER tom ON DATABASEC. REVOKE ACCESS FROM USER tom ON sampleD. REVOKE CONNECT ON DATABASE FROM USER tom

When does 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 processWhen creating a DB2 database, which of the following table

When creating a DB2 database, which of the following table spaces is NOT

Page 24: DB2...

automatically created?A. User temporary table spaceB. User table spaceC. Catalog table spaceD. System temporary table space

Which of the following best describes the advantages of executing a set of DMLstatements inside a single transaction?A. The DBMS records those operations in the audit logs since they aregrouped inside a transaction.B. The DBMS stores the transaction operations so that the client applicationscan rerun the transaction more easily.C. The DBMS guarantees that either all changes performed by the DML arestored, or in case of error, the changes are undone, leaving the database ina consistent state.D. The DBMS guarantees that all operations are always executed successfully.

Which of the following statements is FALSE about transactions?A. Operations inside a transaction are executed in parallel.B. Only 1 COMMIT statement can be executed inside the sametransaction.C. Transactions guarantee atomicity of a group of operations.D. A ROLLBACK or COMMIT statement finalizes a transaction.

In embedded SQL, which of the following is an example of how to establish aconnection to the SAMPLE database in DB2?A. EXEC CONNECT TO SAMPLEB. DB2 CONNECT TO DB SAMPLEC. EXEC SQL CONNECT TO SAMPLED. EXEC DB2 CONNECT TO DATABASE SAMPLE

Which of the following is not a XQuery function?A. db2-fn:xmlcolumnB. db2-fn:sqlqueryC. db2-fn:xmlrecordD. None of the above

In DB2 9.7, which of the following functions can be used to create tables from XMLdocuments?a. TABLEXMLb. XMLTABLEC. XML2RELATIONAL

Page 25: DB2...

Which of the following does not include the GUI administration tools?A. DB2 Enterprise EditionB. DB2 Express-C EditionC. IBM Data Server ClientD. IBM Data Server Runtime Client

Which of the following statements is true about pureXML technology?A. With pureXML technology there is a part of the DB2 engine thatcan natively handle XQuery.B. In pureXML, a query can combine SQL with XML constructs;therefore integrating relational and hierarchical data in one queryC. In pureXML, the format in which XML data is processed is thesame as the format in which it is stored, that is, there is noconversion required..D. All of the above.

Which of the following is false about keys in the relational model?A. Foreign keys are used to identify foreign columns and rows in arelationship.B. Primary keys uniquely identify each tuple of the relation.C. Primary keys are defined by a subset of attributes of arelation.D. A relation can have multiple foreign keys.

Considering the SQL statement below, which option best describes what ABS

is:

UPDATE tb1 SET col1 = ABS(col2)

A. Stored Procedure

B. Built-in function

C. Trigger

D. User Defined Type

If secondary log files are to be allocated until the unit of work commits or

storage is exhausted, which type of logging is used?

Page 26: DB2...

A. Infinite logging

B. Archival logging

C. Circular logging

D. It cannot be done in DB2

Which Data Model was created with the focus of providing better data

independence?

A. Relational

B. Hierarchical

C. Semi-structured

Which of the following statements is TRUE?

A. The owner of a table does not automatically receive CONTROL

privilege for that table.

B. The owner of a table automatically receives CONTROL privilege,

but does not automatically receive all other table privileges

available for that table.

C. If the CONTROL privilege is revoked from the table owner, all

other privileges that were automatically granted to the owner

when the table was created are automatically revoked.

D. If the CONTROL privilege is revoked from the table owner, all

other privileges that were automatically granted to the owner when

the table was created need to be explicitly revoked.

Which of the following privileges permits a user to update the commentassociated with a table?

Page 27: DB2...

A. CONTROLB. ALTERC. CREATEIND. REFERENCES

Two tables are created by the following statement:

Which option correctly describes the change on the two tables after thestatement below is executed?DELETE FROM color WHERE c_id = 2A. Only rows in table COLOR will be affected.B. Rows in both color and object with c_id = 2 will be deleted.C. Only rows in table OBJECT will be affected.D. No row will be deleted.

Which of the following XML fragments correctly indicates the result of the given

statement below:

values (XMLELEMENT (name "Name",

XMLNAMESPACES( DEFAULT 'http://sample.default.nspace.com'),

XMLATTRIBUTES ('MALE' as "Gender"),

XMLCONCAT(

XMLELEMENT (name "FirstName", 'Amitabh'),

XMLELEMENT (name "LastName", 'Patel'))))

A. <Name xmlns="http://sample.default.nspace.com"

Gender="MALE">

<FirstName>Amitabh</FirstName>

<LastName>Patel</LastName>

Page 28: DB2...

</Name>

B. <Name xmlns="http://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

Which of the following is true about Static SQL?

A. It takes advantage of the table statistics at runtime.

B. The structure 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.

Consider table TB1 defined as below:

Considering the following statements are successfully executed in CLP with autocommit

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’)

Page 29: DB2...

ROLLBACK

A. 0

B. 1

C. 2

D. 3

Given the following two tables:

Assuming the following results are desired:

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

Given the following table definition:

Which of the following SQL statements will remove all sales that occurred in 1995?

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

Which of the following events will NOT cause a trigger to be activated?

A. SELECT

B. DELETE

Page 30: DB2...

C. INSERT

D. UPDATE

Given the following table:

What names would be displayed as the result of the following SQL query

SELECT name FROM GUESTS WHERE name LIKE '%o_'

A. Oliver, Rodney, Tom, Vincenzo

B. Rodney, Tom

C. Tom

D. Oliver, Rodney, Tom

The authentication method in a DB2 server is defined within:

A. The database configuration

B. The database manager configuration

C. The DB2 registry

D. The system’s catalog

Which of the following tools would you use if you need to execute SQL statements

against a DB2 database from the command line?

A. DB2 Health Center

B. DB2 Control Center

C. DB2 Command Line Advisor

D. DB2 Command Line Processor

If circular logging is used, the following types of backup are allowed:

Page 31: DB2...

A. Online full backup

B. Offline full backup

C. Online incremental backup

D. Offline incremental backup

commands will terminate your connection?

A. db2 terminate

B. db2 connect end

C. db2 connect kill

D. db2 connect finalize

Given the following create table statement:

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