Вы находитесь на странице: 1из 19

1) Application B wants to read a subset of rows from table EMPLOYEE multiple times inside the same transaction.

Which isolation level should be used in order to guarantee that every time the same set of rows is returned? a) Currently committed. b) Read stability c) Repeatable Read d) Uncommitted Read 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) if TAB1 is created using the following statement CREATE table tab1 (col1 integer not null, col2 char(3) constraint cst1 check (col1 in (1,2,3,4))) Which of the following statements will successfully insert a record into table TAB1? insert into tab1 values(0,a) insert into tab1 values(null, abc) (4,a) (4,abcdefhijklmnopq) 4) When attempting to establish a connection to a database residing on your local machine, which command can help u determine why the following message was displayed. Sql1013N the database alias name or database name SAMPLE could not be found. SQLSTATE=42705 list database directory list admin node directory list node directory list dcs directory 5) Which of the following will give u the best performance to large amounts of data into a db2 table Import Load Fast import bulk insert 6) which of the following is not a supported type of trigger? After Before During Instead of 7) Best define transaction is? 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

8) consider the following cmds: create table space mytbsp1 managed by automatic what will the command result in? a) Creation of a normal table space called mytbsp1 that is managed automatically. b) Creation of a user table space called mytbsp1 that is managed automatically. c) Creation of a temporary table space called mytbsp1 that is managed automatically. d) This command will return an error to the user. 9) which data model was created with the focus of providing better data independence? Relational Hierarchical Semantic Network 10) 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. 11) How can an application modify the isolation level of operations running against a db2 database? Isolation level can be changed for a particular SQL statement. Isolation liven can only because changed for the whole user section and all operations in that section will be effected. Isolation level to be used can be specified by executing the commit operation. Isolation level is determined at the moment an application connects to the database. To change the isolation level, an application is required to create the new connection specifying desired level. 12) considering the SQL statement below, which option best describes what app.tax is select app.tax(salary) from employee user defined function stored procedure Trigger User defined type 13) which of the following programming languages can be user to develop UDFs? java, JavaScript, SQL C/C++, java, .NET languages SQL, C#, .nET , Perl Perl,C/C++, SQL

14) what is 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. 15) if circular logging is used, the following types of backup are allowed online full backup offline full backup online incremental backup offline incremental backup 16) which of the following is not true? Structured query language is the standard language for manipulating data in relational database management system Dbms act as an interface used to communicate with databases The hierarchal data model organizes data in tables with columns and rows. DB2 is database management system. 17) When does authentication takes place? Just before DB2 executes is SQL statement sent by a client application When the user connects to the database When the user disconnects to the database It is part of db2 server process. 18) 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 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). 1 2 3 4 19) which of the following tools would u use if you need to execute SQL statements against a Db2 database from the command line? DB2 Health center Db2 command line processor Db2 command line advisor Db2 control center

20) which of the following is true about table spaces in DB2? A table space is a file managed by the operating system where db2 can store data. A table spaces is always associated with the buffer pool A table spaces to store users temporary table data is automatically is created when database is created. A table space can be managed by the database (DB2) or by external application 21) which of the following statement is true? the owner of a table does not automatically receive control privilege for the table the owner of a table automatically receives control privilege, but does not automatically receive all other table privileges. if the control prevailed is revoked from the table owner, all the other privies that are automatically granted to the owned table ,when the table was created are automatically reviled. 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.

22) which of the following installation packages does not contain the GUI administration tools? DB2 data server enterprise edition Db2 data server express-C edition IBM data server client IBM data server Runtime 23) Application A is running under the repeatable read isolation level and holds an update lock on table TAB!. 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 24) which of the following us 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. 25) 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. 26) 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.

