1、DB2考试题库3022IBM DB2 302_21.Which of the following SQL statements can be used to remove data from table users:BA. REMOVE TABLE usersB. DROP TABLE usersC. DELETE TABLE usersD. ALTER TABLE users2.Given the following table definition:SALESSALES_DATE DATESALES_PERSON CHAR(20)REGION CHAR(20)SALES INTEGERWh
2、ich of the following SQL statements will remove all rows that had a SALES_DATE in the year 1995?BA. DELETE * FROM sales WHERE YEAR(sales_date) = 1995B. DELETE FROM sales WHERE YEAR(sales_date) = 1995C. DROP * FROM sales WHERE YEAR(sales_date) = 1995D. DROP FROM sales WHERE YEAR(sales_date) = 19953.W
3、hich of the following is the lowest cost DB2 product that can be legally installed on a windows server that has 4 CPUs capable of performing row compression?AA. DB2 Express EditionB. DB2 Workgroup EditionC. DB2 Express-C EditionD. DB2 Enterprise Edition4.When using a Relational Database, which of th
4、e following does NOT apply?CA. Accesses data using Data Manipulation Language (DML) such as SQL.B. Define your database schema using a Data Definition Language (DDL).C. Data is stored in a hierarchical model.D. You can use normalization to avoid redundant data in your tables.5. Which of the followin
5、g is NOT true about the Information Model?DA. Abstract management of objects at a conceptual level.B. Defines relationships between managed objects.C. Group of descriptions explaining objects of a data model.D. Data models can be used to map an Information Model to a software implementation.5. What
6、is authorization?AA. Authorization is a process that checks whether you have sufficient privileges to perform the desired database operation.B. Authorization is the process where the DBA gathers information to see who will have access to the database.C. Authorization is the process where the DB2 dat
7、abase checks with Windows security to see if you have access to the DB2 database.D. Authorization is a process that validates that you are who you claim to be by verifying your user ID and password.6. Which of the following is FALSE about views?BA. Do not contain real dataB. Any view can be updated,
8、 independent of its definitionC. When changes are made to data through a view, the data is changed in the underlying tableD. Can be used interchangeably with tables when retrieving data7. What are the entities used to model data in the Relational Model?CA. A collection of instances of entities.B. Re
9、lations, attributes and tuplesC. A collection of instances of record types.D. Table, rows and columns8. Which of the following is a tool to configure automatic database backup?AA. Configure Automatic Maintenance wizardB. Design AdvisorC. Explain toolD. EXPORT utility10. Which of the following is a w
10、ell-formed XML document?AA. Amitabh Patel B. Amitabh Patel C. Amitabh Patel D. 没有引号 Jaya Patel 11. When a user is connected to a database, which of the following privileges is required for the user to use a package?CA. BINDB. BINDADDC. EXECUTED. USE12. Which of the following properties is related to
11、 the fact that a committed transaction guarantees that all of the operations are completed and in a roll backed transaction the effect of all operations are reverted?BA. Consistency B. AtomicityC. IsolationD. Durability13. How does automatic storage work in DB2?AA. Automatic storage simplifies stora
12、ge management by allowing you to specify storage paths where the database manager can place table space data, and where the database manager allocates space for various uses.B. Automatic storage is an option which is set when you create a DB2 database. It allows transactions that are written to the
13、database to be automatically committed.C. Automatic storage is a function of DB2 that allows tables to be backed up automatically on a set schedule.D. Automatic Storage can be used to automatically reorganize the data on the physical media in order to improve performance.14. Application B wants to r
14、ead a subset of rows from table EMPLOYEE multiple times inside the same transaction.BA. Currently CommittedB. Read StabilityC. Repeatable ReadD. Uncommitted Read15. Which of the following is true about a well-formed XML document?CA. Has one or more root nodesB. Tags can have at most one attribute.C.
15、 Always has a single document node.D. End tags are optional.16. Which Data Model was created with the focus of providing better data independence?AA. RelationalB. HierarchicalC. SemanticD. Network17. Which of the following is NOT a supported type of trigger?CA. AFTERB. BEFOREC. DURINGD. INSTEAD OF18
16、. Which of the following statements is FALSE about transactions?AA. Operations inside a transaction are executed in parallel.B. Only 1 COMMIT statement can be executed inside the same transaction.C. Transactions guarantee atomicity of a group of operations.D. A ROLLBACK or COMMIT statement finalizes
17、 a transaction.19. After the following SQL statement is executed:GRANT ALL PRIVILEGES ON TABLE student TO USER user1Assuming user USER1 has no other authorities or privileges, which of the following actions is USER1 allowed to perform?DA. Grant all privileges on table STUDENT to other users.B. Drop
18、a view associated to the table STUDEN.C. Drop the table STUDENT.D. None of the above.20. A Dirty Read occurs when?CA. A transaction read the same row of data twice and returns different data values with each read.B. A search based on some criterion returns additional rows after consecutive searches
19、during a transaction.C. Uncommitted data is returned, but the transaction that originated them was rolled back.D. Two transactions read and then attempt to update the same data, the second update will overwrite the first update before it is committed.21. Given the following two tables: TAB1COL_1 COL
20、_2- -A 10B 12C 14 TAB2COL_A COL_B- -A 21C 23D 25Assuming the following results are desired:COL_1 COL_2 COL_A COL_BA 10 A 21B12 - -C14 C 23- -D 25Which of the following joins will produce the desired results?DA. SELECT * FROM tab1 INNER JOIN tab2 ON col_1 = col_aB. SELECT * FROM tab1 LEFT OUTER JOIN
21、tab2 ON col_1 = col_aC. SELECT * FROM tab1 RIGHT OUTER JOIN tab2 ON col_1 = col_aD. SELECT * FROM tab1 FULL OUTER JOIN tab2 ON col_1 = col_a22. Which of the following is true about columns?CA. Each column consists of one or more recordsB. Columns are where the individual pieces of information are st
22、ored for each recordC. Columns must be designated a specific data typeD. Columns are also known as records23. Given the options below, which of the following statements can add records to a table?CA. ADDRECB. ADDRECORDC. INSERTD. ADD24. If TAB1 is created using the following statementCREATE TABLE ta
23、b1 ( col1 INTEGER NOT NULL, col2 CHAR(3), CONSTRAINT cst1 CHECK (col1 in (1, 2, 3, 4)Which of the following statements will successfully insert a record into table TAB1?CA. INSERT INTO tab1 VALUES (0, a)B. INSERT INTO tab1 VALUES (NULL, abc)C. INSERT INTO tab1 VALUES (4, a)D. INSERT INTO tab1 VALUES
24、 (4, abcdefhijklmnopq)25. Given the following UPDATE statement:UPDATE employees SET workdept = (SELECT deptno FROM department WHERE deptno = A01) WHERE workdept IS NULLWhich of the following describes the result if this statement is executed?BA. The statement will fail because an UPDATE statement ca
25、nnot contain a subqueryB. The statement will only succeed if the data retrieved by the subquery does not contain multiple recordsC. The statement will succeed; if the data retrieved by the subquery contains multiple records, only the first record will be used to perform the updateD. The statement wi
26、ll only succeed if every record in the EMPLOYEES table has a null value in the WORKDEPT column26. A company has a large amount of data to store and wants to be able to do the following with the data: Have a standard interface for accessing the data. Have multiple users with the ability to insert, up
27、date and delete data. Make changes to the data without risk of losing data and its consistency. Have the capability to handle huge volumes of data and users. Have tools for data backup, restore and recovery.What data storage method is the most optimal solution for the company?DA. Text filesB. Comma
28、delimited data filesC. SpreadsheetsD. Database27. Consider the following scenario. You have 3 tables with the same name (TABLE_1) under 3 different schemas (SYSIBM, DEFAULT and DB2INST1). You are connected to a DB2 database in your Linux server as db2inst1 and issue the following statement: SELECT *
29、 FROM table_1Which table will you be selecting data from:AA. You get an error because your query is ambiguous, as the table schema is not specifiedB. SYSIBM.table_1C. DEFAULT.table_1D. DB2INST1.table_128. Which of the following statements grants user John the ability to insert data to table tab1?DA. GRANT ADD ON TABLE tab1 TO JohnB. GRANT INSERT ON TABLE tab1 TO JohnC.
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1