DB2A Mock Test-2

11
DB2 302A Mock Test 1. Which Model is used by Designer and Operator? a. Information Model b. Data Model c. i and ii Both d. None of the above ANSWER: a 2. Data Model is……..? a. Abstract management of object at Conceptual level. b. Independent of specific implementation and protocol. c. To Hide all protocol and implementation detail. d. Concrete or Detailed model for implementers. 3. Which Data Model provide better DATA INDEPENDANCY? a. Network Model. b. Hierarchical Model. c. Relational Data Model. d. Object Oriented Model 4. What is used to define overall logical structure of Database. a. Relation Schema. b. Relation Instance. c. None of the above.

description

db2

Transcript of DB2A Mock Test-2

Page 1: DB2A Mock Test-2

DB2 302A Mock Test

1. Which Model is used by Designer and Operator?

a. Information Model

b. Data Model

c. i and ii Both

d. None of the above

ANSWER: a

2. Data Model is……..?

a. Abstract management of object at Conceptual level.

b. Independent of specific implementation and protocol.

c. To Hide all protocol and implementation detail.

d. Concrete or Detailed model for implementers.

3. Which Data Model provide better DATA INDEPENDANCY?

a. Network Model.

b. Hierarchical Model.

c. Relational Data Model.

d. Object Oriented Model

4. What is used to define overall logical structure of Database.

a. Relation Schema.

b. Relation Instance.

c. None of the above.

5. A Table has primary Key on column Emp_Id, what will be the Constraint for this column ….?

a. Redundant values.

b. null.

c. Unique.

d. Unique and Not Null.

6. Which key is to be used in child table for Taking the reference of a Parent Table column ?

a. Primary Key.

Page 2: DB2A Mock Test-2

b. Unique key

c. Foreign Key.

d. Candidate key.

7. Why we perform Normalization on table?

a. To Remove the Redundancy.

b. To remove the insert, update and delete anomalies.

c. To reduce storage area.

d. All of the above.

8. Which Edition has maximum utilization of RAM is 2GB?

a. DB2 Enterprise Server Edition.

b. DB2 Express-C Edition.

c. DB2 Work Group Edition.

d. None of the above.

9. Which of the following products provides built in support for PUREXML.

a. DB2 Express Edition

b. DB2 Express-C Edition.

c. DB2 Work Group Edition.

d. DB2 Enterprise Edition.

10. Which of the following packages has the smallest footprint but is still suitable for executing JDBC applications?a. IBM Data Server Clientb. IBM Data Server Runtime Clientc. IBM Data Server Driver for JDBC and SQLJd. IBM Data Server Driver Package

11. Which Client and Driver does not have Graphical User Interface.

a. IBM Data Server Clientb. IBM Data Server Runtime Clientc. IBM Data Server Driver for JDBC and SQLJd. IBM Data Server Driver Package for ODBC and CLI.

12. Which instance is by default available in DB2 Windows.

a.DB2inst1b.DB2c.DB2dasusr1d. DB2fenc1

13. Can we have multiple instances on a single data server?

a. Can have multiple instances per data server.

Page 3: DB2A Mock Test-2

b. Only one instance is allowed per data server.c. There is no instance in db2.d. All above are correct.

14. What is default Port number for TCP/IP in case of DB2 Linux?

a.50000

b.50001

c.8080

d. None of the Above.

15. Which command is used to set the Instance?

a. db2 set instance=inst_name

b. db2 instance=inst_name

c. set db2instance=inst_name

d. set inst_name

16. In which type of Table storage management “Containers automatically created across the storage path ”.?

a. System Managed space.

b. Database managed Space.

c. Managed by automatic storage.

d. None of the above.

17. What is FASLE about Buffer Pool?

a. Real memory cache for table/index data.

b. Reduces direct sequential I/O.

c. At least one Buffer Pool required per Database.

d. No matching buffer pool required for table space based on page size.

18. To perform changes in Instance parameter which Configuration file has to be updated?

a. Database Manager configuration file.

b. Database Configuration file.

c. DB2 profile registry.

d. None of the above.

Page 4: DB2A Mock Test-2

19. A SQL script “script1.db2”is located at E:\script what is correct command to executed it ?

a. db2 exec E:\script1.db2 -z E:\script1.log

b. db2 –t –v –f script1.db2 -z script1.log

c. db2 –t –v –f E:\script\script1.db2 -z E:\script\script1.log

d. db2 exec E:\script\script1 log :\script\script1.log

20. You have to have the complete data can be in ASC,DEL,WSF and IXF format from Table

What do you use from following options?

a.Import

b.Export

c.Load

d.None of the above

21. Which of the following tablespaces are created by default when a new DB is created in DB2?

Can choose more than 1.

a) SYSCATSPACE b) USERSPACE1 c) IBMDB2tablespace d) TEMPSPACE1