27) which of the following is NOT a SQL/XML function in DB2 9.7? XMLQUERY XMLEXISTS EXISTS XMLCAST 28) 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. 29) 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 30) In db2 9.7 which of the following functions can be used to create tables from XML documents? XMLTABLE TABLEXML XML2RELATIONAL BLE 31) 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 32) which of the following statements revoke access to sample database from user TOM? Revoke connect on sample from user tom Revoke access from user tom on database Revoke access from user tom on sample. Revoke connect on database from user tom. 33) which of the following statements is false regarding buffer pools? Buffer pools work as cache, storing data that is read from table spaces. Pages in a buffer pool can be 4k,8k,16k,32k in size A database can only have one Buffer pool. The size of a buffer pool can be automatically resized STMM.

34) 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 finalise 35) In which of the following Logging type , SECONDARY log files are allocated if Primary Log files are full? a) Incremental b) Circular c) Archival d) Delta 36) Given the option below which of the following it can remove a table from DB2? remove delete del drop 37) 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 38) 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 users temporary table data is automatically created when DB is created a TS can be managed by the database (db2) or by an entered application 39) 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 40) Which of the following objects you would need create in order to executed a block of code every time table is up date an after trigger a UDF a stored procedure an user defined type

41) 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 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 42) 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 43) Which of following delete sample database? db2 drop sample db2 delete database sample db2 drop sample DB db2 drop database sample 44) Which of the following is not part of the x query flow expression? for clause let clause order by clause with clause 45) which of the following statements is not true regarding table spaces on DB2? a)a table space is a logical object in between logical table and physical containers. b)All tables, indexes and other data are stored in table space. c)A table space is a logical object required to store data, indexes and tables in temp memory. d)A table space is always associated to a buffer pool.

46) 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 47) 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

48) Which is an xml based language for transforming xml document? XHTML XSLT HTML JAVA 49) 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 50) SQL used to remove data from table users remove table users drop table users delete from table users alter table users 51) 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 52) statement that can add records to table a. addrec b. addrecord c. insert d. add 53) 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 54) which of the following is characteristic difference b/w cursor stability and currently committed a. reader block reader b. reader block writer c. writer block reader d. writer block writer

55) which of the following statement is false about transactions a. operations inside a transaction are executed in a parallel b. only 1 commit statement can be executed inside the same transaction c. transaction guarantee atomicity of a group of operation d. a rollback or commit statement finalize a transaction 56) 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 cfg b. db2 list db cfg c. db2 list all from db cfg d. db2 get all from db cfg 57) which of the following statement grants user john the ability to insert data to table 1 a. grant add on table to john b. grant insert on table 1 to john c. grant add on table 1 to user john d. grant insert on table1 to user john 58) when a user is connected to database which of the following privileges is required for the user to use a package a. bind b. bindadd c. execute d. use 59) which of the following operation will perform an offline table space recovery a. restore database sample (mytbsp) offline from/tbspbkp b. restore database sample table space (mytbsp) from / tbspbkp c. restore database table space (mytbsp) online from /tbspbkp d. there is no option to restore a table space in db2 60) Which of the following is a tool to configure automatic database backup a. Configure automatic maintenance wizard b. design advisor c. explain tool d. export utility 61) Considering the SQL statements 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

62) Which of the following tools can be used to develop stored procedures? a) DB2CLP b) DB2 command Editor c) IBM Data studio d) All of the above 63) Which of the following options can be used to check the minimum point is time (PIT) for a table space restore? a) List Table spaces show ALL b) Restore Database sample table space (mytbsp) from 1 tbspbkp) c) Restore database sample table space ( mytbsp) online from / tbspbkp d) get snapshot for Table space on <database> 64) 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 columns d) Rows are also known as fields of the table. 65) Best describes what an incremental cumulative backup is? a) Backup all of the data that has changed since the last successful full 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. 66) what is SQL/XML? a)SQL/XML is a communication protocol for DB2 databases. b) is a 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 rational form and vice verso, d) Is an extension to SQL standard and provides various publishing functions to transform XML data into relational form and vice versa. 67) Which of the following is NOT true about columns? a)Each col consists of one or more fields. b)Each col contains a specific type of information c)Col must be designated a specific data type d)Col are also known as fields. 68) In embedded SQL code, which of the following is true about delimiters? a) Used by the OS to delimit system variable declaration b) Used by the DB to indicate the end of Column c) Used by the compiler to indicate the end of the program. d) Used by the precompiler to identify sql statements to be translated.

