Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Microsoft SQL Server wikipedia , lookup
Concurrency control wikipedia , lookup
Open Database Connectivity wikipedia , lookup
Ingres (database) wikipedia , lookup
Entity–attribute–value model wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Functional Database Model wikipedia , lookup
Clusterpoint wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations) Item 1 Table ACCOUNTS has the following structure: ACCT_ID INT PRIMARY KEY NOT NULL ACCT_NAME VARCHAR (100) DEPT_ID INT DEPT_NAME VARCHAR (100) Another table named DEPARTMENT contains the list of all department IDs and name for the organization. To populate the DEPT_ID and DEPT_NAME columns of the ACCOUNTS table the following SQL statement is issued: INSERT INTO accounts (dept_id, dept_name) SELECT dept_id, dept_name FROM DEPARTMENT What is the result of the INSERT statement? { { { ~ The INSERT statement will execute successfully. The INSERT statement will fail because the statement has a syntax error. The INSERT statement will execute successfully only if the subquery returns one row. The INSERT statement will fail because the column ACCT_ID cannot accept null values. Explanation: The INSERT statement will fail because the column ACCT ID cannot accept null values. For an INSERT statement that uses a subquery the INSERT statement must either list all the columns of the table or the remaining columns of the table that do not appear in the column list must accept null values or have a default constraint defined. The INSERT statement will execute successfully only if the NOT NULL columns in the table are either marked as NULL or have a default constraint defined. The option, the INSERT statement will fail because the statement has a syntax error, is incorrect because the statement does not have any syntax errors. The correct syntax of the INSERT statement is INSERT INTO [table name | view name] < ( [ column name], ..., ...) > [SELECT statement]. The option, the INSERT statement will execute successfully only if the subquery returns one row, is incorrect. The subquery can return more than one row. However, the number of values returned by the subquery must match the column name list of the INSERT statement and the data types should be compatible. Objective: Working with DB2 UDB Data Sub-Objective: Ability to use SQL to UPDATE, DELETE, or INSERT data References: IBM Press - DB2 Universal Database V8.1 Certification Exam 700 Study Guide Chapter 5 - Working with DB2 UDB data Page 1 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 2 Which of the following schema is NOT created whenever a new database is created? { { { ~ SYSIBM SYSCAT SYSFUN SYSDEFAULT Explanation: The SYSDEFAULT schema is not created whenever a new database is created. SYSDEFAULT is not a valid schema. When a new database is created, four schemas are created: SYSIBM, SYSCAT, SYSSTAT, and SYSFUN. Sub-Objective: Ability to access and manipulate DB2 UDB objects Objective: Accessing DB2 UDB Data References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Accessing DB2 UDB Data Item 3 Which of the following isolation level would be appropriate to use while querying read-only databases? { { { ~ Read Stability lsolation Level Cursor Stability lsolation Level Repeatable Read lsolation Level Uncommitted Read lsolation Level Explanation: Uncommitted Read lsolation Level would be appropriate to use while querying read-only databases. A transaction using this isolation level would not acquire any locks on the rows retrieved as a result of the SQL query unless another concurrent transaction attempts to alter or drop the table from which the rows were fetched. In addition, the rows cannot be modified because the database is read-only. Read Stability lsolation Level would be appropriate to use when some level of concurrency between transactions is desirable, and the rows retrieved as a result of the SQL query need to remain stable for the duration of the transaction. Cursor Stability lsolation Level would be appropriate to use when the maximum level of concurrency between transactions is desired and when queries should not return uncommitted data values from other transactions. Repeatable Read lsolation Level would be appropriate to use when you do not want other transactions to modify the rows retrieved by the transaction using this isolation level. This isolation level is desirable when you do not want the same query to return different results when executed again. Objective: Data Concurrency Sub-Objective: Given a situation, knowledge to identify the isolation levels that should be used References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Data Concurrency Page 2 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 4 Which event best describes the following situation? Transaction A issues a SELECT query and retrieves a set of rows. When the same SELECT query is issued again by transaction A, the result set is different. { { { ~ Phantoms Dirty Reads Lost Updates Nonrepeatable Reads Explanation: The event Nonrepeatable Reads describes the scenario in which a transaction issues the same SELECT statement twice and receives different results each time. Transaction A reads a set of rows and another transaction, transaction B, modifies or deletes the same set of rows and commits the changes. When transaction A issues the same query again, the result may be different because of inserts by transaction B or deletes by transaction B. The event Phantoms describes the scenario in which transaction A issues a query based on some matching criteria and retrieves the records. When the same query is issued again, the query retrieves the rows that were not available in the initial result set. For example, transaction A issues a query and the query reads a row of data based on some matching criteria. Another transaction, transaction B, then inserts some records in the table that matches the criteria for transaction A. Transaction A issues the same query again, the query will fetch records that were not available initially and were added to the table as a result of the insert operation executed by transaction B. The event Dirty Reads describes the scenario in which a transaction reads data that is not yet committed by another transaction. For example, transaction A reads data that is not yet committed by transaction B. If transaction B rolls back the changes, transaction A would have read data that never existed. The event Lost Updates describes the scenario in which two transactions attempt to update the same set of data simultaneously and one of the transaction loses the data. For example, if transaction A updates a set of rows, and then transaction B updates the same set of rows, the update performed by Transaction A is lost. Objective: Data Concurrency Sub-Objective: Given a situation, knowledge to identify the isolation levels that should be used References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Data Concurrency Page 3 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 5 Which of the following statements is NOT true about primary key constraint? { { { ~ Only one primary key can be defined on a table. Primary key columns do not allow duplicate values. The primary key column does not accept null values. The primary key column allows a single null value to be stored in the column. Explanation: The statement the primary key column allows a single null value to be stored in the column is not true. Primary key columns do not allow null values to be stored because the column defined as primary key must have a NOT NULL constraint. Primary keys, like unique constraints, do not allow duplicate values to be stored in the column. However, as compared to unique constraints, there can be only one primary key in a table. Objective: Working with DB2 UDB Objects Sub-Objective: Knowledge to identify methods of data constraint References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Objects Item 6 Given the following command: DROP DATABASE my_db Which of the following statements regarding this command is NOT true? { { ~ { The command will remove all the contents of the MY_DB database. Only users with the SYSADM or SYSCTRL authorities can issue this command. The database's tablespace storage containers are not made available for use by other databases. The command will remove the entries for MY_DB from both the system and local database directories. Explanation: The option stating that the database's tablespace storage containers are not made available for use by other databases is not true. Dropping a database will mark its tablespace storage containers for use by other databases. The other options stating that the command will remove all the contents of the MY_DB database, the command will remove the entries for MY_DB from both the system and local database directories, and only users with SYSADM or SYSCTRL authorities can issue this command are correct regarding the DROP DATABASE command. Objective: Accessing DB2 UDB Data Sub-Objective: Ability to identify and locate DB2 UDB servers References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Accessing DB2 UDB Data Page 4 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 7 Program one in the application issues the following statements: CREATE TABLE t.table1 (col1 INTEGER, col2 VARCHAR(100)) COMMIT Program two in the application then issues the following statements: INSERT INTO t.table1 VALUES (1,'IDENTITY1') ROLLBACK INSERT INTO t.table1 VALUES (2,'IDENTITY2') COMMIT DELETE FROM t.table1 WHERE col1='2' INSERT INTO t.table1 VALUES (3,'IDENTITY3') ROLLBACK INSERT INTO t.table1 VALUES (4,'IDENTITY4') COMMIT UPDATE t.table1 SET col1='5' WHERE col1='4' ROLLBACK INSERT INTO t.table1 VALUES (6,'IDENTITY6') ROLLBACK INSERT INTO t.table1 VALUES (7,'IDENTITY7') COMMIT Program three then issues the following SELECT statement: SELECT * FROM t.table1 How many rows are returned as a result of the SELECT statement? { 0 { 1 { 2 ~ 3 Explanation: In the given scenario, three rows are returned as a result of the SELECT statement. The rows will fetch the values two, four, and seven for the COL1 column. Because all other DML statements are rolled back, only three rows will be fetched from the table. The options stating that zero, one, and two rows will be returned as a result of the SELECT statement are incorrect. Because only three DML statements have been committed to the database as a result of the COMMIT statement, three rows will be returned by the SELECT statement. Objective: Accessing DB2 UDB Data Sub-Objective: Ability to identify and locate DB2 UDB servers References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Data Page 5 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 8 The table EMPLOYEE contains the following columns: EMP_ID FIRST_NAME LAST_NAME The EMP_ID column is defined as the primary key column of the table. The SALARY table contains the following columns: EMPID DAYS_WORKED GROSSSALARY The EMPID column has a referential integrity constraint that references the EMP_ID column of the EMPLOYEE table. The referential integrity constraint includes the ON DELETE RESTRICT clause. The SALARY table also has a CHECK constraint defined on the GROSS_SALARY column and the DAYS_WORKED column. The CHECK constraint enforces the following conditions: - GROSS_SALARY values should be greater than zero - DAYS_WORKED values should be between 1 and 31 Which two of the following operations will enforce the constraints defined on the SALARY table? (Choose two.) ; ; Deletion of a row in the table SALARY Updation of a row in the table SALARY Deletion of a row in the table EMPLOYEE Addition of a new column to the table SALARY Rollback of a row deletion on the table SALARY Explanation: Updating a row in the SALARY table and deleting a row in the EMPLOYEE table will enforce the constraints defined on the SALARY table. The DB2 Database Manager enforces the table CHECK constraints whenever there is insert or update operation on the table. In this scenario, the CHECK constraint will be enforced whenever a row is updated in the SALARY table. The SALARY table also has a referential integrity constraint defined on the EMPID column. The foreign key is defined with the rule ON DELETE RESTRICT. If there are corresponding rows in the dependent SALARY table, the deletion rule will not allow the rows to be deleted from the parent EMPLOYEE table. In this scenario, the referential integrity constraint will be enforced whenever there is deletion of rows in the parent EMPLOYEE table. The operations deletion of a row in the SALARY table, addition of a new column to the SALARY table, and rollback of a row deletion on the SALARY table are incorrect. Rows can be deleted from the dependent table even if there are corresponding rows in the parent table. However, the reverse is not true. Addition of a new column to the SALARY table will not have any affect on the constraints. Rollback of a row deletion on the SALARY table will simply undo the delete operation. Objective: Working with DB2 UDB Objects Sub-Objective: Knowledge to identify methods of data constraint References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Data Page 6 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 9 To process requests, which two types of databases does the DB2 OLAP server support? (Choose two.) ; ; object network relational hierarchical multidimensional Explanation: To process requests, the DB2 OLAP server supports both relational and multidimensional databases. The DB2 OLAP server processes multidimensional requests that calculate, consolidate, and retrieve information from a multidimensional database, a relational database, or both. The options stating object, network, and hierarchical database are incorrect. These are not valid types of databases. Objective: Planning Sub-Objective: Knowledge of Datawarehouse and OLAP concepts References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Planning Item 10 Which two of the following statements will allow all users in the database to access the EMPLOYEE table using the name EMP instead of EMPLOYEE? (Choose two.) ; ; CREATE VIEW emp CREATE ALIAS emp CREATE INDEX emp CREATE TABLE emp CREATE TRIGGER emp Explanation: The CREATE VIEW emp and CREATE ALIAS emp statements will allow all users in the database to access the EMPLOYEE table with the name EMP. An alias is an alternate name for a table or an existing alias. Views will also allow all users to access the table with a different name. You will need to issue the following statement to create the view: CREATE VIEW emp AS SELECT * FROM employee The options CREATE INDEX emp, CREATE TABLE emp, and CREATE TRIGGER emp are incorrect. You use the CREATE INDEX emp statement to create an index on the table. An index is created on the table to enforce uniqueness in the columns. You use the CREATE TABLE statement to create another table named EMP in the database. You use the CREATE TRIGGER emp statement to create a trigger on a table. Triggers are used to perform some actions on the tables whenever there is DML activity on the table. Objective: Working with DB2 UDB Objects Sub-Objective: Knowledge to identify characteristics of a table, view or index References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Data Page 7 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 11 The EMPLOYEES table consists of the following columns: EMPCODE EMPNAME HIREDATE SALARY DEPTCODE Some of the employees have not been assigned a department code. Which of the following statements will display all the rows from the table without a DEPTCODE value? { { ~ { SELECT SELECT SELECT SELECT * * * * FROM FROM FROM FROM employees employees employees employees WHERE WHERE WHERE WHERE deptcode deptcode deptcode deptcode = " " = NULL IS NULL IS BLANK Explanation: The statement SELECT * FROM employees WHERE deptcode IS NULL will display all the rows from the EMPLOYEE table with no DEPTCODE value. The NULL predicate is used to denote a null, missing, or absence of value a the column. The statement SELECT * FROM employees WHERE deptcode = " "is incorrect. NULL, zero(0), and blank (" ") are not same. NULL is used to indicate an absence of value, while zero and blank (empty string) are actual values that can be stored within a column. The statement SELECT * FROM employees WHERE deptcode = NULL is incorrect. The correct syntax of using the NULL predicate is < column name > IS NULL. The statement SELECT * FROM employees WHERE deptcode IS BLANK is incorrect. There is no BLANK predicate in DB2 UDB Database. Objective: Working with DB2 UDB Data Sub-Objective: Ability to use SQL to SELECT data from tables References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Data Page 8 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 12 Which of the following will allow you to reference an index by name, within an SQL statement? { { { ~ Altering the index Updating the index Querying the index Dropping the index Explanation: Indexes can only be referenced by name within a SQL statement when creating or dropping them. Other than these two actions, an index cannot be referenced by name. The CREATE INDEX statement is used to create an index. The DROP INDEX statement is used to remove an existing index from the database. Altering an index will not allow you to reference the index by name. Alteration of an index is not possible. If you need to alter an index, you should drop and re-create the index. Updating an index will not allow you to reference an index by name. You cannot update an index manually. Indexes are maintained automatically by the DB2 Database Manager. Querying an index will not allow you to reference the index by name. Selecting an index within an SQL statement is not allowed. Indexes help improving performance of queries on the base tables on which they are defined. Objective: Working with DB2 UDB Data Sub-Objective: Ability to use SQL to SELECT data from tables References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Objects Page 9 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 13 A user-defined function accesses the EMPLOYEE and DEPARTMENT tables. The function performs insert operations on the EMPLOYEE table and update operations on the DEPARTMENT table. Which of the following combinations of privileges will allow user JOHN to run the user-defined function with the least administrative effort? ~ { { { EXECUTE privilege on the function INSERT privilege on EMPLOYEE and EXECUTE privilege on the function INSERT privilege on EMPLOYEE and UPDATE privilege on DEPARTMENT UPDATE privilege on DEPARTMENT and EXECUTE privilege on the function Explanation: The EXECUTE privilege on the function will allow the user to execute the function. This is the minimum privilege required for user JOHN to execute the user-defined function. Users who have been granted the EXECUTE privilege on the function do not need additional privileges on the tables that the function references. The statement INSERT privilege on EMPLOYEE and EXECUTE privilege on the function will allow user JOHN to execute the user-defined function. However, you need to grant the minimum privileges to user JOHN to execute the function. The user does not require additional INSERT privilege on the EMPLOYEE table. The statement INSERT privilege on EMPLOYEE and UPDATE privilege on DEPARTMENT will grant user JOHN the ability to perform insert operations on the EMPLOYEE table and update operations on the DEPARTMENT table. However, this statement will not grant user JOHN the ability to execute the function. The statement UPDATE privilege on DEPARTMENT and EXECUTE privilege on the function will allow user JOHN to execute the user-defined function. However, you need to grant the minimum privileges to user JOHN to execute the function. The user does not require additional UPDATE privilege on the DEPARTMENT table. Objective: Working with DB2 UDB Data Sub-Objective: Ability to call a procedure References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Data Page 10 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 14 A view is created on a table with the following SQL statement: CREATE VIEW v1 AS SELECT A, B, C FROM tab1 WHERE A < 200 The following INSERT statement is issued next: INSERT INTO v1 VALUES (300,3,3) Which of the following about the INSERT statement is true? { { ~ { The INSERT statement fails. The INSERT statement executes successfully and the record is visible to the view. The INSERT statement executes successfully but the record is not visible to the view. The INSERT statement executes successfully but the A column is assigned a null value. Explanation: The INSERT statement executes successfully but the record is not visible to the view. This is because the record violates the view definition. The statement executes successfully because the view is not created using the WITH CHECK OPTION clause. If the view had been created using the WITH CHECK OPTION clause, the INSERT statement would fail. However, the record will not be displayed if a SELECT statement is issued against the view. The option stating that the INSERT statement fails is incorrect. If the view had been created using the WITH CHECK OPTION clause, the INSERT statement would fail. The option stating that the INSERT statement executes successfully and the record is visible to the view is incorrect. The record will not be visible to the view because the record violates the view INSERT statement will not fail because the view is not created using the WITH CHECK OPTION clause. The option stating that the INSERT statement executes successfully but the A column is assigned a null value is incorrect. The INSERT statement will either execute successfully or will fail depending upon the view definition. If the statement is successful, the A column will be assigned the specified value and not a null value. Objective: Working with DB2 UDB Objects Sub-Objective: Knowledge to identify characteristics of a table, view or index References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Objects Page 11 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 15 Which of the following statements regarding the DataLink data type is NOT true? ~ { { { The term GRAPHIC is used to denote the DataLink data type. The DataLink data type allows the DB2 UDB database to reference an external file. The DataLink data type values must be constructed using the built-in function DLVALUE( ). The DataLink data type stores encapsulated values that allow a database to establish and maintain links to external data. Explanation: The statement the term GRAPHIC is used to denote the DataLink data type is not true. The term DATALINK is used to denote the DataLink data type. The statements that the DataLink data type allows the DB2 UDB database to reference an external file, the DataLink data type values must be constructed using the built-in function DLVALUE( ), and the DataLink data type stores encapsulated values that allow a database to establish and maintain links to external data are true. Objective: Working with DB2 UDB Objects Sub-Objective: Ability to demonstrate usage of DB2 UDB data types References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Data Page 12 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 16 Which of the following DB2 UDB database tool allows you to export and import table data using a graphical user interface (GUI)? ~ { { { Control Center Replication Center Information Catalog Center Satellite Administration Center Explanation: The Control Center allows you to export and import table data using a graphical user interface (GUI). The Control Center allows you to perform administrative operations while displaying a concise view of the entire system. The Control Center is included with every edition of DB2 Universal database, with the exception of the DB2 Everyplace Database Edition. The Replication Center allows you to monitor and manage data replication between a DB2 UDB database and other relational databases. The Satellite Administration Center allows you to create and manage groups of DB2 servers performing the same business function. The Information Catalog Center allows you to manage and organize metadata about business or source information. Objective: Planning Sub-Objective: Knowledge of the features in the DB2 tools such as: DB2 Extenders, Configuration Assistant, Visual Explain, Command Center, Control Center, Relational Connect, Replication Center, Development Center, and Health Center References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Planning Page 13 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 17 Given the STORES table: ITEM_ID PRICE 1 8 2 4 3 - 4 3 5 3 You issue a SQL statement on the STORES table that returns a value of 4. Which of the following statements did you issue? { { ~ { SELECT AVG(price) FROM stores SELECT SUM(price) FROM stores SELECT COUNT(price) FROM stores None of these SQL statements will return a value of 4. Explanation: The following SQL statement will return a value of 4: SELECT COUNT(price) FROM stores The COUNT function returns the total number of non-null values found in the column specified. In this scenario, the total number of non-null values in the PRICE column is 4. The following SQL statement will not return a value of 4: SELECT AVG(price) FROM stores This statement will return the value 4.5. The AVG function returns the sum of values in the column specified divided by the number of values found in that column. The following SQL statement will not return a value of 4: SELECT SUM(price) FROM stores This statement will return the value 18. The SUM function returns the sum of the values in the column specified. The option none of these SQL statements will return a value of 4 is incorrect. In the given scenario, the statement that uses the COUNT function will return a value of 4. Objective: Working with DB2 UDB Data Sub-Objective: Ability to use SQL to SORT or GROUP data References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Data Page 14 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 18 The LOCATION table keeps track of all the events at different locations. Different events are conducted at a given location. Which of the following SELECT statements will produce the total number of different events held at each location? { SELECT UNIQUE(location_id), COUNT(event_type) FROM location GROUP BY location_id { SELECT COUNT(*), DISTINCT(location_id) FROM location { SELECT DISTINCT (event_type) FROM location GROUP BY location_id ~ SELECT location_id, COUNT(DISTINCT event_type) FROM location GROUP BY location_id Explanation: The following statement will produce the total number of different events held at each location: SELECT location_id, COUNT(DISTINCT event_type) FROM location GROUP BY location_id In the given scenario, the DISTINCT clause will eliminate any duplicate occurrence of records. The COUNT function will then return the total number of non null events. The GROUP BY clause will aggregate the data and produce a count of the different events for each location. The following statement will not produce the total number of different events held at each location: SELECT UNIQUE(location_id), COUNT(event_type) FROM location GROUP BY location_id This statement will fail because there is no UNIQUE clause in the DB2 UDB database. The following statement will not produce the total number of different events held at each location: SELECT COUNT(*), DISTINCT(location_id) FROM location This statement will fail when executed because the statement uses the COUNT group function without a GROUP BY clause. The following statement will not produce the total number of different events held at each location: SELECT DISTINCT (event_type) FROM location GROUP BY location_id This statement will fail when executed because the statement uses a GROUP BY clause without a group function. The statement will generate an error indicating that EVENT_TYPE is not a group by expression. Objective: Working with DB2 UDB Data Sub-Objective: Ability to use SQL to SELECT data from tables References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Data Page 15 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 19 You need to set up a client to access the DB2 UDB server from a Solaris machine. The client must be able to issue SQL statements and access the data on the server. What is the minimum software requirement for the Solaris client? ~ { { { DB2 run-time client DB2 administration client DB2 personal developer's edition DB2 application development client Explanation: In this scenario, the DB2 run-time client should be installed on the Solaris client machine to allow the client to issue interactive SQL statements. The DB2 run-time client software allows a client to connect with a DB2 UDB and/or a DB2 Connect server. The DB2 run-time client enables the client to issue SQL statements to access the data stored on the server. The DB2 run-time client also allows the applications using ODBC/CLI, JDBC, SQLJ, and OLE DB to run on the client and interact with data on a DB2 UDB and/or a DB2 Connect server. Some of the operating systems on which the DB2 run-time client can be installed include AIX, HPUX, Solaris, Linux, Windows NT, and Windows 2000. The DB2 administration client enables the client to perform administrative operations on a DB2 UDB database from a client workstation and also enables basic connectivity with a DB2 UDB and/or a DB2 Connect server. The DB2 administration client is included with the Control Center and the Configuration Assistant. The DB2 personal developer's edition allows a client to develop, run, and test applications that interact with the DB2 UDB databases using these methods: • • • • • Embedded Structured Query Language (SQL) IBM's Call Level Interface (CLI) Java Database Connectivity (JDBC) SQL Java (SQLJ) DB2 Application Programming Interfaces (APIs) The DB2 application development client enables the client to perform administrative operations on a DB2 UDB database from a client workstation and provides basic connectivity with a DB2 UDB and/or a DB2 Connect server. Using the DB2 application development client, the client can also develop, test, and run applications designed to interact with a DB2 database. Objective: Planning Sub-Objective: Knowledge of DB2 UDB products (client, server, etc.) References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Planning Page 16 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 20 Which of the following extenders allow you to search a text document stored in a DB2 UDB database for words that sound like "drought"? { ~ { { DB2 AVI Extender DB2 Text Extender DB2 XML Extender DB2 Spatial Extender Explanation: The DB2 Text Extender allows you to store and search information for similar-sounding words from text documents stored in the database or in the file system. The DB2 Text Extender allows you to build queries that will search and extract information from text documents based on the search criteria, including a specific word, a specific phrase, or similar-sounding or similar spelled words. The DB2 AVI Extender is used to store and manipulate audio, video, and images. The DB2 XML Extender allows you to store and manipulate the extensible markup language (XML) documents in a DB2 UDB database. The XML documents can be either stored in the database or in the file system. The DB2 XML Extender allows you to extract the information from XML documents and store them in tables and columns. The DB2 Spatial Extender is used to store, generate, and analyze geo-spatial data. The DB2 Spatial Extender allows you to store the spatial data along with the nonspatial data in the DB2 UDB database and present the data in a three-dimensional format. Objective: Planning Sub-Objective: Knowledge of non-relational data concepts (extenders, etc) References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Planning Page 17 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 21 Given the following statements: CREATE TABLE tab1 (col1 PRIMARY KEY NOT NULL, col2 NOT NULL) CREATE UNIQUE INDEX idx ON tab1(col1) How many indexes are created on the table? { 0 ~ 1 { 2 { 3 Explanation: One index is created on the table. The index is created automatically by the DB2 Database Manager for the primary key constraint defined on the COL1 column. The DB2 Database Manager creates a unique index for unique or primary key constraints defined on a column if no index exists. The second statement will fail because you cannot create additional unique indexes or constraints on the same columns. No indexes are created to support the not null constraints. The option stating zero indexes is incorrect. One index will be created to support the primary key constraint defined on the COL1 column. The option stating two indexes is incorrect. The DB2 Database Manager will create a unique index to support the primary key constraint defined on the COL1 column. The DB2 Database Manager will not allow you to create additional unique indexes on the COL1 column. The option stating three indexes is incorrect. Only one index will be created by the DB2 Database Manager to support the primary key constraint defined on the table column COL1. The second statement will fail because you cannot create additional unique indexes or constraints on the same columns. No index is created to support the not null constraint. Objective: Working with DB2 UDB Objects Sub-Objective: Knowledge to identify characteristics of a table, view or index References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Objects Page 18 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 22 Given the table SERVICE and the statements below: MACHINE MACINE_ID MANUFACTURER_ID SERVICE DATE 99052 426152 30-JUL-2002 89456 321457 17-SEP-2002 12451 220001 12-NOV-2002 89009 12-AUG-2003 98000 214578 17-DEC-2003 DECLARE c1 CURSOR WITH HOLD FOR SELECT machine_id, service_date FROM service ORDER BY manufacturer_id, service_date OPEN c1 FETCH c1 FETCH c1 FETCH c1 COMMIT FETCH c1 FETCH c1 Which of the following is the last MACHINE_ID obtained from the table? { ~ { { 12451 89009 98000 99052 Explanation: In the given scenario, the last MACHINE_ID obtained from the table is 89009. The default sorting order for the ORDER BY clause is ascending. An ascending sort will display the values from lowest to highest. During an ascending sort, the null values will be displayed last. In this scenario, the null value pertaining to MACHINE_ID 89009 will cause this value to be displayed last. The options 12451, 98000, and 99052 are incorrect. These values will not be displayed last. Objective: Working with DB2 UDB Data Sub-Objective: Ability to use SQL to SELECT data from tables References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Data Page 19 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 23 Given the following information: PROTOCOL - TCP/IP PORT NO - 5000 HOSTNAME - MY_HOST DATABASE NAME - SAMPLE DATABASE SERVER PLATFORM - OS/400 To successfully establish a connection to the database server, which of the following commands will you use? { CATALOG DATABASE sample AS sample REMOTE TCPIP SERVER my_host PORT 5000 OSTYPE os/400 { CATALOG TCPIP NODE 5000 REMOTE SERVER my_host OSTYPE os/400 CATALOG DATABASE sample AS sample AT NODE my_host AUTHENTICATION SERVER ~ CATALOG TCPIP NODE my_host REMOTE my_host SERVER 5000 OSTYPE os/400 CATALOG DATABASE sample AS sample AT NODE my_host AUTHENTICATION SERVER { CATALOG TCPIP NODE my_host REMOTE my_host PORT 5000 OSTYPE os/400 CATALOG DATABASE sample AS sample AT NODE my_host AUTHENTICATION SERVER Explanation: To establish a connection between the client and the server, you use the CATALOG TCPIP NODE and CATALOG DATABASE commands. You need to catalog both the node and the database to establish a connection. The correct syntax for both the commands is used only in the following statement: CATALOG TCPIP NODE my_host REMOTE my_host SERVER 5000 OSTYPE os/400 CATALOG DATABASE sample AS sample AT NODE my_host AUTHENTICATION SERVER The other options are incorrect because the syntaxes are not valid. Objective: Accessing DB2 UDB Data Sub-Objective: Ability to identify and locate DB2 UDB servers References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Accessing DB2 UDB Data Page 20 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 24 The CONNECT privilege has been granted to the user MARTIN. Which of the following actions can the user MARTIN perform? { ~ { { Create a table Change the password Select data from a table Create a view on a table Explanation: The user MARTIN can only change his password. The CONNECT database privilege allows the user MARTIN to establish a session with the database. However, the user MARTIN will not be able to perform any other tasks, except changing his password. This is because the user MARTIN has not been granted any other privileges. Objective: Security Sub-Objective: Knowledge of different privileges References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Security Item 25 Which of the following statements regarding sequences is NOT true? ~ { { { Sequences and identity columns are alike. Sequences are used to automatically generate values. Consecutive values can differ by any specified increment value. PREVAL and NEXTVAL are two expressions used with sequences. Explanation: The statement sequences and identity columns are alike is not true. Sequences and identity columns are used to automatically generate data values. Unlike an identity column, which is tied to a particular column or table, sequences are not tied to any columns or tables in the database. The statements sequences are used to automatically generate values, consecutive values can differ by any specified increment value, and PREVAL and NEXTVAL are two expressions that help use of sequences are true. The expression PREVAL returns the recent value for the sequence and the expression NEXTVAL returns the next value for the sequence. In addition, consecutive values in a sequence can differ by any specified value; however, the default value is 1. Objective: Accessing DB2 UDB Data Sub-Objective: Ability to access and manipulate DB2 UDB objects References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Accessing DB2 UDB Data Page 21 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 26 A hotel agent seeking reservations for a group of customer accesses the hotel reservation application and issues a query. The query for a date range displays 20 rooms as vacant. The hotel agent then refreshes the list and finds that the number of vacant rooms for the same range of date is now 30. Which of the following lsolation Level is the hotel reservation application bound to? ~ { { { Read Stability Cursor Stability Repeatable Read Uncommitted Read Explanation: The hotel reservation application is bound to the Read Stability lsolation Level. An application bound to this isolation level will allow you to change the status for any room in the hotel that does not appear in the agent's query results. Transactions will also be able to cancel the room reservations for rooms that have been reserved for the date range specified by agent. When the agent refreshes the list again, the list produced may contain new rooms that were not displayed the first time the list was generated. The hotel reservation application is not bound to the Cursor Stability lsolation Level. An application bound to this isolation level will allow users to change the status of any room in the hotel, except the room that the agent is currently looking at, not all the rooms returned by the query. Other concurrent transactions will also be able to make or cancel reservations for any room in the hotel with the exception of the room that the agent is currently looking at. The hotel reservation application is not bound to the Repeatable Read lsolation Level. An application bound to this isolation level will allow you to change the status for any room in the hotel with the exception of rooms that were not scanned in response to the agent's query. Transactions can also cancel or make reservations for any room in the hotel that was not scanned in response to the agent's date range. The hotel reservation application is not bound to the Uncommitted Read lsolation Level. An application bound to this isolation level will allow you to change the status for any room in the hotel. Other concurrent transactions will also be able to make or cancel reservations for any room in the hotel for any date range. Objective: Data Concurrency Sub-Objective: Given a situation, knowledge to identify the isolation levels that should be used References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide – Data Concurrency Page 22 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 27 Given the following statements: CREATE TABLE birth_record1 (day INT CHECK (day BETWEEN 1 AND 31), month INT CHECK (month BETWEEN 1 AND 6), year INT) CREATE TABLE birth_record2 (day INT CHECK (day BETWEEN 1 AND 31), month INT CHECK (month BETWEEN 1 AND 6), year INT) CREATE VIEW birth AS SELECT * FROM birth_record1 UNION SELECT * FROM birth_record2 INSERT INSERT INSERT INSERT INSERT INTO INTO INTO INTO INTO birth_record1 birth_record1 birth_record1 birth_record1 birth_record1 VALUES VALUES VALUES VALUES VALUES (22,10,1973) (04,01,1976) (12,07,1982) (15,05,1971) (27,11,1978) How many rows will be retrieved as a result of the following query? SELECT COUNT(*) FROM birth { ~ { { 0 2 3 5 Explanation: In the given scenario, two rows will be retrieved as a result of the SELECT query because only the second and the fourth INSERT statements will succeed. The remaining INSERT statements will fail because of CHECK constraint violations. The options zero, three, and five rows are incorrect because three INSERT statements violate the CHECK constraint and only two rows will be fetched as a result of the query. Objective: Working with DB2 UDB Objects Sub-Objective: Knowledge to identify methods of data constraint References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Data Page 23 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 28 Which of the following information is required to catalog a Windows 2000 connection to a remote Solaris server? ~ { { { Hostname Password Client’s operating system Client’s workstation name Explanation: Hostname is required to catalog a Windows 2000 connection to a remote Solaris server. Cataloging a node requires the hostname of the server. You need to have appropriate privileges on the client workstation to catalog a node. Other information required to catalog a node includes service name, type of operating system being used on the server workstation, and the alias name to be assigned to the node. If no alias name is provided, the database name is used by default. The options stating password, client's operating system, and client's workstation name are incorrect. Cataloging is performed on the client workstation. Therefore, you do not need to provide information about the client workstation. Objective: Accessing DB2 UDB Data Sub-Objective: Ability to identify and locate DB2 UDB servers References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Accessing DB2 UDB Data Page 24 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 29 Given the following statements: CREATE TABLE tab1 (c1 CHAR(3),c2 INTEGER, c3 INTEGER); INSERT INTO tab1(c2) VALUES ('54',123, 30); INSERT INTO tab1 (c1) VALUES ('21',100, 50); INSERT INTO tab1 (c3) VALUES ('10',100,20) How many rows will be returned as a result of the following statement when issued from the Command Line Processor? SELECT * FROM tab1; ~ { { { 0 1 2 3 Explanation: In the given scenario, zero rows will be returned as a result of the SELECT statement. This is because the INSERT statements will fail. In this scenario, the INSERT statements try to perform insert operation on a single column but provide the values for all three columns of the table. To successfully insert data values in a single column the INSERT statement must include a single value only and the remaining columns of the table must accept null values. The other statements are incorrect. If the INSERT statements would have executed successfully, three rows would have been returned by the SELECT statement. Objective: Working with DB2 UDB Data Sub-Objective: Ability to use SQL to UPDATE, DELETE, or INSERT data References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Data Page 25 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 30 Which of the following regarding indexes is NOT true? { { { ~ Indexes locate data quickly. Indexes enforce uniqueness. Indexes require additional storage space. Indexes hold locks for a longer period of time. Explanation: The statement indexes hold locks for a longer period of time is not true. Indexes help locate the data faster thereby increasing concurrency in a multi-user environment and therefore locks are held for a brief period of time. The options indexes locate data quickly, indexes enforce uniqueness, and indexes require additional storage space are true. Indexes store pointers that refer to rows in the base tables. Indexes are defined on one or more columns in a base table. In addition, indexes enforce uniqueness and help the DB2 Database Manager to locate data quickly and increase the response time of queries. Indexes require additional storage space and may also decrease the performance when there is increased update activity on the base table. This is because any data modifications in the table also require the corresponding indexes to be updated. Objective: Accessing DB2 UDB Data Sub-Objective: Knowledge to identify characteristics of a table, view or index References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Accessing DB2 UDB Data Page 26 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 31 Which clause will retrieve only the first 20 rows of the result data set when used in a SELECT statement? { { { ~ TOP MAXIMUM OPTIMIZE FETCH FIRST Explanation: The FETCH FIRST clause is used to restrict the result data set to a specified number of rows, in response to a query. The FETCH FIRST clause is followed by a positive integer value, representing the number of rows to be returned from the result data set and the words ROWS ONLY. The result data set generated in response to a query can contain any number of rows but the result data set that is returned will contain the number of rows that are specified by the FETCH FIRST clause. Therefore, if you need to retrieve only the first 20 rows, you could do so by executing the SELECT statement. For example: SELECT col1, col2 FROM table FETCH FIRST 20 ROWS ONLY The other options stating TOP, MAXIMUM, and OPTIMIZE are incorrect. AII of these are invalid clauses. Objective: Working with DB2 UDB Data Sub-Objective: Ability to use SQL to SELECT data from tables References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Data Page 27 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 32 Which of the following statements will force the DB2 Database Manager to acquire table-level locks for every transaction that accesses the table REGION? { { { ~ ALTER TABLE region LOCK ROW ALTER TABLE region LOCK TABLE ALTER TABLE region LOCKSIZE ROW ALTER TABLE region LOCKSIZE TABLE Explanation: The following statement will force the DB2 Database Manager to acquire table-level locks for every transaction that accesses the table REGION: ALTER TABLE region LOCKSIZE TABLE The following statements will not force the DB2 Database Manager to acquire table-level locks for every transaction that accesses the table REGION: ALTER TABLE region LOCK ROW ALTER TABLE region LOCK TABLE This is because the statements are syntactically incorrect. The following statement will not force the DB2 Database Manager to acquire table-Ievel locks for every transaction that accesses the table REGION: ALTER TABLE region LOCKSIZE ROW This statement will force the DB2 Database Manager to acquire row-Ievel locks for every transaction that accesses the REGION table. This is also the default behavior of the DB2 Database Manager. Objective: Data Concurrency Sub-Objective: Ability to list objects on which locks can be obtained References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide – Data Concurrency Page 28 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 33 You need to ensure that a particular transaction is completely isolated from other transactions in the database. Which isolation level should you use? { { ~ { Read Stability lsolation Level Cursor Stability lsolation Level Repeatable Read lsolation Level Uncommitted Read lsolation Level Explanation: The Repeatable Read lsolation Level completely isolates a transaction from other transactions in the database. The Repeatable Read lsolation Level locks all the rows that are scanned as a result of the SQL statement. A transaction using the Repeatable Read lsolation Level issues a SELECT statement twice and the result of the SELECT statement will be the same. No other concurrent transaction can perform any insert, update, or delete operations on the set of rows that are scanned by the transaction using the Repeatable Read lsolation Level. The Read Stability lsolation Level does not completely isolate a transaction from other concurrent transactions in the database. The Read Stability lsolation Level will lock all the rows that are actually retrieved as a result of the SQL statement. A transaction using the Read Stability lsolation Level issues a SELECT statement twice and the result of the SELECT statement may not be the same. No other concurrent transaction can perform any insert, update or delete operations on the set of rows that are retrieved or modified by the transaction using the Repeatable Read lsolation Level. The Cursor Stability lsolation Level locks the row that is currently being accessed by the cursor. AII the other rows that are retrieved as a result of the updatable cursor are free from locking. The lock on the currently accessed row is released when either the cursor moves to the next row or when the transaction is terminated. Other concurrent transactions in the database are allowed to insert new rows into the table and perform insert or update operations on the rows present on the either side of the cursor. A transaction using the Cursor Stability lsolation Level issues a SELECT statement twice, and the result of the SELECT statement may not be the same. The Uncommitted Read lsolation Level is the least restrictive isolation level to which a transaction can be bound. The rows retrieved by the transaction using this isolation level are locked only when another transaction attempts to drop or alter the table from which the rows are retrieved. Objective: Data Concurrency Sub-Objective: Given a situation, knowledge to identify the isolation levels that should be used References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Data Concurrency Page 29 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 34 Which two of the following authorities can revoke the CONTROL privilege on any database object? (Choose two.) ; ; LOAD DBADM SYSADM SYSCTRL SYSMAINT Explanation: Users who have been granted the System Administrator (SYSADM) authority or the Database Administrator (DBADM) authority can revoke the CONTROL privilege on any database object. The owner of the database object receives all privileges along with the CONTROL privilege on the object. However, the owner of the object cannot grant or revoke the CONTROL privilege. Only users granted the SYSADM or DBADM authority can grant or revoke the CONTROL privilege. Users who have been granted the Load (LOAD) authority cannot revoke the CONTROL privilege on any database object. However, users who have been granted the LOAD authority cannot revoke any authorities or privileges. Users granted the System Control (SYSCTRL) authority cannot revoke the CONTROL privilege on any database object. Users granted the SYSCTRL authority can only revoke the USE tablespace privilege. Users granted the System Maintenance (SYSMAINT) authority cannot revoke the CONTROL privilege on any database object. Users granted the SYSMAINT authority can neither grant nor revoke any privileges or authorities. Objective: Security Sub-Objective: Knowledge of restricting data access References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Security Page 30 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 35 Given the following table definitions: EMPLOYEE EMP_ID INTEGER NOT NULL PK NAME VARCHAR(30) NOT NULL FNAME VARCHAR(25) NOT NULL DEPT_NO INTEGER TITLE VARCHAR(25) DEPARTMENT DEPT_ID INTEGER NOT NULL PK DEPT_NAME VARCHAR2(25) The TITLE column can have three values: 'CLERK', 'ASSISTANT', or 'MANAGER'. Which of the following SELECT statements will produce the name of the departments that have more than three assistants? { SELECT dept_name FROM employee JOIN department ON employee.dept_no = department.dept_id WHERE UPPER(title) = 'ASSISTANT' GROUP BY dept_name HAVING emp_id > 3 { SELECT dept_name FROM employee GROUP BY dept_no HAVING LOWER(title) = 'assistant' AND COUNT(*) > 3 { SELECT dept_name FROM employee e JOIN department d ON (e.dept_no = d.dept_id) WHERE LOWER(title) = 'assistant' AND COUNT(*) > 3 ~ SELECT d.dept_name FROM employee e JOIN department d ON (e.dept_no = d.dept_id) WHERE LOWER(title) = 'assistant' GROUP BY dept_name HAVING COUNT(emp_id) > 3 Explanation: The following statement will produce the name of the departments that have more than three assistants: SELECT d.dept_name FROM employee e JOIN department d ON (e.dept_no = d.dept_id) WHERE LOWER(title) = 'assistant' GROUP BY dept_name HAVING COUNT(emp_id) > 3 In the given scenario, the COUNT function will include only results with more than three assistants in the table. The LOWER function will convert the strings in the TITLE column to lower-case, irrespective of how the strings are stored in the column. The following statement will not produce the name of departments that has more than three assistants: SELECT dept_name FROM employee JOIN department ON employee.dept_no = department.dept_id WHERE UPPER(title) = 'ASSISTANT' GROUP BY dept_name HAVING emp_id > 3 Page 31 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). This statement will return an error indicating that EMP_ID is not a group function because the HAVING clause is used to restrict values already grouped by the GROUP BY clause. The following statement will not produce the name of the departments that have more than three assistants: SELECT dept_name FROM employee GROUP BY dept_no HAVING LOWER(title) = 'assistant' AND COUNT(*) > 3 The statement is syntactically incorrect. The statement attempts to fetch the DEPT_NAME column values from the EMPLOYEE table. There is no DEPT_NAME column in the EMPLOYEE table. This statement will fail. The following statement will not produce the name of the departments that have more than three assistants: SELECT dept_name FROM employee e JOIN department d ON (e.dept_no = d.dept_id) WHERE LOWER(title) = 'assistant' AND COUNT(*) > 3 This statement uses a group function COUNT without the GROUP BY clause. This will cause the statement to fail. Objective: Accessing DB2 UDB Data Sub-Objective: Ability to use SQL to SELECT data from tables References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working DB2 UDB Objects Page 32 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 36 Which of the following privileges will grant ED the ability to perform the IMPORT operation on the T.MONITOR1 table? { ~ { { ALTER privilege ON t.monitor1 TO ed INSERT privilege ON t.monitor1 TO ed UPDATE privilege ON t.monitor1 TO ed SELECT privilege ON t.monitor1 TO ed Explanation: The INSERT privilege ON t.monitor1 TO ED statement allows the ED to perform the IMPORT operation on T.MONITOR1 table. The INSERT privilege also allows the users to insert data into the table. The ALTER privilege ON t.monitor1 TO ED statement allows ED to execute the ALTER TABLE statement on the T.MONITOR1 table. The ALTER TABLE statement allows you to add or remove constraints from the table, add new columns to the table, increase the length of the varying-length character data type columns in the table, and create triggers on the table. The UPDATE privilege ON t.monitor1 TO ED statement allows ED to modify the data in the T.MONITOR1 table. This privilege can be granted either on the entire table or on selective columns in the table. The SELECT privilege ON t.monitor1 TO ED statement allows ED to access data in the table. This privilege also allows the users to run the EXPORT utility against the table and to create a view based on the table. Objective: Security Sub-Objective: Knowledge of different privileges References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Objects Page 33 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 37 A table in the database is used to record the attendance registered during a show. The maximum capacity of the auditorium is 10,000. The SEATS_EMPTY column displays the current number of vacant seats in the show at any point in time. Which two of the following could be used to automatically decrement the value of the EMPTY_SEATS column whenever a seat is filled? (Choose two.) ; ; View Index Trigger Sequence Transition variable Explanation: Sequences and triggers can be used to automatically decrement the value of the EMPTY_SEATS column whenever a seat is filled during the show. You can also use the GENERATE ALWAYS AS IDENTITY clause to generate values for columns. You can create a BEFORE INSERT trigger on the table and use the REFERENCING clause to decrement the value for the EMPTY_SEATS column. The trigger must be a FOR EACH ROW trigger. A view is the result of a SELECT query on the base tables. Indexes are pointers pointing to the rows of the base table. Indexes are used to enforce uniqueness and to increase the performance of queries. Transition variables are values in a set of affected rows during a triggered action. Transition variables can refer either to old values (before the insert, update or delete operation is performed) or to new values (after the insert, update, or delete operation is performed). Objective: Accessing DB2 UDB Data Sub-Objective: Ability to create basic DB2 UDB objects References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Accessing DB2 UDB Data Page 34 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 38 The user SCOTT uses the following statement to create a user-defined function named SCOTT.CHECK_SALARY: FUNCTION check_salary ( id INT, value CHAR) RETURNS CHAR Which of the following statements, when granted by the user SCOTT, will allow another user, MARK, to execute the following statement? SELECT col1, col4 FROM t.tab1 WHERE scott.check_salary (col1) < 6 ~ { { { GRANT GRANT GRANT GRANT EXECUTE EXECUTE EXECUTE EXECUTE ON ON ON ON FUNCTION FUNCTION FUNCTION FUNCTION check_salary TO MARK check_salary(INT, CHAR) TO MARK check_salary RETURNS CHAR TO MARK check_salary(INT, CHAR) RETURNS CHAR TO MARK Explanation: The statement GRANT EXECUTE ON FUNCTION check_salary TO MARK will allow MARK to execute the SELECT statement that uses the function CHECK_SALARY. The EXECUTE privilege allows the user to invoke a routine. A routine can be a user-defined function, a stored procedure, or a method. The EXECUTE privilege on a routine also allows the user to use the routine in a DDL or DML statement. The statements GRANT EXECUTE ON FUNCTION check_salary(INT, CHAR)TO MARK, GRANT EXECUTE ON FUNCTION check_salary RETURNS CHAR TO MARK, and GRANT EXECUTE ON FUNCTION check_salary(INT, CHAR) RETURNS CHAR TO MARK are incorrect. The correct syntax of granting the EXECUTE privilege on a function is: GRANT EXECUTE ON FUNCTION < function name> TO < recipient> < WITH GRANT OPTION> When granting the EXECUTE privilege on a function, neither the input parameters nor the return datatype of the function is required. Objective: Working with DB2 UDB Data Sub-Objective: Ability to call a procedure References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Data Page 35 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 39 Which of the following is a valid LOCK TABLE statement? ~ { { { LOCK LOCK LOCK LOCK TABLE < table name > IN SHARE MODE INDEX < index name > IN SHARE MODE COLUMN < column name >IN SHARE MODE BUFFERPOOL < bufferpool name > IN SHARE MODE Explanation: The statement LOCK TABLE < table name > IN SHARE MODE is a valid statement. Locking a table in share mode for a transaction will deny other concurrent transactions from modifying data in the locked table. However, other transactions will be able to read data from the locked table. The statements LOCK INDEX < index name > IN SHARE MODE, LOCK COLUMN < column name >IN SHARE MODE, and LOCK BUFFERPOOL < bufferpool name > IN SHARE MODE are not valid because locks can only be acquired for rows, tables, and tablespaces. Objective: Data Concurrency Sub-Objective: Ability to list objects on which locks can be obtained References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Data Concurrency Page 36 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 40 Which of the following stores information related to database object definitions, object dependencies, object privileges, column datatypes, and table constraints? { { { ~ User tables Explain tables SYS.INFO tables System catalog tables Explanation: The System catalog tables store information related to database object definitions, object dependencies, object privileges, column datatypes, and table constraints. The name of the table, characteristics of a view, and data types of the columns are stored in the system catalog tables. The User tables store the application data generated by the users in the database. The Explain tables store information related to access plans of the SQL statements. The SYS.INFO tables are invalid objects in the DB2 UDB database. Objective: Accessing DB2 UDB Data Sub-Objective: Ability to access and manipulate DB2 UDB objects References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Accessing DB2 UDB Data Page 37 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 41 Which of the following statements regarding the name a database is assigned during database creation is NOT true? { { ~ { The database name cannot begin with a number. The database name can contain characters, such as @, #,_, and $. The database name can begin with the letter sequences "SYS", "DBM", or "IBM". The database name cannot be the same as any other database within the instance. Explanation: The statement the database name can begin with the letter sequences "SYS", "DBM", or "IBM" is not true. These letter sequences are reserved words and have a special meaning for the DB2 Database. These letter sequences cannot be used to assign a name to a database during database creation. Attempting to create a database where the name of the database begins with "SYS", "DBM", or "IBM" will cause the CREATE DATABASE statement to fail. The options the database name cannot begin with a number, the database name can contain characters, such as @, #, _, and $, and the database name cannot be the same as any other database within the instance are true. The database name can only consist of the characters a-z, A-Z, 0-9, @, #, _, and $. Attempting to create a database where the name of the database begins with a number or the name matches the name of an already existing database will cause the CREATE DATABASE statement to fail. Objective: Accessing with DB2 UDB Data Sub-Objective: Ability to access and manipulate DB2 UDB objects References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Accessing with DB2 UDB Objects Page 38 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 42 The following statement resulted in an error when executed from the client's workstation: DB2 CONNECT TO my_db USER user1 The following error message was generated: SQL1013N The database alias name or database name "my_db" could not be found Which of the following statements correctly identifies the possible reason for this error? { { ~ { USER1 is not authorized to connect to the database. The DB2 client version is not compatible with the server version. The client's node directory does not contain an entry for MY_DB. The database is not configured to accept incoming connection requests. Explanation: The possible reason for this error is that the client's node directory does not contain an entry for MY_DB. For a client to establish a connection with the remote database, the server workstation must be cataloged in the client's node directory. The database must also be cataloged in the system database directory of both the client and the server. The options stating that USER1 is not authorized to connect to the database, the DB2 client version is not compatible with the server version, and the database is not configured to accept incoming connection requests are incorrect. These statements will not cause the error message SQL1013N The database alias name or database name "my_db" could not be found to be generated. Objective: Accessing DB2 UDB Data Sub-Objective: Ability to identify and locate DB2 UDB servers References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Accessing DB2 UDB Data Page 39 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 43 Which of the following predicate can be used in a SELECT statement to view the list of all employees that work in either ACCOUNTS or CLERICAL department? ~ { { { IN LIKE EXISTS BETWEEN Explanation: The IN predicate can be used to view the list of all employees that work in either ACCOUNTS or CLERICAL department. The IN predicate is used to check the existence of a value in a given set of values. The finite set of values can either appear in the SELECT statement directly or it can appear in the subquery as part of the main query. The LIKE predicate is used to define a comparison relationship in which a character value is checked to see whether or not it contains a specific pattern of characters. The underscore ( _ ) and the percent ( % ) are two wild card characters used in pattern searching. The EXISTS predicate is used to find whether or not a particular value exists in a given table. The query using the EXISTS predicate must include a subquery. The BETWEEN predicate is used to find whether or not the value of a column is within a range of values. Objective: Working with DB2 UDB Data Sub-Objective: Ability to use SQL to SELECT data from tables References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Data Page 40 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 44 Which of the following actions CANNOT be performed using triggers? { ~ { { Invoking functions Dropping objects in the database Restricting DML activity on weekends Automatically generating values for columns Explanation: The action dropping objects in the database cannot be performed using triggers. Triggers are a series of actions that are to be executed when there is an insert, update, or delete operation on the table. Triggers cannot be used to perform DDL operations in the database. The options invoking functions, restricting DML activity on weekends, and automatically generating values for columns can be performed using triggers. Triggers can be used to enforce data integrity and business rules. Triggers can also be used to update other tables, automatically generate values for columns, invoke functions, and restrict DML activity on specified tables during specified times. Objective: Accessing DB2 UDB Data Sub-Objective: Ability to access and manipulate DB2 UDB objects References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Accessing DB2 UDB Data Page 41 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 45 Which of the following tools would you use to perform common administrative tasks, including cataloging a database? { ~ { { Health Center Control Center Information Center Development Center Explanation: The Control Center an overview of the entire system. You can use the Control Center as a central point to manage the database and to perform administrative tasks. Using the Control Center you can catalog and uncatalog databases, manage instances, manage objects, manage users, reorganize data, and perform backup and recovery operations. The Health Center is a GUI tool that monitors the status of the database environment. The lnformation Center is a GUI tool used to access the DB2 Universal Database product documentation. The Development Center is a GUI tool used to create, build, and deploy user-defined functions. You can also use the Development Center to create, build, and deploy stored procedures, debug SQL stored procedures, and use database objects. Objective: Planning Sub-Objective: Knowledge of the features in the DB2 tools such as: DB2 Extenders, Configuration Assistant, Visual Explain, Command Center, Control Center, Relational Connect, Replication Center, Development Center, and Health Center References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Planning Page 42 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 46 Given the following two tables, ACCOUNTS and PAYROLL: ACCOUNTS ACCTID 1001 1002 1003 1004 1005 ACCTYEAR 2000 2000 1998 2002 2003 PAYROLL ACCTID 1001 1002 1003 1004 1005 ACCTYEAR 2000 2000 2002 2001 2004 How many rows will be returned as a result of the following SELECT statement? SELECT acctyear FROM accounts UNION ALL SELECT acctyear FROM payroll { { { ~ 0 6 9 10 Explanation: The rows would be returned by the query. When using the UNION ALL set operator, the result set of each query is combined and duplicate rows are not removed. In this scenario, each individual query will return 5 rows. This makes the total rows for both the queries as 10, including the duplicate rows. The duplicate rows are for the values 2000 (for ACCTID 1001 and 1002) and 2002 (for ACCTID 1003). The option 0 is incorrect because the query will return 10 rows. The option 6 is incorrect because the query will return 10 rows. The query would have returned 6 rows if the UNION set operator had been used instead of UNION ALL. The UNION set operator combines the result set of each query but duplicate rows are removed. In this scenario, if UNION set operator would have been used, the query would have removed the occurrence of the duplicate rows 1001, 1002, and 1003. Therefore, the total would have been 6 rows (rows 2001 and 2004 from the PAYROLL table, rows 1998 and 2003 from the ACCOUNTS table, and one row each for the values 2000 and 2002). The option 9 is incorrect because the query will return 10 rows. Objective: Working with DB2 UDB Data Sub-Objective: Ability to use SQL to SELECT data from tables References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Objects Page 43 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 47 Given the following statement: CREATE TABLE table1 (col1 CHAR(4) NOT NULL) Which of the following CANNOT be successfully inserted into this table? { { ~ { 123 'xyz' NULL 'abcd' Explanation: Null values cannot be inserted into this table. This is because the column does not accept null values. The remaining options are correct. You can successfully insert the values 123, 'xyz', and 'abcd' into the table. Objective: Working with DB2 UDB Objects Sub-Objective: Given a situation, ability to create a table References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Objects Page 44 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 48 Given the following two tables: EMPLOYEE EMPID 1 2 3 4 5 6 NAME WAGNER SCOTT PETER JONES MIKE JOANA DEPARTMENT WORKDEPT A10 B12 C15 D20 E40 F50 DEPT A10 B12 C15 D20 DEPTNAME ACCOUNTS SALES SUPPORT HR ENGINEERING ADMINISTRATIVE Which of the following statements will produce the following result? NAME WAGNER SCOTT PETER MIKE ~ SELECT name, deptname workdept { SELECT name, deptname e.dept = d.workdept { SELECT name, deptname e.dept = d.workdept { SELECT name, deptname e.dept = d.workdept DEPTNAME ACCOUNTS SALES SUPPORT HR FROM employee INNER JOIN department ON dept = FROM employee e LEFT OUTER JOIN department d ON FROM employee e FULL OUTER JOIN department d ON FROM employee e RIGHT OUTER JOIN department d ON Explanation: The SQL statement SELECT name, deptname FROM employee INNER JOIN department ON dept = workdept will produce the desired result. This SELECT statement will produce the names of employees from the EMPLOYEE table, along with their department name if they have a matching value in the DEPARTMENT table. An inner join operation returns those rows from one table that have a corresponding row in the second table. The SQL statement SELECT name, deptname FROM employee e LEFT OUTER JOIN department d ON e.dept = d.workdept will produce the names of the employees along with their department name, including those employees who are not assigned a department value. When a LEFT OUTER JOIN is performed, all rows from the leftmost table (EMPLOYEE table) of the join operation that have matching rows in the rightmost table (DEPARTMENT table) are returned, together with all the rows from the leftmost table eliminated by the inner join operation. In this scenario, all matching rows (WAGNER, SCOTT, PETER, and MIKE) in these two tables will be returned with will all the non-matching rows (JONES and JOANA) in the EMPLOYEE table. The SQL statement SELECT name, deptname FROM employee e FULL OUTER JOIN department d ON e.dept = d.workdept will produce the name of the employees from the EMPLOYEE table, along with the department name if they have a corresponding value in the DEPARTMENT table. In addition, this SELECT statement will also produce all rows in both tables that are eliminated by the inner join operation. When a FULL OUTER JOIN is performed all rows from the leftmost table (EMPLOYEE table) of the join Page 45 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). operation that have matching rows in the rightmost table (DEPARTMENT table) are returned, together with all the rows from both the tables that are eliminated by the inner join operation. The SQL statement SELECT name, deptname FROM employee e RIGHT OUTER JOIN department d ON e.dept = d.workdept will produce the name of the employees from the EMPLOYEE table, along with their department name if they have a corresponding value in the DEPARTMENT table. In addition, this SELECT statement will also produce the names of the department from the DEPARTMENT table that are not assigned to any employee. When a RIGHT OUTER JOIN is performed, all rows from the rightmost table (DEPARTMENT table) of the join operation that have matching rows in the leftmost table (EMPLOYEE table) are returned with all the rows from the rightmost table eliminated by the inner join operation. In this scenario, all matching rows (WAGNER, SCOTT, PETER, and MIKE) in these two tables will be returned, as will all non-matching rows (ADMINISTRATIVE and ENGINEERING) in the DEPARTMENT table. Objective: Working with DB2 UDB Objects Sub-Objective: Ability t use SQL to SELECT data from tables References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Objects Page 46 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 49 Given the following table definition: EMPLOYEE EMPID LASTNAME FIRSTNAME DEPTID Which of the following functions will return the total number of employees in the table? { { { ~ SUM AVG MAX COUNT Explanation: The COUNT SQL function will return the total number of employees in the EMPLOYEE table. The COUNT function is a SQL built-in function packaged within the DB2 UDB Database. The COUNT function returns the total number of non null values found in a table column. The column name is passed as an argument to the COUNT function. The SUM SQL function will return the sum of the values in a table column. The column name is passed as an argument to the SUM function. The AVG SQL function will return the average of the values in a table column. The average value is derived by dividing the sum of the values in a table column by the total number of values found in that column. The column name is passed as an argument to the MAX function. The MAX SQL function will return the largest value found in a table column. The column name is passed as an argument to the MAX function. Objective: Working with DB2 UDB Data Sub-Objective: Ability to use SQL to SELECT data from tables References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Data Page 47 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 50 You issue the following statement just prior to a bulk-Ioad of 100,000 rows of data into the MASTER table: SET INTEGRITY FOR MASTER OFF Which two of the following statements correctly describes the state of the table? (Choose two.) ; ; Indexes can be created on the table. The table contains data that is free of constraint violations. The table cannot be modified using insert, update, or delete operations. The DB2 UDB utility can perform insert, update, or delete operations on the table. The table is currently placed in Check Pending state and constraint checking is disabled. Explanation: The statements the table cannot be used in insert, update, or delete operations and it is currently placed in Check Pending state and constraint checking is disabled correctly describe the state of the table. Constraint checking on a table can be suspended temporarily by executing the SET INTEGRITY SQL statement. When constraint checking on a table is suspended, the table is placed in the Check Pending state and constraint checking is disabled. However, the table may contain data that violates the constraints. During the Check Pending state, you cannot perform any insert, update, or delete operations on the table. In addition, any DB2 UDB utility cannot use the table to perform any insert, update, or delete operations while the table is in the Check Pending state. You cannot create any indexes on the table while the table is in the Check Pending state. In addition, data stored in the table can be retrieved only if the access mode specified with the SET INTEGRITY statement allows you to do so. The option stating that indexes can be created on the table is incorrect. You cannot create any indexes on the table while the table is in the Check Pending state. The option stating that the table contains data free of constraint violations is incorrect. The table may contain data that violates the constraints. The option stating that the DB2 UDB utility can perform insert, update, or delete operations on the table is incorrect. DB2 UDB utilities cannot use the table to perform these types of operations while the table is placed in the Check Pending state. Objective: Working with DB2 UDB Objects Sub-Objective: Knowledge to identify methods of data constraint References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Objects Page 48 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 51 Which of the following is NOT a feature provided by the Data Warehouse Manager to the DB2 UDB database for data warehousing? ~ { { { Optimizing queries Enterprise reporting Increased scalability Easy data access for end users Explanation: Optimizing queries is not a feature provided by the Data Warehouse Manager to the DB2 UDB database for data warehousing. Query optimization, by viewing the access plans and statistics associated with the queries, performed using Visual Explain. The Data Warehouse Manager provides the following features to the DB2 UDB database for data warehousing: • • • • • Increased scalability Enterprise reporting Easy data access for end users Fast deployment of data marts Management and resource control for DBAs Objective: Planning Sub-Objective: Knowledge of the features in the DB2 tools such as: DB2 Extenders, Configuration Assistant, Visual Explain, Command Center, Control Center, Relational Connect, Replication Center, Development Center, and Health Center References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Planning Page 49 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 52 Given the two tables: COUNTRY STATES ___________ _________________ COL1 COL2 COL1 COL2 COL3 1 ABC 1 10 100.30 2 XYZ 2 15 331.33 1 07 520.11 The table COUNTRY was created with the following CREATE TABLE statement: CREATE TABLE country (col1 INTEGER, col2 INTEGER, col3 DECIMAL (10,2), CONSTRAINT fk_col1 FOREIGN KEY (col1) REFERENCES states (col1) ON DELETE RESTRICT); How many rows are deleted from table STATES as a result of the following DELETE statement? DELETE FROM country WHERE col1 = "1" ~ { { { 0 1 2 3 Explanation: Zero rows are deleted as a result of the DELETE FROM country WHERE col1 = "1"statement. This is because the referential integrity constraint defined on the child table includes the ON DELETE RESTRICT deletion rule, which will prevent rows from being deleted from the parent table when there are matching rows in the child table. The ON DELETE RESTRICT deletion rule will ensure that the value for the foreign key of each row in the child table will have a matching value in the parent key of the parent table, whenever any delete operation is performed on the parent table. The options stating one, two, and three rows are deleted from the STATES table as a result of the DELETE statement are incorrect. The presence of the ON DELETE RESTRICT deletion rule with the referential integrity constraint will cause the DELETE statement to fail. Therefore, no rows will be deleted from child STATES table. Objective: Working with DB2 UDB Objects Sub-Objective: Knowledge to identify methods of data constraint References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Objects Page 50 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 53 Given the following command: CATALOG TCPIP NODE DB2_SRV REMOTE DB2HOST SERVER 5000 OSTYPE 0S400 Which of the following about the CATALOG TCPIP NODE command is true? { ~ { { It catalogs a remote server named DB2_SRV. It catalogs a remote server named DB2HOST. It catalogs a client's workstation named DB2_SRV. It catalogs a client's workstation named DB2HOST. Explanation: The CATALOG TCPIP NODE command in this scenario catalogs a remote server named DB2HOST. The REMOTE clause identifies the host name where the remote database resides. The SERVER clause identifies the service name or the port number that the DB2 Database Manager instance on the server uses to communicate with. The OSTYPE clause identifies the type of operating system being used on the server workstation. Therefore, the CATALOG TCPIP NODE command catalogs a node for an AS/400 server workstation named DB2HOST and assign it the alias DB2_SRV. The NODE clause identifies the alias to be assigned to the node that needs to be cataloged. This name is created on the client the node. The option stating that the CATALOG TCPIP NODE command catalogs a remote server named DB2_SRV is incorrect. DB2_SRV is the name created on the client to identify the node that is being cataloged. The option stating that the CATALOG TCPIP NODE command catalogs a client's workstation named DB2_SRV is incorrect. No information regarding the client is required while cataloging a remote server. The option stating that the CATALOG TCPIP NODE command catalogs a client's workstation named DB2HOST is incorrect. DB2HOST is the name of the server where the remote database resides. Objective: Accessing DB2 UDB Data Sub-Objective: Ability to identify and locate DB2 UDB servers References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Accessing DB2 UDB Data Page 51 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 54 Which of the following constraints will cause an index to be created by the DB2 Database Manager? { ~ { { Check Unique Not Null Referential Explanation: The unique constraint will cause an index to be created by the DB2 Database Manager, if no index exists. Unique and primary key constraints cause the creation of unique indexes by the DB2 Database Manager. When a unique constraint is defined on a column or group of columns in a table, the DB2 Database Manager checks to see whether an index already exists on the columns the unique constraint refers to. If an index already exists, then the index is marked as unique and system-required. If an index does not exist, then the index is created and marked as unique and system-required. Check, Not Null, and Referential integrity constraints will not cause an index to be created by the DB2 Database Manager. This is because the DB2 Database Manager implicitly creates an index for unique and primary key constraints, by default. Objective: Working with DB2 UDB Objects Sub-Objective: Knowledge to identify characteristics of a table, view or index References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Objects Item 55 Which of the following is NOT an object privilege in the DB2 UDB Database? { { { ~ USE SELECT EXECUTE CONNECT Explanation: CONNECT is not an object privilege in the DB2 UDB Database. CONNECT is a database privilege that allows a user to establish a connection to the database. USE is an object privilege associated with a tablespace and allows a user to create tables in the tablespace. SELECT is an object privilege associated with tables and views. The SELECT privilege allows a user to query data from a view or a table. The SELECT privilege also allows a user to run the EXPORT utility against the view or the table. EXECUTE is an object privilege associated with routines and packages. The EXECUTE privilege allows a user to invoke the routines and packages in the DB2 UDB Database. Objective: Security Sub-Objective: Knowledge of different privileges References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Security Page 52 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 56 Which of the following tools will enable you to configure client workstations so that they can access databases stored on remote DB2 servers? { { { ~ License Center Information Center Development Center Configuration Assistant Explanation: The Configuration Assistant is a GUI tool used to configure client workstations to access databases on remote DB2 servers. This tool catalogs nodes and databases without knowing the details of the connections. Using Configuration Assistant, you can add new, modify, or delete database objects, bind applications, set DB2 registry parameters, and other DB2 administrative tasks. The License Center is a GUI tool is used to view license information for each DB2 product installation. The lnformation Center is a GUI tool to access the DB2 Universal Database product documentation in electronic format. The Development Center creates, builds, and deploys user-defined functions. Using the Development Center, you can create, build, and deploy SQL scalar, SQL table, and OLE DB table user-defined functions, debug SQL stored procedures, create structured data types, and view and modify database objects. Objective: Planning Sub-Objective: Knowledge of the features in the DB2 tools such as: DB2 Extenders, Configuration Assistant, Visual Explain, Command Center, Control Center, Relational Connect, Replication Center, Development Center, and Health Center References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Planning Page 53 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 57 You issue the following SQL statement: SELECT id_number "Identity", AVG(qty) "Quantity" FROM machine WHERE qty > 100 GROUP BY "Quantity" ORDER BY 2 Which one of the following clauses cause the SELECT SQL statement to fail? { { { ~ FROM WHERE ORDER BY GROUP BY Explanation: The GROUP BY clause will cause the SELECT statement to fail because the GROUP BY clause uses the column alias to identify the column. You cannot use a column alias with a GROUP BY clause. The clauses FROM, WHERE, and ORDER BY will not cause the SELECT statement to fail. These clauses are syntactically correct. Objective: Working with DB2 UDB Data Sub-Objective: Ability to use SQL to SELECT data from tables References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Data Page 54 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 58 Given the following conditions: • • • • • Employee identification number must be unique and required Employee name should not accept null values Employee phone number must be unique Each employee must be assigned a department Employee photograph must be included Which of the following CREATE TABLE statements will satisfy all the conditions? { CREATE TABLE employee (emp_id INT NOT NULL PRIMARY KEY, emp_name VARCHAR(50) NOT NULL, phone_no INT, dept_id INT NOT NULL, emp_photo BLOB) { CREATE TABLE employee (emp_id INT NOT NULL PRIMARY KEY, emp_name VARCHAR(50), phone_no INT, dept_id INT NOT NULL, emp_photo CLOB, CONSTRAINT chk1 UNIQUE (phone_no)) { CREATE TABLE employee (emp_id INT NOT NULL PRIMARY KEY, emp_name VARCHAR(50), phone_no INT, dept_id INT NOT NULL, emp_photo BLOB, CONSTRAINT chk1 UNIQUE (phone_no)) ~ CREATE TABLE employee (emp_id INT NOT NULL PRIMARY KEY, emp_name VARCHAR(50) NOT NULL, phone_no INT, dept_id INT NOT NULL, emp_photo BLOB, CONSTRAINT chk1 UNIQUE (phone_no)) Explanation: The following CREATE TABLE statement satisfies all the specified conditions: CREATE TABLE employee (emp_id INT NOT NULL PRIMARY KEY, emp_name VARCHAR(50) NOT NULL, phone_no INT, dept_id INT NOT NULL, emp_photo BLOB, CONSTRAINT chk1 UNIQUE (phone_no)) The PRIMARY KEY constraint defined on the EMP_ID column of the table will not allow null values. In addition, this constraint will not allow any duplicate values. The NOT NULL constraint defined on the EMP_NAME column will not allow any null values. The UNIQUE constraint defined on the PHONE_NO column will allow only unique numbers to be stored in the column. The NOT NULL constraint defined on the DEPT_ID column will ensure that each employee is assigned a department. The BLOB data type will allow the EMP_PHOTO column to store the employees' photographs. The following CREATE TABLE statement does not satisfy all the given conditions: Page 55 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). CREATE TABLE employee (emp_id INT NOT NULL PRIMARY KEY, emp_name VARCHAR(50) NOT NULL, phone_no INT, dept_id INT NOT NULL, emp_photo BLOB) This statement does not have a UNIQUE constraint defined on the PHONE_NO column. This will allow duplicate phone numbers to be stored in the PHONE_NO column. The following CREATE TABLE statement does not satisfy all the given conditions: CREATE TABLE employee (emp_id INT NOT NULL PRIMARY KEY, emp_name VARCHAR(50), phone_no INT, dept_id INT NOT NULL, emp_photo CLOB, CONSTRAINT chk1 UNIQUE (phone_no)) This statement will not allow employees' photographs to be stored because the EMP_PHOTO column has a CLOB data type. The CLOB, CHARACTER LARGE OBJECT, and CHAR LARGE OBJECT data types are used to store single-byte character set (SBCS) or multibyte character set (MBCS) values that range from 32, 700 to 2, 147, 483, 647 characters in length. The following CREATE TABLE statement does not satisfy all the given conditions: CREATE TABLE employee (emp_id INT NOT NULL PRIMARY KEY, emp_name VARCHAR(50), phone_no INT, dept_id INT NOT NULL, emp_photo BLOB, CONSTRAINT chk1 UNIQUE (phone_no)) This statement does not have a NOT NULL constraint defined on the EMP NAME column. This will allow the column to accept null values for the EMP NAME column. Objective: Working with DB2 UDB Objects Sub-Objective: Given a situation ability to create a table References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Accessing DB2 UDB data types Page 56 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 59 A stored procedure named CALC_SALARY has been deployed on a DB2 UDB server. What is the minimum software requirement for the client workstation to execute this stored procedure? ~ { { { DB2 run-time client DB2 administration client DB2 personal developer's edition DB2 application development client Explanation: To execute the stored procedure, the minimum software requirement for the client machine is the DB2 runtime client. The DB2 run-time client allows the client to issue SQL statements to access the data stored on the server and allows applications using ODBC/CLI, JDBC, SQLJ, and OLE DB to both run on the client and interact with the data on a DB2 UDB and/or a DB2 Connect server. The remaining options are incorrect because they are not considered to be the minimum software installation for a client. The DB2 administration client allows the client to perform administrative operations on a DB2 UDB database. The DB2 administration client also allows the client to connect with a DB2 UDB and/or a DB2 Connect server. The DB2 personal developer's edition allows a client to develop, run, and test applications that interact with the DB2 UDB databases using the following methods: • • • • • Embedded Structured Query Language (SQL) IBM's Call Level Interface (CLI) Java Database Connectivity (JDBC) SQL Java (SQLJ) DB2 Application Programming Interfaces (APIs) The DB2 application development client allows a client to perform administrative operations on a DB2 UDB database and allows the client to connect to a DB2 UDB and/or a DB2 Connect server. The DB2 application development client also allows a client to develop, test, and run applications designed to interact with a DB2 database. Objective: Planning Sub-Objective: Knowledge of DB2 UDB products (client, server, etc.) References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Planning Page 57 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 60 Which two of the following statements about the DB2 Data Warehouse Manager are true? (Choose two.) ; ; DB2 Data Warehouse Manager moves data through a centralized server for efficiency. DB2 Data Warehouse Manager is unable to use IBM's data replication functions. DB2 Data Warehouse Manager only supports operating systems, such as Windows and AIX. DB2 Data Warehouse Manager adds to the ETL capabilities of the Data Warehouse Center. DB2 Data Warehouse Manager supports relational databases, such as Oracle, Informix, and Microsoft SQL Server. Explanation: The DB2 Data Warehouse Manager adds to the Extraction, Transformation, and Loading (ETL) capabilities of the Data Warehouse Center. In addition, the DB2 Data Warehouse Manager supports relational databases, such as Oracle, Informix, and Microsoft SQL Server. The DB2 Data Warehouse Manager also supports a wide variety of nonrelational databases, flat files, and over 40 other data sources. The option stating that the DB2 Data Warehouse Manager moves data through a centralized server for efficiency is incorrect. The DB2 Data Warehouse Manager can move data from a source to a target system without using a centralized server. This allows for greater efficiency. The option stating that the DB2 Data Warehouse Manager is unable to use IBM's data replication functions is incorrect. The DB2 Data Warehouse Manager can use these functions. The option stating that the DB2 Data Warehouse Manager only supports operating systems, such as Windows and AIX is incorrect. In addition to these operating systems, the DB2 Data Warehouse Manager supports Solaris, Linux, AS/400, and others. Objective: Planning Sub-Objective: Knowledge of Datawarehouse and OLAP concepts References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide – Planning Page 58 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 61 Which of the following statements does NOT identify the effect of an unsuccessful transaction? { { { ~ Locks are released. No new connections are allowed. Uncommitted changes are undone. Database is shutdown to restore consistency. Explanation: The statement database is shutdown to restore consistency does not identify the effect of an unsuccessful transaction. When a transaction is abnormally terminated, the DB2 Database Manager releases all locks held by the transaction, rolls back all the uncommitted changes made by the transaction using the transaction log files, and does not allow new connections to the database unless consistency is restored. Objective: Accessing DB2 UDB Data Sub-Objective: Ability to identify and locate DB2 UDB servers References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Accessing DB2 UDB Data Item 62 You need to grant read-only access to the RESOURCES table to all users in the database. Which of the following conditions would allow you to grant this type of access? ~ { { { You are the owner of the table. You have been granted the PUBLIC privilege on the table. You have been granted the SELECT privilege on the table. You have been granted the SELECT WITH PUBLIC OPTION privilege on the table. Explanation: If you are the owner of the RESOURCES table, you can grant read-only access to all users in the database. Alternatively, If you have been granted the SELECT WITH GRANT OPTION privilege on the RESOURCE table, you can grant read-only access to all users in the database. The option you have been granted the PUBLIC privilege on the table is incorrect. PUBLIC is not a privilege; it is a user group. The option you have been granted the SELECT privilege on the table is incorrect. The SELECT privilege on the table will allow you to view the data in the table, but will not allow you to grant privileges on the table. The option you have been granted the SELECT WITH PUBLIC OPTION privilege on the table is incorrect. You need the SELECT WITH GRANT OPTION privilege on the RESOURCES table for granting read-only access to all users in the database, not the SELECT WITH PUBLIC OPTION privilege. Objective: Security Sub-Objective: Knowledge of restricting data access References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Security Page 59 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 63 Which of the following is NOT true about Data Warehousing? { Data Warehousing extracts data from operational data. { Data Warehousing cleans and transforms data for end-user decision making. { Data Warehousing allows users to query the warehouse without affecting the operational databases. ~ Data Warehousing performs calculations on the operational data and writes the summarized data to the operational database. Explanation: The statement Data Warehousing performs calculations on the operational data and writes the summarized data to the operational database is not true. Data Warehousing performs calculations on the operational data, summarizes the data, and writes the summarized data to a separate database. The option stating that Data Warehousing extracts data from operational data is true. Data Warehousing lets you create and maintain informational data. Informational data is extracted from the operational database and then cleansed and transformed for end-user decision making. The option stating that Data Warehousing cleans and transforms data for end-user decision making is true. Data Warehousing cleans and transforms the data extracted from operational data for end user decision making. The option stating that Data Warehousing lets you query the warehouse without affecting the operational databases is true. Data Warehousing performs calculations on the operational data and writes the summarized data to a separate database. End users query this separate database (warehouse) without affecting the operational databases. Objective: Planning Sub-Objective: Knowledge of Datawarehouse and OLAP concepts References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Planning Page 60 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 64 Which of the following DB2 components is used to create a federated database environment? { ~ { { DB2 Query Patroller DB2 Relational Connect DB2 Warehouse Manager DB2 Connect Enterprise Edition Explanation: DB2 Relational Connect is used to create a federated database environment. DB2 Relational Connect is an add-on product that allows you to access data stored in different database management systems, such as Oracle, Informix, Sybase, and Microsoft SQL Server databases in conjunction with data that is being managed by DB2 UDB. DB2 Query Patroller is a tool used with the DB2 Warehouse Manager. DB2 Query Patroller prioritizes and schedules queries to balance the query load in the data warehouse environment. DB2 Warehouse Manager extracts, transforms, and loads data into a data warehouse. DB2 Connect Enterprise Edition allows connections between Linux, UNIX, and Windows workstations and mainframe/iSeries database servers. Objective: Planning Sub-Objective: Knowledge of the features in the DB2 tools such as: DB2 Extenders, Configuration Assistant, Visual Explain, Command Center, Control Center, Relational Connect, Replication Center, Development Center, and Health Center References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Planning Page 61 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 65 You need to deploy an application that will access a DB2 UDB database over a Local Area Network (LAN). The database is located on a Solaris server. The OS/390 or OS/400 based clients will access the database using a set of transmission protocols. To deploy the application and allow access to the DB2 server, which of the following is the minimum software requirement for the server? { { { ~ DB2 Connect Enterprise Edition DB2 UDB Workgroup Server Edition DB2 UDB Enterprise Server Edition and DB2 Connect Enterprise Edition DB2 UDB Workgroup Server Edition and DB2 Connect Enterprise Edition Explanation: In this scenario, the minimum software requirement for the server for deploying the client application is the DB2 UDB Workgroup Server Edition and DB2 Connect Enterprise Edition installations. DB2 UDB Workgroup Server Edition is a client-server database management system and can run on a variety of operating systems, including AIX, HP-UX, Solaris, Linux, Windows NT, Windows 2000, and Windows XP. The DB2 UDB Workgroup Server Edition allows remote clients to access databases on the server. DB2 Connect Enterprise Edition (EE) is an add-on product for the DB2 UDB and provides direct connectivity between Linux, UNIX, and Windows workstations and mainframes/iSeries database servers. The option stating DB2 Connect Enterprise Edition only is incorrect because you need to install an edition of DB2 UDB before using DB2 Connect. The option stating DB2 UDB Workgroup server is incorrect because DB2 Connect Enterprise Edition provides connectivity between the Solaris server and the OS/390 or OS/400 clients. To ensure connectivity, both DB2 Connect and DB2 UDB Workgroup must be installed on the DB2 server. The option stating DB2 UDB Enterprise Server Edition is incorrect because the scenario calls requires the minimum amount of software installation. A Limited version of DB2 Connect Enterprise Edition is included in the DB2 UDB Enterprise Server Edition. Therefore, there is no need to separately install DB2 Connect with DB2 UDB Enterprise Server Edition. Objective: Planning Sub-Objective: Knowledge of DB2 UDB products (client, server, etc.) References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Planning Page 62 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 66 Given the following table: WORKROLL WORKERID 1 2 3 1 2 3 HOURS 5 2 4 3 WEEK 1 1 1 2 2 2 Which of the following correctly identifies the result of creating a unique index on the HOURS column? { { ~ { The index will be created successfully as each value is different. The index will be created successfully if the column is marked as not null. The index will NOT be created successfully as there are multiple null values. The index will be created successfully if the column already has a unique constraint. Explanation: The index will not be created successfully as there are multiple null values. Unique indexes only allow a single occurrence of a value in the column list. Unique indexes allow a single null value to be present in the column list. However, presence of a second null value would cause a duplicate in the column list and is not allowed. Unique indexes enforce uniqueness on the column values and do not allow any duplicate values. The option the index will be created successfully as each value is different is incorrect. If there would have been a single null value in the column and no duplicate values, the unique index would have been successfully created. The option the index will be created successfully if the column is marked as not null is incorrect. This is a rule for successfully creating a unique constraint and not unique indexes. Unique indexes allow a single null value to be present in the column on which they are defined. The index will be not be created successfully if the column already has a unique constraint. The DB2 Database Manager automatically creates a unique index for a column having a primary key or a unique constraint if no index already exists. You cannot create additional unique indexes on columns having unique or primary key constraints. Objective: Working with DB2 UDB Objects Sub-Objective: Knowledge to identify characteristics of a table, view or index References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Working with DB2 UDB Objects Page 63 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 67 Which of the following data warehousing tools allows you to track who owns and updates specific business information? { { ~ { Query Patroller Data Warehouse Center Information Catalog Center Query Management Facility Explanation: The DB2 Information Catalog Center contains detailed data about source information. This data includes the type of information, a description of the information, the paths to get to the information, the owner of the information and permissions required to get to the information. Using this data, you can quickly and easily access information stored in the data warehouse. The Query Patroller provides query load management for data warehouses. The Data Warehouse Manager provides the extraction, transformation, and loading (ETL) capabilities for data warehouses. The Query Management Facility is a multipurpose query and reporting tool set for data warehouses. Objective: Planning Sub-Objective: Knowledge of the features in the DB2 tools such as: DB2 Extenders, Configuration Assistant, Visual Explain, Command Center, Control Center, Relational Connect, Replication Center, Development Center, and Health Center References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Planning Page 64 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 68 You have created a new user account, SCOTT, in the database. You need to ensure that the user SCOTT will be able to connect to the database and create and alter objects within his schema. However, the user SCOTT should not be able to drop any objects within his schema. Which of the following combination of privileges should you grant to the user SCOTT? { { { ~ CREATEIN, ALTERIN, DROPIN CONNECT, ALTERIN, DROPIN CONNECT, CREATEIN, DROPIN CONNECT, CREATEIN, ALTERIN Explanation: In this scenario, the CONNECT, CREATEIN, and ALTERIN privileges should be granted to the user SCOTT. The CONNECT privilege will allow the user SCOTT to establish a connection to the database. The CREAETIN schema privilege will allow the user SCOTT to create objects within his schema and the ALTERIN schema privilege will allow the user SCOTT to alter objects within his schema. The CREATEIN, ALTERIN, DROPIN privileges should not be granted to the user SCOTT. The requirement states that the user SCOTT should not be able to drop any objects from his schema. The DROPIN schema privilege will allow the user SCOTT to drop any objects from his schema. Without the CONNECT privilege, the user SCOTT will not be able to connect to the database. The CONNECT, ALTERIN, DROPIN privileges should not be granted to the user SCOTT. The requirement states that the user SCOTT should not be able to drop any objects from his schema. The DROPIN schema privilege will allow the user SCOTT to drop any objects from his schema. Without the CREATEIN privilege, the user SCOTT will not be able to create any objects within his schema. The CONNECT, CREATEIN, DROPIN privileges should not be granted to the user SCOTT. The requirement states that the user SCOTT should not be able to drop any objects from his schema. The DROPIN schema privilege will allow the user SCOTT to drop any objects from his schema. Without the ALTERIN privilege, the user SCOTT will not be able to alter any objects within his schema. Objective: Security Sub-Objective: Knowledge of different privileges References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Security Page 65 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 69 JAN is the owner of the DEPARTMENT table. As the SYSADM, you revoke the CONTROL privilege on the DEPARTMENT table from JAN. What is the effect of revoking the CONTROL privilege? { ~ { { AII the table privileges are revoked from JAN. JAN Ioses the ability to drop the table from the database. JAN Ioses the ability to drop indexes created on the table. JAN Ioses the ability to grant or revoke the CONTROL privilege to other users. Explanation: Revoking the CONTROL privilege on the DEPARTMENT table, will cause JAN to loose the ability to drop the table from the database. The owner of the table is automatically granted the CONTROL privilege along with all other privileges on that table. When the CONTROL privilege is revoked from the owner, all other privileges are not revoked. The CONTROL privilege on the table enables the user to drop the table from the database and grant or revoke all other table privileges to other users and groups in the database. Revoking the CONTROL privilege on the table does not revoke all other table privileges from the owner. AII other table privileges must be explicitly revoked from the user. Users can drop an index from the database if they have the CONTROL privilege on the index. The owner of the index automatically receives the CONTROL privilege on the index. Revoking the CONTROL privilege on the table does not have any effect on the ability of the user to drop the index from the database. Only the users with the SYSADM or DBADM authority can revoke or grant the CONTROL privilege on any object in the database. The owner of the object is not allowed to grant or revoke the CONTROL privilege to other users or groups in the database. Objective: Security Sub-Objective: Knowledge of restricting data access References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Security Item 70 Transaction A is acquiring an Exclusive (X) Iock on the EMPLOYEE table. Transaction B is acquiring an Exclusive (X) lock on the DEPARTMENT table. Transaction A then attempts to acquire an Exclusive (X) Iock on the DEPARTMENT table and Transaction B attempts to acquire an Exclusive (X) Iock on the EMPLOYEE table. Which one of the following statements regarding the deadlock situation is true? { Both of the transactions should release the Exclusive (X) Iock on the tables by performing a rollback or commit operation. { Transaction A should release the Exclusive (X) Iock on the table EMPLOYEE by performing a rollback or commit operation. { Transaction B should release the Exclusive (X) Iock on the table DEPARTMENT by performing a rollback or commit operation. ~ Neither of the transactions will be able to release the Exclusive (X) Iock on the tables by performing a rollback or commit operation. Explanation: The statement neither of the transactions will be able to release the Exclusive (X) Iock on the tables by performing a rollback or commit operation is true about the deadlock situation. If the requesting transaction Page 66 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). is unable to acquire a lock, the transaction undergoes a lock-wait event. During the lock-wait event, all processing by the transaction is suspended. In this scenario, both the transactions will be suspended unless either of the transaction releases the Iock by performing a rollback or commit operation. Neither of the transactions can release the lock by performing a rollback or commit operation because the processing is suspended. This is known as the deadlock situation. The DB2 Universal Database has a background process known as the deadlock detector, which is used to resolve deadlock situations. The deadlock detector wakes up periodically to examine the locking system and detect deadlocks. If a deadlock is detected, the deadlock detector process randomly selects one of the transactions, rolls back all the changes, and terminates the transaction. The transaction selected by the background process receives an SQL error code and all the locks held by the transaction are released. Objective: Data Concurrency Sub-Objective: Knowledge of restricting data access References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Data Concurrency Page 67 of 68 Information Management Certification Sample Test 700 IBM DB2 UDB V8.1 Family Fundamentals (with Explanations). Item 71 Which of the following statements will allow all database users to query data in the ATHLETICS table? { ~ { { GRANT ALTER ON athletics to PUBLIC GRANT SELECT ON athletics TO PUBLIC GRANT CONTROL ON athletics TO PUBLIC GRANT ALL PRIVILEGES ON athletics TO PUBLIC Explanation: The statement GRANT SELECT ON athletics TO PUBLIC will allow all users in the database to read or query the ATHLETICS table. The SELECT privilege also allows you to run the EXPORT utility against the table. The statement GRANT ALL PRIVILEGES ON athletics TO PUBLIC will grant all the table privileges to all the users in the database, which is not the requirement in this scenario. The statement GRANT CONTROL ON athletics TO PUBLIC will grant all the table privileges along with the ability to drop the table from the database to all users. The CONTROL privilege can only be granted or revoked by users who have the SYSADM or DBADM authority. The statement GRANT ALTER ON athletics TO PUBLIC will grant the privilege to alter the table and not select from the table. You need to alter the table if you need to add or remove constraints from the table, add new columns to the table, increase the length of the character data type columns of the table, and create triggers on the table. Objective: Security Sub-Objective: Knowledge of restricting data access References: IBM Press - DB2 Universal Databases V8.1 Certification Exam 700 Study Guide - Security Page 68 of 68