+ All Categories

Mock_V1

Date post: 29-Aug-2014
Category:
Upload: konda-raveendrakumar
View: 124 times
Download: 0 times
Share this document with a friend
Popular Tags:
25
1. Assume a table which contains the following columns Emp_id,Emop_name,Phone,Email,Salary Which of the following is the simplest way to restrict user from viewing salary information While still allowing them to see the other values? A.encrypt the tables data B.create a view that does not contain the salary column. Grant access to the view and revoke access from the original table. C.revoke select access from the original table from the salary column from users who should not see salary data D.store salary data in a separate table and grant select privilege for that table to the appropriate users --------------------------------------------------------------------- ------------------------------------------------------------------ 2.Which of the following is not a tool that comes with db2 A.db2 command window B.db2 command line processor C.db2 script editor D.db2 first steps --------------------------------------------------------------------- ------------------------------------------------------------------ 3.Which of the following options will perform an offline table space recovery? A.restore database sample(my tbsp) offline from/tbspbkp B.restore database sample tablesapce(mytbsp)from/tbspbkp C.restore database sample tablespace(mytbsp) online from/tbspkp
Transcript
Page 1: Mock_V1

1. Assume a table which contains the following columns

Emp_id,Emop_name,Phone,Email,Salary

Which of the following is the simplest way to restrict user from viewing salary information

While still allowing them to see the other values?

A.encrypt the tables data

B.create a view that does not contain the salary column. Grant access to the view and revoke access from the original table.

C.revoke select access from the original table from the salary column from users who should not see salary data

D.store salary data in a separate table and grant select privilege for that table to the appropriate users

---------------------------------------------------------------------------------------------------------------------------------------

2.Which of the following is not a tool that comes with db2

A.db2 command window

B.db2 command line processor

C.db2 script editor

D.db2 first steps

---------------------------------------------------------------------------------------------------------------------------------------

3.Which of the following options will perform an offline table space recovery?

A.restore database sample(my tbsp) offline from/tbspbkp

B.restore database sample tablesapce(mytbsp)from/tbspbkp

C.restore database sample tablespace(mytbsp) online from/tbspkp

D.there is no option to restore a table space in db2

---------------------------------------------------------------------------------------------------------------------------------------

4.Which of the following is false about views

A.do not contain real data

B.can be used interchanging with tables when retrieving data

C.when changes are made to data through a view,the data is changed in the underlying table

D.any view can be updated,independent of its definition.

5. Given the following table definition

Page 2: Mock_V1

Sales

Sales_date date

Sales_person char(20)

a)delete * from sales where year(sales_date)=1995

b)drop from sales where year(sales_date)=1995

c)drop * from sales where year(sale_date)=1995

d)delete from sales where year(sales_date)=1995

---------------------------------------------------------------------------------------------------------------------------------------

6.which of the following db2 client/driver packages is not suitable for developing odbc application

a)Ibm data server client

b)ibm data server for odbc & cli

c)Ibm data server runtime client

d)ibm data server driver package

---------------------------------------------------------------------------------------------------------------------------------------

7.which of the following statement is false

a)primary key uniquely identifies a row in a table

b)foreign key is asset of column that refers to a primary key of another table

c)a primary key must always be defined in a table

d)primary keys and foreign key are used to enforce data integrity

---------------------------------------------------------------------------------------------------------------------------------------

8.Given the following two tables:

Names

Student _name Student_number

Wayne gretzky 99

Jaromirjagr 68

Bobby orr 4

Brett hull 23

Mario Lemieux 66

Marks(table)

Page 3: Mock_V1

Name Marks

Wayne gretzky 80

Bobby orr 94

Brett hull 77

Mario Lemieux 83

How many rows would be returned using the following statement?

Select distinct student_name from names,marks

a)5

b)20

c)9

d)6

---------------------------------------------------------------------------------------------------------------------------------------

9.Given the following update statement

Update employees set workdept=(select deptno from department)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 will not 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 succed if table dept has only one row

d)the statement will only succed if every record in the employees table has a null value in the workdept column

---------------------------------------------------------------------------------------------------------------------------------------

10. Given the following create table statement

Create table student_marks

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

---------------------------------------------------------------------------------------------------------------------------------------

Page 4: Mock_V1

11.Which of the following best describes the benifit of supporting xquerys 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

c)it is very useful to transform xml documents into other formats using style sheets

d)it can be used to automatically clean up unnecessary tags in a xml documents,providing smaller documents thus saving space in the database

12.Consider the following scenario. You have 3 tables with the same name(TABLE_1)under 3 different schemas( SYSIBM,DEFAULT AND DB2INSTL).You are cancelled to a db2 database in your linux server as default and issue the following statement.