22. Consider the following scenario: You are currently connected to a database calledMYDB as the user MYUSER. When creating a table within this database, you use thecommand:CREATE TABLE MYTABLE (DEPT CHAR(3) NOT NULL)Under which schema is the table MYTABLE created?a. MYDBb. MYUSERc. DB2INST1d. You get an error because your command is ambiguous, as the tableschema is not specified.

23. Consider a table TAB1 having the following values:TAB1-----------------COL1 COL2---- ----A 10B 20C 30A 10D 40C 20Consider the result of a given query:COL1----ABC

Page 5: DB2A Mock Test-2

DWhich of the following statements would produce the given query result:a. SELECT COL1 FROM TAB1 ORDER BY COL1 FETCH FIRST 4 ROWS ONLYb. SELECT COL1 FROM TAB1 FETCH FIRST 4 ROWS ONLYc. SELECT DISTINCT COL1 FROM TAB1d. SELECT UNIQUE COL1 FROM TAB1

24.- Consider TB1 has no rows initially and that the auto commit feature is disabled. Afterexecution of the following statements:INSERT INTO TB1 VALUES (1, ‘ABC’)INSERT INTO TB1 VALUES (2, ‘DEF’)COMMITINSERT INTO TB1 VALUES (3, ‘GHI’)ROLLBACKCOMMITHow many rows will be inserted in TB1?a. 0b. 1c. 2d. 3

25.- If the current session has an isolation level of CS, which of the following will changethe isolation level to UR for the current statement?a. SELECT * FROM sample ISOLATION URb. SELECT * FROM sample URc. SELECT * FROM sample USE URd. SELECT * FROM sample WITH UR

26.- Which of the following is NOT a valid authentication type that can be used by DB2?a. CLIENTb. CLIENT_ENCRYPTc. SERVERd. SERVER_ENCRYPT

27. Which one of the following is a valid XPATH expression to retrieve an attribute valuewithin an XML document?a. /customerinfo/name/cidb. /customerinfo/name/text(@cid)c. /customerinfo/name/data(@cid)d. /customerinfo/name/”cid”

28) In which of the configuration files the AUTHENTICATION parameter can be found?a) Database Configurationb) Response filec) Database Manager Configuration

d) Registry Configuraion file

Answer:c

29) From which of the following tools , a Stored Procedure can be developed/written?a) CLPb) Command Editorc) IBM Data Studiod) All of the above

30. Given the following table:USERS

Page 6: DB2A Mock Test-2

--------------------------ID INTEGER NOT NULLNAME CHAR(20) NOT NULLPASSWORD 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')

31. Which of the following statements can be used to increase the marks of all students in Science subject by 10%:

A) UPDATE student WHERE subject = ‘science’ SET marks = marks * 1.1B) 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'

32. Conider 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’)->commitWhat is the output when the command is issued:SELECT COUNT(*) FROM STUDENT.a) 2b) 3c) 5d) 6ANSWER: B

33. Alias is an alternative name to which of following objects? Mark all correct answers.a. Tableb. Viewc. Sequenced. Stored Procedure

34. Which of the following events will NOT cause a trigger to be activated?A) A select operationB) An insert operationC) An update operationD) A delete operation

35. Which of the following statements can remove a table from a database?A. DELETE

B. ALTER C. UPDATE

Page 7: DB2A Mock Test-2

D. DROP

36. 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 hand, should not.d) It can have one or more root element.

37. Which of the following is the correct syntax to revoke connect previlage on database sample from user bobA) revoke connect from user bobB) revoke connect on sample from user bobC) revoke connect for sample from user bobD) reboke connect on sample from bob user

38. Which keyword is used to select the records in a specific range?A) BetweenB) inC) intoD) list

39.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’,?)

40. Which CANNOT be used to restrict specific values from being inserted into a column in a particular table?A) IndexB) Check constraintC) Referential constraintD) Default constraint

41. Query: SELECT * FROM TABLE T1 INNER JOIN T2 ON T1.ID = T2.ID is equivalent to :

A) SELECT * FROM TABLE T1,TABLE T2 WHERE T1.ID = T2.IDB) SELECT * FROM TABLE T1 Left outer join TABLE T2 WHERE T1.ID =

T2.IDC) SELECT * FROM TABLE T1 full join TABLE T2 WHERE T1.ID = T2.IDD) SELECT * FROM TABLE T2 Right outer join TABLE T1 WHERE T1.ID =

T2.ID

42. which of the following command is used to reorganise the table?

A) reorganize table table_name B) reorganize table_name

Page 8: DB2A Mock Test-2

C) reorg table table_name D) reorg table_name

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

44. Which of following is False about schema?

A) We cannot create schema by issuing a command.

B) To avoid the name collision problem.

C) Is logical grouping of objects.

D) By default its creates schema name as same name as your authorization id.

45. Do changes made to a view reflect on table in db2?

A) True

B) False

C) none of the above