Sunteți pe pagina 1din 9

IBM DB2 MOCK TEST PAPER-1 1. What entities are 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 Ans: b 2. Which a. b. c. d. Ans: 3. Which a. b. c. d. Ans: 4. Which a. b. c. d. amongst the following is NOT a valid user in db2 9.7 for linux?? db2inst1 db2fenc1 db2usr1 dasusr1 statement is TRUE about Relational Databases? A column can store values of different data types. A table consists of columns and rows. Rows In the same table can have a different set of columns. Rows are also known as fields of the table. tool can NOT help in performing Cataloging of the databases? Configuration Assistant Command Line Processor Control Center Data Studio

5. Which tablespace is NOT found alongwith a database while creating it?

a. User table space

b. User temporary table space c. System Catlaog table space d. System temporary table space Ans: 6. Which a. b. c. d. ANs: c 7. Given the following table definition: SALES -------------------------SALES_DATE DATE SALES_PERSON CHAR(20) REGION CHAR(20) amongst the following describes the feature 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

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 Ans: b 8. What 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. Why to define a DB2 Access Plan? a. SQL developers can define Access Plans to tell DB2 the best way to retrieve the 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 their execution. Ans: a 10. Which tool should be used to configure automatic database backup? A. Configure Automatic Maintenance wizard B. Design Advisor C. Explain tool D. EXPORT utility Ans: a 11. 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. DELETE users Ans: c 12. What do you understand by authorization? a. Authorization is a process that checks whether you have sufficient privileges to perform the desired database operation. b. Authorization is the process where the DBA gathers information to see who will have access to the database. c. Authorization is the process where the DB2 database checks with Windows security 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 by verifying your user ID and password. Ans: a

Ans: 9.

13. Where do the log files of a database reside on the system? A. DB2LOGS B. SQLLIB C. SQLOGDIR D. DB2LOGDIR 14. How to describe a transaction for a database? 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. ANs: a 15. Which of the a. b. c. d. Ans: a following is FALSE about columns? Each column consists of one or more fields Each column contains a specific type of information Columns must be designated a specific data type Columns are also known as fields

16. What describes the Trusted Context in DB2? a. It is a special area in a buffer pool that can be written only by a selected set of users. b. It is a DB2 capability that allows applications 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 user name or password. d. It is a type of container in a table space that allows faster I/O operations. 17. What is SQL/XML? a. SQL/XML is a communication protocol for DB2 databases. b. SQL/XML is part of the XQuery standard and provides various publishing functions to transform XML data into relational form and vice versa. c. SQL/XML is a language that provides various publishing functions to transform XML data into relational form and vice versa. d. SQL/XML is an extension to SQL standard and provides various publishing functions to transform XML data into relational form and vice versa. 18. What is the authority level for users administering database manager of an instance? a. SYSADM b. DBADM c. SYSCTRL d. SYSMAINT 19. Which XML-based language must be used for transforming XML documents? a. XHTML b. XSLT c. XAML d. XSD 20. A Buffer Pool is associated with Table Spaces so that they can increase performance by caching

data in memory. Which amongst the following should be TRUE ? a. A table pagesize. b. A table or same page size. c. A table same pagesize. d. A table page size. space can only be associated with a buffer pool that has the same space can only be associated with a buffer pool that has a smaller space can only be associated with a buffer pool that has a larger or space can only be associated with a buffer pool that has a larger

21. What parameter has to be changed to take an incremental backup? a. b. c. d. LOGARCHMETH1 TRACKMOD TRAKMOD LOGARCHMETH2

22. 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 23. Which of the following statements is FALSE regarding Buffer Pools? a. b. c. d. Buffer Pools work as a cache, storing data that is read from table spaces. Pages in a Buffer Pool can be 4k, 8k, 16k and 32k in size. A database can only have one Buffer Pool. The size of a Buffer Pool can be automatically resized by STMM.

24. 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. Infinite Logging. c. Archival Logging d. It Cant be done in DB2.

25. In which isolation a. b. c. d. 26. Which a. b. c. d. Ans: c

level we can NOT have Non-Repeatable issue? Cursor Stability Read Stability Uncommitted Read Currently Committed

of the following is a better way to Store and Manage Data ? Storing data in Text Files Storing data in Spreadsheets Storing data in Databases Storing data in Comma Separated Values files

27. What is the major advantage of using a Database for storing and managing data? a. Databases cost less b. Databases are supported by various Operating Systems c. Easy to implement d. Provides easy access and manipulation of data while keeping data integrity and data consistency Ans:d 28. Which a. b. c. d. Ans: d 29. Which a. b. c. d. Ans: a of the following is NOT a valid data model? Information model Network model Relational model File model of the following data models provides better Data Independence? Relational Object-Oriented Network Semantic