Select * from table_1

Which table will you be selected data from.

a)you get an error because your query is ambious,as the table schema is not specified.

b)db2 inst1.table_1

c)default _table_1

d)sysibm_table_1

---------------------------------------------------------------------------------------------------------------------------------------

13.When using a relational database which of the following is false?

a)retrieve data using sql’s data manipulation language(dml)

b)define the datbase structure using sql’s ddl

c)store the data in class instance and fields

d)use normalisation to avoid redundant data in your tables.

---------------------------------------------------------------------------------------------------------------------------------------

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

---------------------------------------------------------------------------------------------------------------------------------------

15. A company has a large amount of data to store and wants to be able to do the following the data.

Page 5: Mock_V1

Have a stands interface for acccessing the data.

Have multiple users with the abilty to insert,update and delete data.

Have changes to the data without risk of losing data and its consistancy.

Have the capabilty to handle huge amounts of volume of data and users.

Have tools for data backup,restore and recovery

what data storage method is the must optimal solution for the company??

a)text files

b)database

c)spread sheets

d)comma delimited dat files

---------------------------------------------------------------------------------------------------------------------------------------

16.col_1 col_2

A 10

B 12

C 14

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

Page 6: Mock_V1

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

---------------------------------------------------------------------------------------------------------------------------------------

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

---------------------------------------------------------------------------------------------------------------------------------------

18.What functionality does automatic storage provide?

a. automatic storage simplifies storage management by allowing you to specify storage paths where the database management can place tables space data

b . automatic storage is an option that allows transactions that are eritten to do database to be automatically comitted

c. automatic storage is a function of database that allows tables to be backedup automatically on a set schedule

d. auto storage can be used to automatically reorganize the data as a physical media is order to improve performance

---------------------------------------------------------------------------------------------------------------------------------------

19. What is sql/xml ?

a. Sql /xml is a communication protocol of db2 database.

b. Sql/xml is a part of the xquery standard and provide various publishing functions to transform xml data into relational form and viceversa.

c. Sql/xml is naother name for pure xml technology.

d. Sql/xml is an extension to sql standard and provide various functions to transform xml data into relational form and viceversa.

--------------------------------------------------------------------------------------------------------------------------------------

20.Which of the following is created automatically when a db2 database is created?

a. Temp space1 table space

b. Sys cat space table space

Page 7: Mock_V1

c. IBMDEFAULT buffer pool

d. All the above

---------------------------------------------------------------------------------------------------------------------------------------

21.Which of the following is true about the information model?

a. Provides the specific of objects in a detailed level

b. Describes objects but not relationships between them

c. Provides the details to implement objects in database

d. Provides conceptual abstract in database

---------------------------------------------------------------------------------------------------------------------------------------

22.which data model was created with the focus of providing better data independence?

a. Relational

b. Hierarchical

c. Semi structured

d. Entity relationship

---------------------------------------------------------------------------------------------------------------------------------------

23.Buffer pools

a. A table space can only be associated with a buffer pools 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 a associated with buffer pool that has larger or same page size

d. A table space can only be associated with a buffer that has a larger size

24.What are the advantages of using stored procedures?

a. Reduce network traffic

b. Centralize the location where code is stored and changed

c. Enforcement of business rules

d. All the abosssve

---------------------------------------------------------------------------------------------------------------------------------------

25.Consider a table tab1 having the following value

Page 8: Mock_V1

Col1 col2

A 10

B 20

c 30

d 40

a. Delete from tab1 Insert into tab1 values(‘c’ 40) Insert into values(‘d’ 40)

b. Update tab1 set col1null where col2in (10,20)

c. Delete from tab1 where col2 not in (30,40)

d. Delete from tab1 where col2 in (30,40)

---------------------------------------------------------------------------------------------------------------------------------------

26.Create table color cascade

a. 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 rows will be deleted

---------------------------------------------------------------------------------------------------------------------------------------

27.Which of the following stores db2 configuration information?

a. Dbmcfg

b. Dbcfg

c. Db2 profile registey

d. All the above

---------------------------------------------------------------------------------------------------------------------------------------

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

a. Infinite logging

b. Archival logging

c. Circular logging

d. It can not be done in db2

---------------------------------------------------------------------------------------------------------------------------------------29.Which of the following is not a x-query function?

Page 9: Mock_V1

a. Db2 –fn:xml column

b. Db2-fn:sql query

c. Db2-fn:xml record

d. None of the above

---------------------------------------------------------------------------------------------------------------------------------------

30.which of the following privileges permits a user to create objects with in a schema?

