This action might not be possible to undo. Are you sure you want to continue?
Structured Query Language is the standard language for manipulating data in a Relational Database Management System. B. Database Management Systems act as an interface used to communicate with databases. C. The Hierarchical data model organizes data in tables with columns and rows. D. DB2 is a Database Management System. 2. 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 3. Which of the following is NOT true about keys in the relational model? A. Primary keys are defined by a subset of attributes of a relation. B. Primary keys uniquely identify each tuple of the relation. C. Primary keys define the relationship between two tables. D. A relation can have multiple foreign keys. 4. Given the following tables: CURRENT_EMPLOYEES -------------------------EMPID INTEGER NOT NULL NAME CHAR(20) SALARY DECIMAL(10,2) ENABLED CHAR(1) PAST_EMPLOYEES -------------------------EMPID INTEGER NOT NULL NAME CHAR(20) SALARY DECIMAL(10,2) Assuming PAST_EMPLOYEES is empty and CURRENT_EMPLOYEES is populated, which of the following statements will copy all past employees (enabled column is 'N') from 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'))
4. 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 5. Which of the following events will NOT cause a trigger to be activated? A. DELETE B. SELECT C. INSERT D. UPDATE 6. 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 it's widely available to applications. D. Databases allow multiple users to handle and change the data without losing data and its consistency. 7. Which of the following options best describes a domain found in the table below? CREATE TABLE EMPLOYEE ( ID INTEGER NOT NULL, NAME VARCHAR(30) NOT NULL, EXTENSION INTEGER NOT NULL, MANAGER VARCHAR(30) NOT NULL PRIMARY KEY TERMINATE; ID 1 2 3 NAME John S Susan P Jennifer L EXTENSION MANAGER 53412 Y 54123 N 51234 N (ID));
A. Manager Domain = (N) B. Name Domain = (Set of all Possible Names) C. Extension Doman = (53412) D. ID Domain = (1, 2, 3) 8. 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. 9. Which of the following is true about Static SQL? A. It takes advantage of the table statistics at runtime. B. The structured 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.
10. Which of the following privileges permits a user to create objects within a schema? A. CONTROL B. ALTER C. REFERENCES D. CREATEIN 11. 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 12. In DB2 9.7, which of the following functions can be used to create tables from XML documents? A. XMLTABLE B. TABLEXML C. XML2RELATIONAL D. XML2TABLE 13. If 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 14. 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 Command Line Processor C. DB2 Command Line Advisor D. DB2 Control Center 15. Which of the following installation packages does NOT contain the GUI administration tools? A. DB2 Data Server Enterprise Edition B. DB2 Data Server Express-C Edition C. IBM Data Server Client D. IBM Data Server Runtime 16. 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 17. 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 user's temporary table data is automatically created when a database is created. D. A Table Space can be managed by the database (DB2) or by an external application. 18. 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. 19. 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 20. 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). A. 1 B. 2 C. 3 D. 4 21. Which of the following statements is FALSE regarding Buffer Pools? A. Buffer Pools work as a cache, storing data that is read from table spaces. B. Pages in a Buffer Pool can be 4k, 8k, 16k and 32k in size. C. A database can only have one Buffer Pool. D. The size of a Buffer Pool can be automatically resized by STMM 22. 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 smallest unit of data. C. A column is the equivalent to a tuple. D. A domain is the set of some possible values for a specific field 23. Which of the following is NOT a DML statement? A. SELECT B. INSERT C. ALTER D. UPDATE
24. Given the following table definition: SALES -------------------------SALES_DATE DATE SALES_PERSON CHAR(20) REGION CHAR(20) SALES INTEGER 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 25. Which of the following best describes the benefits of supporting XQuery's TRANSFORM expression in DB2? A. It can be used to modify both XML and relational data, providing a common language for developers n to handle the database data. B. When used in a UPDATE statement, it simplifies the update of XML documents stored in the database, since all processing is done by the DB2 engine. C. It is very useful to change XML nodes when the XML document is loaded in the client application. D. It can be used to automatically clean up unnecessary tags in a XML document, providing smaller documents thus saving space in the database. A 26. Which of the following statements revoke access to 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 27. Which of the following privileges permits a user to update the comment associated with a table? A. ALTER B. CONTROL C. CREATEIN D. REFERENCES 28. What is the default isolation level in DB2 9.7 for Linux, Unix and Windows for new databases? A. Cursor Stability B. Cursor Stability with Currently Committed semantics C. Uncommitted Read D. None of the above 29. Which of the following is true about the Information Model? A. Allows specification of objects in a detailed level. B. It can describe objects but not the relationships between them. C. It is a group of descriptions explaining objects of a data model. D. Data models can be used to map an Information Model to a software implementation D 30. Assuming that you are currently connected to a DB2 database, which of the following commands will terminate your connection? A. db2 connect reset B. db2 connect end C. db2 connect kill D. db2 connect finalize
31. Giving the following create table statement CREATE TABLE student_marks (student_name CHAR(20) NOT NULL, student_number INTEGER NOT NULL, math INTEGER, phys INTEGER, engl Integer) Which of the following statements will retrieve the student's 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 32. What are the advantages of using Stored Procedures? A. Reduces network traffic B. Access to features that exist only on the server C. Enforcement of business rules D. All of the above 33. Which of the following tools will give you the best performance to import large amounts of data into a DB2 table? A. IMPORT B. LOAD C. FAST IMPORT D. BULK INSERT 34. Given the following table: GUESTS -----------------name age --------Jenny 34 Rodney 36 Oliver 21 Angie 42 Tom 28 Vincenzo 25 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 35. 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.
36. Which of the following is NOT true about Relational Databases? A. Each column contains a specific type of information. B. Columns are where the individual pieces of information are stored. C. A primary key can be composed of only one attribute. D. Foreign keys are an attribute in one relation whose values match a primary key of another relation. 37. Which of the following elements are shown in a DB2 Access Plan? A. Configuration parameters relevant to optimization. B. Properties for operators. C. Statistics. D. All of the above. D 38. Which of the following XML fragment correctly indicates the result of the given statement below? values (XMLELEMENT (name "Name", XMLNAMESPACES( DEFAULT 'htpp://sample.default.nspace.com'), XMLATTRIBUTES ('MALE' as "Gender"), XMLCONCAT( XMLELEMENT (name "FirstName", 'Amitabh'), XMLELEMENT (name "LastName", 'Patel')))) A. <Name xmlns="htpp://sample.default.nspace.com" Gender="MALE"> <FirstName>Amitabh</FirstName> <LastName>Patel</LastName> </Name> B. <Name xmlns="htpp://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 39. Which one of the following SQL statements will inline XML documents smaller than 1000 bytes, stored within the EMPINFO column? A. CREATE TABLE EMPLOYEES (empid char(8), empinfo XML inline length(1024)) B. ALTER TABLE EMPLOYEES ALTER COLUMN empinfo SET INLINE LENGTH 1000 C. CREATE TABLE EMPLOYEES (empid char(8), empinfo XML) SET INLINING (1000) D. CREATE TABLE EMPLOYEES (empid char(8), empinfo XML DEFAULT INLINE 1000) 40. Given the following UPDATE statement: UPDATE employees SET workdept = (SELECT deptno FROM department) WHERE workdept = 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 only 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
41. The authentication method in a DB2 server is defined within: A. The database configuration. B. The system's catalog. C. The DB2 registry. D. The database manager configuration. 42. In embedded SQL, which of the following is an example of how to establish a connection to the SAMPLE database in DB2? A. EXEC SQL CONNECT TO SAMPLE B. DB2 CONNECT TO DB SAMPLE C. EXEC CONNECT TO SAMPLE D. EXEC DB2 CONNECT TO DATABASE SAMPLE 43. 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. 44. Given the options below, which of the following statements can remove a table from a database? A. REMOVE B. DELETE C. DEL D. DROP 45. Which of the following statements best describes the XML Regions Index in DB2? A. The Regions Index is a descriptor for referencing large objects in the LOB storage area. B. The Regions Index is a new type of XML index available in DB2 9.7. C. The Regions Index facilitates access to document regions in the XML data area. D. The Regions Index can be compressed by issuing an offline reorg operation on the table. 46. 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 47. Which of the following is a characteristic of High Availability? A. It allows compression of data. B. It allows definition of a policy to guarantee quality of service to applications. C. It allows replication of data to a standby server that can take over in case of failure. D. It allows high performance of a DB2 server by distributing workload across several machine. 48. 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. Archival logging C. Infinite logging D. It cannot be done in DB2
49. 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> 50. Given the following two tables: TAB1 -----------------COL_1 COL_2 --------A 10 B 12 C 14 TAB2 -----------------COL_A COL_B --------A 21 C 23 D 25 Assuming the following results are desired: COL_1 A B C COL_2 10 12 14 COL_A A C COL_B 21 23
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
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue listening from where you left off, or restart the preview.