30. The following is the accurate definition of Domain. a. It is composed of columns and rows b. It is composed by a name and data type c. It is a set of attribute values d. It is the set of all possible values that data can assume ANS:d 31. From the following, choose 2 correct properties of a Primary Key. a. PK column can hold NULL values b. PK column cannot hold duplicate values c. PK column can hold atmost one NULL value d. PK column cannot hold null values at all. ANs: a &b 32. 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 33. Which a. b. c. d. Ans: b of the following editions comes no charge and is freely available for download? Express Edition Express C Edition Enterprise Edition Everyplace from the following options that is a valid set of DML Statements? SELECT, INSERT, ALTER, DELETE INSERT, UPDATE, DROP,SELECT ALTER, CREATE, SELECT, INSERT SELECT, UPDATE, INSERT, DELETE

34. Choose a. b. c. d. Ans: d

35. 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 pool page size. d. Buffer pools once created cannot be dropped. 36. 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. Ans: a 37. Which a. b. c. d. Ans: b 38. In which of the configuration files the AUTHENTICATION parameter can be found? a. Database Configuration b. Response file c. Database Manager Configuration d. Registry Configuration file Ans: c 39. From which of the following tools , a Stored Procedure can be developed/written? a. CLP b. Command Editor c. IBM Data Studio d. All of the above Ans: d of the following is NOT a feature of HADR ? HADR provides replication of data from one server to the other. This feature/add on comes free with DB2 Express-C edition. It provides recovery in case of disaster occurs. To implement HADR, two servers are needed, one as Primary DB Server and the other as Secondary DB server.

40. Which of the following tablespaces are created by default when a new DB is created in DB2? Choose all that apply (more than 1) a. SYSCATSPACE b. USERSPACE1 c. IBMDB2 d. TEMPSPACE1 Ans: a,b,d 41. One of Client? a. b. c. d. the following DB2 Client softwares does not have GUI tools. Which is that particular IBM Data Server Client IBM Data Server Runtime Client IBM Client for z/os IBM Data capacity client

42. User TOM connects to the database SAMPLE. He then creates a table STUDENT with 5 columns. What will be the SCHEMA of the STUDENT table? a. DB2 b. ADMINISTRATOR c. SAMPLE d. TOM Ans: SAMPLE 43. ALTER a. b. c. d. Ans: c command CANNOT be used to perform the following task: Adding a new column to an existing Table definition Changing the data type of a column Changing the value of data in a column Adding a comment to a table

44. Given the following commands and condition: A. User1 connects to database SAMPLE B. create table TEST (id int) C. Create sequence myseq start with 6 increment by 6 cache 5 D. Insert into TEST values(next value for myseq) E. Insert into TEST values (next value for myseq) USER 1 Disconnects from the database SAMPLE User1 again connects to database sample Insert into TEST values (next value for myseq) Select * from TEST What will be the last value into the table TEST a. 6 b. 12 c. 36 d. 72 45. Which a. b. c. of the following type of TRIGGER can be made on a view? Instead of After Trigger Before Trigger

d. Execute trigger Ans: b 46. Which a. b. c. d. Command if issued, will disconnect ALL the Applications/users from the database force applications all connect reset Disconnect Deactivate all

47. Consider the Following statements: (AUTO COMMIT is off) connect to sample create table Student(stud_id char(3), name varchar(30)) commit insert into student values(A01,TOM) insert into student values(B01,JOHN) commit insert into student values(C01,MARY) ->rollback insert into student values(D01,STEVEN) ->commit What is the output when the command is issued: SELECT COUNT(*) FROM STUDENT. a. 2 b. 3 c. 5 d. 6 Ans: b 3 48. Which of the follwing ISOLATION levels in DB2 9.7 allows a user/application to read committed or uncommitted data ? a. Repeatable read b. Read stability c. Currently Commited d. Uncommited read Ans: d 49. The default isolation level in DB2 9.5 and DB2 9.7 respectively are: a. Uncommited Read, Currently Commited b. Cursor Stablilty, Currently Commited c. Currently Commited, Cursor Stabilty d. Read Stability, Cursor Stability Ans: b 50. Choose a. b. c. d. ANs: a among the following, the correct syntax of granting the Alter privilege to user John. Grant Alter on employee to user John Grant Alter to employee to user John Grant Alter on table employee to user John Grant Alter on employee to John

51. What is the Default number of PRIMARY log files allocated for a sample database?

a. b. c. d.

1 2 3 4

52. An organization wants to create a backup plan for defining backup policies, deciding on the type of backup to be taken etc. Which type of logging should be used by this organization if it wants to have the facility of ROLLFORWARD recovery and the facility of taking ONLINE backups? a. Archival b. Circular c. Incremental-Delta d. Decremental 53. Which query language is used to retrieve and manipulate XML data in the database? a. SQL b. T-SQL c. XQUERY d. SQL & XQUERY Ans c 54. How will you write a SQL command to connect to the SAMPLE database in building Embedded SQL Application? a. Connect to sample b. EXEC connect to sample c. EXEC SQL connect to sample d. BIND sample

S-ar putea să vă placă și