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

1.

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> </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 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 Which of the following is false about keys in the 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 attributes of a relation. D. A relation can have multiple foreign keys What are the advantages of using Stored Procedures?

Reduces network traffic Centralizes the location where code is stored and changed Enforcement of business rules All of the above Which of the following is true about Relational Databases and the Relational Data Model?

A. A table does not allow duplicates and a relation does. B. A domain is the set of all possible values for a specific attribute. C. A column is the equivalent to a tuple. D. A row is the smallest unit of data Application 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?

A. Repeatable Read B. Read Stability

C. Cursor Stability D. Uncommitted Read 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. Infinite logging B. Archival logging C. Circular logging D. It cannot be done in DB2 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 What is the default isolation level in DB2 9.7?

A. Read Stability B. Cursor Stability with Currently Committed C. Uncommitted Read D. None of the above Which of the following is a characteristic of DB2 Express-C?

A. The C in the name stands for the C language B. It is free to develop, deploy and distribute C. It has a 2GB database size limit D. All of the above.

Consider a table TAB1 having the following values:

Which of the following statements can be used to modify the values in TAB1 so that the final content is as follows:

A. DELETE FROM TAB1 INSERT INTO TAB1 VALUES (C, 40) INSERT INTO TAB1 VALUES (D, 30) B. UPDATE TAB1 SET COL1 = NULL WHERE COL2 IN (10, 20) C. DELETE FROM TAB1 WHERE COL2 NOT IN (30, 40) D. DELETE FROM TAB1 WHERE COL2 IN (30, 40) Which of the following events will NOT cause a trigger to be activated?

A. SELECT B. DELETE C. INSERT D. UPDATE

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 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 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 Which of the following is created automatically when a DB2 database is created?

A. TEMPSPACE1 table space B. SYSCATSPACE table space. C. IBMDEFAULTBP buffer pool. D. All of the above. Given the following create table statement:

Which of the following statements will retrieve the students 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 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 process In DB2 9.7, which of the following functions can be used to create tables from XML documents?

A. TABLEXML B. XMLTABLE C. XML2RELATIONAL D. XML2TABLE 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 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 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 NULL values in the table(s).

A. 1 B. 2 C. 3 D. 4 Which of the following tools will give you the best performance to import large amounts of data into a DB2 table?

A. LOAD B. IMPORT C. FAST IMPORT D. BULK INSERT 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) D. None of the above Which of the following options best describes a domain found in the table below?

Sample content of the table EMPLOYEE at a given point in time:

A. Manager Domain = (N) B. Name Domain = (Set of all Possible Names) C. Extension Domain = (53412)

D. ID Domain = (1, 2, 3) Two tables are created by the following statement:

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 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. Assuming that you are currently connected to a DB2 database, which of the following commands will terminate your connection?

A. db2 terminate B. db2 connect end C. db2 connect kill

D. db2 connect finalize Which of the following programming languages can be used to develop applications that require access to a DB2 database?

A. Java B. PHP C. C# D. All of the above Which of the following is true about Table Spaces in DB2?

A. A Table Space is a file managed by the operating system where DB2 can store data. B. A Table Space is always associated with a buffer pool. C. A Table Space to store users temporary table data is automatically created when a database is created. D. A Table Space can only be managed by the database (DB2). 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 same transaction. C. Transactions guarantee atomicity of a group of operations. D. A ROLLBACK or COMMIT statement finalizes a transaction 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 primary key of another relation. 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 is NOT a DML statement?

A. ALTER B. INSERT C. SELECT D. UPDATE 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. Which Data Model was created with the focus of providing better data independence?

A. Relational B. Hierarchical C. Semi-structured D. Entity-Relationship Which of the following statements is true about pureXML technology?

A. With pureXML technology there is a part of the DB2 engine that can natively handle XQuery. B. In pureXML, a query can combine SQL with XML constructs; therefore integrating relational and hierarchical data in one query C. In pureXML, 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 of the above 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 systems catalog

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

A. 0 B. 1 C. 2 D. 3 When creating a DB2 database, which of the following table spaces is NOT automatically created?

A. User temporary table space B. User table space C. Catalog table space D. System temporary table space Which of the following stores DB2 configuration information?

A. dbm cfg B. db cfg

C. DB2 Profile Registry D. All of the above While connected to the SAMPLE database, which of the following statements revoke access to the SAMPLE database from user TOM ?

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 Which of the following best describes the benefits of supporting XQuerys TRANSFORM expression in DB2:

It can be used to modify both XML and relational data, providing a common language for developers to handle the database data When used in a UPDATE statement, it simplifies the update of XML documents stored in the database. It is very useful to transform XML documents into other formats using stylesheets. It can be used to automatically clean up unnecessary tags in a XML document, providing smaller documents thus saving space in the database. Given the following tables:

Assuming PAST_EMPLOYEES is empty and CURRENT_EMPLOYEES is populated, which of the following statements will copy all employees (having the ENABLED column with a value of N) from table CURRENT_EMPLOYEES to table PAST_EMPLOYEES?

A. INSERT INTO past_employees VALUES (current_employees WHERE ENABLED = N) B. INSERT INTO past_employees (SELECT empid, name, salary FROM current_employees) C. INSERT INTO past_employees (SELECT * FROM current_employees WHERE ENABLED = N) D. INSERT INTO past_employees (SELECT empid, name, salary FROM current_employees WHERE ENABLED in (N)) Which of the following is false?

A. Structured Query Language is the standard language for manipulating data in a Relational Database Management System. B. A DBMS is a software system that manages databases. C. The Hierarchical data model organizes data in tables with columns and rows. D. DB2 is a Database Management System. Which of the following privileges permits a user to update the comment associated with a table?

A. CONTROL B. ALTER C. CREATEIN D. REFERENCES f circular logging is used, the following types of backup are allowed:

A. Online full backup B. Offline full backup C. Online incremental backup D. Offline incremental backup Which of the following is NOT a SQL/XML function in DB2 9.7?

A. EXISTS B. XMLEXISTS C. XMLQUERY D. XMLCAST 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> 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 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 behavior in Cursor Stability is now different in Cursor Stability with Currently Committed?

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

n embedded SQL, which of the following is an example of how to establish a connection to the SAMPLE database in DB2?

A. EXEC CONNECT TO SAMPLE B. DB2 CONNECT TO DB SAMPLE C. EXEC SQL CONNECT TO SAMPLE D. EXEC DB2 CONNECT TO DATABASE SAMPLE Which of the following tools can be used to develop stored procedures?

A. DB2 CLP B. DB2 Command Editor C. IBM Data Studio D. All of the above 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 its widely available to applications. D. Databases allow multiple users to handle and change the data without losing data and its consistency.

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 is not a XQuery function?

A. db2-fn:xmlcolumn B. db2-fn:sqlquery C. db2-fn:xmlrecord D. None of the above Given the options below, which of the following statements can remove a table from a database?

A. REMOVE B. DELETE

C. DROP D. DEL 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. Which of the following statements is FALSE regarding Buffer Pools?

A. A database can only have one Buffer Pool. B. Pages in a Buffer Pool can be 4k, 8k, 16k and 32k in size. C. Buffer Pools work as a cache, storing data that is read from table spaces. D. IBMDEFAULTBP is the default Buffer Pool automatically created when a database is created Which of the following privileges permits a user to create objects within a schema?

A. CONTROL B. ALTER C. REFERENCES D. CREATEIN

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 Which of the following does not include the GUI administration tools?

A. DB2 Enterprise Edition B. DB2 Express-C Edition C. IBM Data Server Client D. IBM Data Server Runtime Client 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.

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