69) which of the following is false about views a. do not contain real data b. any view can be updated independent of its definition c. when changes are made to data through a view the data is changed in the underlying table d. can be used interchangeably with table when retrieving data 70) 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 71) A company has a large amount of data to store on wants to be able to do the following with the data a)text files b)database c)spreadsheets d)comma delimited data files 72) given the following table definition 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 73) 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 74) 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

75) 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 76) When using a relational database which of the following is false? a)retrieve data using sqls data manipulation language(dml) b)define the datbase structure using sqls ddl c)store the data in class instance and fields d)use normalisation to avoid redundant data in your tables. 77) which of the following is false about the information model? a. provides the details to implement objects in dbs. b. defines relationships between manged objects. c. provides an abstract mangement of objects to a conceptual level. provides a conceptual /abstract model for designers. 78) 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 auto storage can be used to automatically reorganize the data as a physical media is order to improve performance 79) 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 80) Which of the following is true about the information model? Provides the specific of objects in a detailed level Describes objects but not relationships between them Provides the details to implement objects in database Provides conceptual abstract in database 81) 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

82) create table color(cid integer not null primary key,c.desc char(20)) create view object(oid char(2),odesc char(20), cid integer references color(cid)on select cascade) which options correctly describes the change in 2 tables after the statement below is executed. Delete from color where cid=2 Only rows in table color will be affected Rows in both color and object with cid=2 will be deleted Only rows in table object will be affected No rows will be deleted 83) Which of the following stores db2 `configuration information? Dbmcfg Dbcfg Db2 profile registey All the above 84) 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 85) Which of the following privileges permits a user to create objects with in a schema? Control Alter References Createin 86) Which of the following is false about keys in the relation model Foreign keys are used to identify foreign columns Primary keys unique identify each tuple of the relation Primary keys are defined by a subset of attributes of a relation A relation can have multiple foreign keys 87) Which of the following privileges permits a user to update the comments associated with a table? Control Alter Createin References

88) Which of the following statements is true about pure xml technology? With pure xml technology there is a part of the db2 engine that can natively handle xquery In pure xml,a query can combine sql with xml constructs;therefore integrating relational and hierarchical data in one query 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 All the above 89) Which of the following best describe the advantages of executing the set of dml statements inside a single transactions The dbms records those operations in the audit logs since they are grouped inside a transaction The dbms stores the transaction operation so that the client applications can return the transaction easily 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 consists state The dbms guarantees that all operations are always executed successfully 90) 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 91) 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 92) which is not DML statement? A. alter B. insert C. select update 93) 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

94) DB2 authentication server is defined within A. database configuration B. database managed configuration C. DB2 registery D.systems catalog 95) which of the followoing is not XQuery function A. db2_fn:Xml column B. db2_fn:sal query C. db2_xml record none of the above 96) 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 a relation can have multiple foreign keys 97) which of the following table space is not created by default 1)user temporary space 2)syscatspace 3)system temporary space 4)user space1 98) After the following SQL statement is executed GRANT All PRIVILeGES ON TABLE STUDENT TO USER USER1 ASSUMING USER USER1 HAS NO OTHERR AUTHORITIES OR PRIVILAGES WHICH OF THE FOLLOWING ACTIONS IS USER1 ALLOWED TO PERFORM? a)grant all privilages on table student to other users b)drop a view associated to the table student c)drop the table student d)none of the above 99) which of the following is free version of db2? a)DB2 Express-c b )DB2 Express c )DB2 Enterprise d )DB2 workgroup 100) create or replace proc1(p1 integer,out p2 varchar(20)) Begin.. End@ Using db2clp, which of the following commands would successfully executed procedure proc1? a)call proc1(1,default) b) call proc1(1,?) c) call proc1(1) d)none of the above

101) which of the following is a reason for using database to store data instead of many alternatives? a)database store data in an instructed way for faster insert performance b)dbs are cheaper to use than other alternatives c)dbs are the interface function of most oss, thus its widely available to applications d)databases allow multiple users to handle and change the data without losing data and its consistency 102) which of the following options best describes a domain found in the table below? Create table employee(id integer not null,name varchar930) not null,extensions integer not null,manager varchar(30) not null, primary key(id)); Sample contenet of the table employee at a given point in time: Id NAME Extension Manager 1 john 53412 y 2 Susan p 54123 N 3 jennifer L 51234 N a)Manager domain(n) b)Name Domain=(set of all positive names) c)Extension Domain(53412) d)ID domain=(1,2,3) 103) consider table tab1 defined as below: Considerably the following statements are successfully executed in clp with auto commit disabled, how many rows are inserted in tab1? Insert nto tab1 values(1,john) Insert nto tab1 values(1,john) Commit Insert nto tab1 values(1,john) Rollback a)0 b)1 c)2 d)3 104) Current_employees past_employees Empid Integer not null Empid integer not null Name char(20) Name char(20) Salary decimal(10,2) Salary decimal(10,2) Assuming both tables contain data, which of the following statements will not successfully add the data to table current_employees a)insert into current_employees (empid) values(10) b) insert into current_employees values(10,jagger,85000.00) c) insert into current_employees select empid,name,salary from past_employees where empid=20 d) insert into current_employees(name,salary) values(select name,salary from past_employees where empid=20)

105) Current_employees past_employees Empid Integer not null Empid integer not null Name char(20) Name char(20) Salary decimal(10,2) Salary decimal(10,2) Enabled char(1) Assuming past_employees is empty and current_employees is populated, which of the following statement copy all employees(having the enabled column with a value of N) from current_employees to past_employees? a)insert into past_employees values(current_employees where enabled=N) b) insert into past_employees values(select empid,name,salary from current_employees) c) insert into past_employees values(select * from current_employees where enabled=N) d) insert into past_employees values(select empid,name,salary from current_employees where enabled in (N)) 106) which of the following describes the C in Db2 Express-c edition a)c stands for C language b)it is free to develop,destroy c)it is 2gb memoey installable d)all the above 107) 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 108) given the following two tables: Names(table) Student _name Student_number Wayne gretzky 99 Jaromirjagr 68 Bobby orr 4 Brett hull 23 Mario Lemieux 66 Marks(table) 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 109) 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 ambiguous, as the table schema is not specified. b)db2 inst1.table_1 c)default .table_1 d)sysibm.table_1 110) 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 c)Select * from tab1 right outer join tab2 on col_1=col_A d)Select * from tab1full outer join tab2 on col_1=col_A 111) 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. 112) Consider a table tab1 having the following value Col1 col2 A 10 B 20 c 30 A 10

C 20 D 40 Which of the following statements can be used to modify the values in tab1 so that the final context is as follows Col1 clo2 C 30 D 40 Delete from tab1 Insert into tab1 values(c 40) Insert into values(d 40) Update tab1 set col1null where col2in (10,20) Delete from tab1 where col2 not in (30,40) Delete from tab1 where col2 in (30,40) 113) 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? Select * from tab1 full outer join tab2 on col_1=col_A Select * from tab1 inner join tab2 on col_1=col_A. Select * from tab1 left outer join tab2 on col_1=col_A Select * from tab1 right outer join tab2 on col_1=col_A 114) 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 Select name from guests where name like %0_ a. Oliver. b. Vinlenzo c)Tom d. Rodney

Вам также может понравиться