a. Control

b. Alter

c. References

d. Createin

---------------------------------------------------------------------------------------------------------------------------------------

31. The authentication method in a db2 server is defined with in

a. The data base configuration

b. The database manager configuration

c. The db2 registry

d. The systems catalog

---------------------------------------------------------------------------------------------------------------------------------------

32. Which of the following is false about keys in the relation model

a. Foreign keys are used to identify foreign columns

b. Primary keys unique identify each tuple of the relation

c. Primary keys are defined by a subset of attributes of a relation

d. A relation can have multiple foreign keys

---------------------------------------------------------------------------------------------------------------------------------------

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

a. Control

b. Alter

c. Createin

d. References

---------------------------------------------------------------------------------------------------------------------------------------

Page 10: Mock_V1

34.Which of the following statements is true about pure xml technology?

a. With pure xml technology there is a part of the db2 engine that can natively handle xquery

b. In pure xml,a query can combine sql with xml constructs;therefore integrating relational and hierarchical data in one query

c. In pure xml,the format in which xml data is processed is the same as the format in which it is stored, that is, there is no conversion required

d. All the above

---------------------------------------------------------------------------------------------------------------------------------------

35.Which of the following best describe the advantages of executing the set of dml statements inside a single transactions

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

b. The dbms stores the transaction operation so that the client applications can return the transaction easily

c. The dbms guarantees that either all changes performed by the dml are stored or in case of errors,the changes are undone leaving the database in a consistant state

d. The dbms guarantees that all operations are always executed successfully

--------------------------------------------------------------------------------------------------------------------------------------

36.Which is false regarding buffer pool

A. a database can only have one buffer pool

B. pagesin buffer pool can be 4k,8k,16k and 32k in size

C .buffer pool work as cache,storing data that is read from table

D. IBMDEFAULT buffer pool is the default buffer pool automatically created when a database is created

---------------------------------------------------------------------------------------------------------------------------------------

37.BUFFER POOL are associated with table space so that they can increase performance by cashing data in memory,which is from

A. A tablespace can only be associated with a buffer pool that has same page size

B. A tablespace can only be associated with a buffer pool that has a smaller or same page size

C. A tablespace can only be associated with a buffer pool that has larger or same page size

D. A tablespace can only be associated with a buffer pool that has larger page size

---------------------------------------------------------------------------------------------------------------------------------------

Page 11: Mock_V1

38.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#

D. all the above

---------------------------------------------------------------------------------------------------------------------------------------

39.which is not DML statement?

A. alter

B. insert

C. select

D. update

---------------------------------------------------------------------------------------------------------------------------------------

40.which is false about relational database?

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 piece of information for a record

D. foreign key are an attribute in one relation whose values match primary key of another relation

--------------------------------------------------------------------------------------------------------------------------------------

41.GUESTS

Name age

Jenny 34

Rodney 36

Oliver 21

Angie 42

Tom 28

Vinlenzo 25

What names would be displayed as the results of the following

SQL Query

Page 12: Mock_V1

Select name from guests where name like ‘%0_’

a. Oliver.

b. Vinlenzo

c. Tom

d. Rodney

---------------------------------------------------------------------------------------------------------------------------------------

42. DB2 server is defined within

A. database configuration

B. database managed configuration

C. DB2 registery

D.systems catalog

43. false about keys in relational model

A. foreign keys are used to identify foreign columns and rows in a relationship

B. primary keys uniquely identify each tuple of the relation

C. primary keys are defined by a subset of attribute of a relation

D. a relation can have multiple foreign keys\

44. Which of hte following is true?

A)Embedded SQL can only be static

B)Static sql is normally faster than dynamic SQL

C)TDBC and ODBC use static SQL

D)SQLJ is embedded dynamic SQL in java

-------------------------------------------------------------------------------------------------------

45)Which of the following is true about DB2 instances?

A)Instances are related between eachother through the dbmcfg

B)If instance A crashes, no other instance running in the system will work either

C) If instance A is down , databases in the instance are inaccessible

D) Within instance you can only create one and only are database

Page 13: Mock_V1

--------------------------------------------------------------------------------------------------------

46) Which of the following is true about IBM datastudio?

A) Datastudio is installed automaticaly when DB2 is installed

B)Datastudio can be use to develop ttriggers when the CREATE TRIGGER statement is executed as a script

C) Datastudio stand-alone package is free, while the IDF package is chargable

D)Datastudio, regardless the package supports shell-sharing.

--------------------------------------------------------------------------------------------------------

47)Which of the following statements is false?

A) Attributes in the relational model map to rows in a relational database

B)In an ERD, an entity is represented with a rectangle

C) ONE -To-ONE and many - to- many are relationships you can represent in a ERD

D) Entities in the relational model map to tabels in a relational database

-------------------------------------------------------------------------------------------------------

48)Which of the following best describes the incremental backup functionality?

A)BACKUP ALL OF THE DATA THAT HAS CHANGED SINCE THE LAST SUCCESSFUL OR DELTA 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

-------------------------------------------------------------------------------------------------------

49)Which of the following types of logs contain committed and externalized data?

A)Online active logs

B)Offline active logs

C)Passive logs

D)Active logs

--------------------------------------------------------------------------------------------------------

50) Which of the following is false about the DB2 environment?

A) A TCP IP port uniquely identifies a DB2 instance

Page 14: Mock_V1

B) There can be more more than 1 instance running at a given time

C)There is a conflict if you attempt to create a database in instance B with a database name that has already been used in instance A

D)There is a conflict if you attempt to create atable space in database A with a table space name that has already been used in the same database.

--------------------------------------------------------------------------------------------------------

51)Which of the following should you inspect when you encounter a problem with DB2?

A)The db2diag.log file

B)The DB2 information center

C)The administration center

C)The administration notification log

D) Above all

-------------------------------------------------------------------------------------------------------

52)Which of the following is the ideal version of DB2 for a small ; startup company will no budget to invest in software?

A) DB2 Exprees-C

B) DB2 express

C) Db2 Enterprise

D) DB2 Workgroup

--------------------------------------------------------------------------------------------------------

53) Which of the following is not a valid DB2 client

A) IBM data server client

B)IBM dataserver runtime client

C) DB2 Runtime Client merge moduled for windows

D) IBM dataserver Thin client

--------------------------------------------------------------------------------------------------------

54)Which of the following is false about the DB2 editors , clients and drivers?

A) All DB2 clients and drivers are available at no cost

B)DB2 express Edition is the only server edition available at no cost

C)DB2 Server include DB2 client components

Page 15: Mock_V1

D) A system running DB2 workgroup can be used to connect to a database in a system running DB2 express using the clp

--------------------------------------------------------------------------------------------------------

55) Identify the option with entities that can be used in ERD

A) Product, color, Height

B) Yellow,Big,Long

C)John,dog,airplane

D)Person,Animal,plant

-------------------------------------------------------------------------------------------------------

56) Which of the following is true about database logging?

A) Dtabase logging can be turned off completely at the database level

B) primary logs are allocated on demand when needed

C)Archive logging must be enabled to recover from situations where human errors introduced incorrect data into the datbase

D) Circular logging is more appropriate in product environment

--------------------------------------------------------------------------------------------------------

57)Which of the following is true about a well-formed XML document?

A)Has one or more root element

B)tags can have atmost one attribute

C)attributr values must be enclosed in double quotes

D) End tags are optional

--------------------------------------------------------------------------------------------------------

58)Which of the following are entities that should use a one-to-many relationship in an ERD?

A) person,car

B)Company,Employee

C)Grand father, john

D)mother,child

--------------------------------------------------------------------------------------------------------

59) Given the following table

Page 16: Mock_V1

COL1 COL2

========= ============

A 10

B 20

C 30

A 10

D 40

C 30

Assuming that the following results are desired

TAB1

-----

COL1 COL2

======= ========

A 10

B 20

C 30

D 40

Which of the following statements will produce the desired results?

A) SELECT UNIQUE * FROM TAB1

B) SELECT DISTINCT * FROM TAB1

C) SELECT UNIQUE(*) FROM TAB1

d) SELECT DISTINCT(*) FROM TAB1

--------------------------------------------------------------------------------------------------------

60)wHICH OF THE FOLLOWING IS not a type of recoverys?

A) Version-restart recovery

B) Auto-restart recovery

C) crash recovery

Page 17: Mock_V1

D) Roll-forward recovery

--------------------------------------------------------------------------------------------------------

61)In embedded SQL code, which of the following is true about delimeters?

A) Used byt the os to delimit system variable declaration

B) Used by the database to indicate the endof a column

C) used by compiler to indicate the end of the program

D) Used by PRE compiler to identify SQL statements to be translated

--------------------------------------------------------------------------------------------------------

62)What functionality does a automatic storage provide?

A) Automatic Storage simplifies management by allowing you to specifies storage paths where the data base manager can place table space data

B) Automatic storage is an option that allows transactiond=s 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 automatically on a set schedule

D)Automatic Storage can be used to automatically re organnize the data on the physical media in order to improve the performance.

-------------------------------------------------------------------------------------------------------

Page 18: Mock_V1

Recommended