Isabella
---- I fell upon the thorn of life, I bleed.
1.Which of the following can be used to store images in a DB2 database?
 A. DB2 AVI Extender
 B. DB2 XML Extender
 C. DB2 Text Extender
 D. DB2 Spatial Extender

2. Which of the following statements will create an index and prevent table T1 from containing two or more rows with the same values for column C1?
 A. CREATE UNIQUE INDEX ix1 ON t1 (c1)
 B. CREATE DISTINCT INDEX ix1 ON t1 (c1)
 C. CREATE UNIQUE INDEX ix1 ON t1 (c1,c2)
 D. CREATE DISTINCT INDEX ix1 ON t1 (c1,c2)

3. Given a SELECT statement that has a GROUP BY clause.
The HAVING clause uses the same syntax as which other clause?
 A. WHERE
 B. UNION
 C. SUBQUERY
 D. ORDER BY

4. A developer is building an embedded SQL application on AIX that will access DB2 UDB for OS/390 or OS/400 servers. 
Which of the following products is required to be installed on the AIX system in order to build the application?
 A. DB2 Connect Personal Edition
 B. DB2 Personal Developer's Edition
 C. DB2 UDB Workgroup Server Edition
 D. DB2 Universal Developer's Edition

5. A table has had check constraint enforcement turned off, and additional data has been inserted. Which of the following will perform data validation to ensure that column values are valid?
 A. Add a trigger
 B. Collect statistics
 C. Reorganize the table
 D. Enable check constraints

6. A table called EMPLOYEE has the following columns: name, department, and phone_number. Which of the following can limit read access to the phone_number column?
 A. Using a view to access the table
 B. Using a referential constraint on the table
 C. Revoking access from the phone_number column
 D. Defining a table check constraint on the table

7.The table STOCK has the following column definitions: 

type         CHAR(1) 
status       CHAR(1) 
quantity    INTEGER 
price        DEC (7,2) 

items are indicated to be out of stock by setting STATUS to NULL and QUANTITY and PRICE to zero.
Which of the following statements updates the STOCK table to indicate that all the items except for those with TYPE of "S" are temporarily out of stock?
  A. UPDATE stock SET status='NULL', quantity=0, price=0 WHERE type <>; 'S'
  B. UPDATE stock SET (status, quantity, price) = (NULL, 0, 0) WHERE type <>; 'S'
  C. UPDATE stock SET (status, quantity, price) = ('NULL', 0, 0) WHERE type <>;'S'
  D. UPDATE stock SET status = NULL, SET quantity=0, SET price = 0 WHERE type <>;'S'

8. Given the following statements:
CREATE TABLE t4 
(c1 INTEGER NOT NULL, 
c2 INTEGER, 
c3 DECIMAL(7,2) NOT NULL, 
c4 CHAR(20) NOT NULL); 
CREATE UNIQUE INDEX i4 ON t4(c1,c3);
ALTER TABLE t4 ADD PRIMARY KEY (c1,c3); 
Which of the following statements is TRUE?
 A. The ALTER TABLE statement will fail.
 B. The primary key will use the I4 unique index.
 C. A primary index will need to be created on the composite key (C1,C3).
 D. An additional unique index will automatically be created on the composite key (C1,C3).

9. Which of the following isolation levels will hold locks only on the rows in the answer set at the end of the query?
 A. Read Stability
 B. Repeatable Read
 C. Cursor Stability
 D. Uncommitted Read

10. Given the tables: 
COUNTRY 
ID  NAME  PERSON  CITIES  
1  Argentina  1 10  
2 Canada 2 20 
3 Cuba  2 10 
4 Germany  1 0 
5 France  7 5 
STAFF 
ID  LASTNAME  
1  Jones  
2  Smith  
How many rows would be returned using the following statement? 
SELECT * FROM staff, country
 A. 0
 B. 2
 C. 5
 D. 7
 E. 10

11. Given the following SQL statement:
GRANT EXECUTE ON PACKAGE proc1 TO usera WITH GRANT OPTION 
Which two of the following describe what USERA is allowed to do?
 A. Execute SQL statements in package PROC1
 B. Grant any privilege on package PROC1 to other users
 C. Grant bind privilege on package PROC1 to other users
 D. Grant execute privilege on package PROC1 to other users
 E. Access all of the tables referenced in package PROC1 from any program

12. USER2 has SELECT WITH GRANT OPTION on APPL.TAB1.
Which of the following statements is USER2 authorized to execute?
 A. GRANT INSERT ON TABLE appl.tab1 TO user8
 B. GRANT SELECT ON TABLE appl.tab1 TO user8
 C. GRANT REFERENCES ON TABLE appl.tab1 user8
 D. GRANT ALL PRIVILEGES on TABLE appl.tab1 TO user8
 
13. Given the following transaction in an embedded SQL application: 
CREATE TABLE dwaine.mytab (col1 INT, col2 INT) 
INSERT INTO dwaine.mytab VALUES (1,2)
INSERT INTO dwaine.mytab VALUES (4,3)
ROLLBACK 
What is the result of issuing the following statement? 
SELECT * FROM dwaine.mytab
 A. SQLCODE -204 indicating that "DWAINE.MYTAB" is an undefined name.
 B. COL1  COL2 
------------  -----------  
  0 record(s) selected. 
C. COL1 COL2 
------------ ----------- 
1 2 1 record(s) selected. 
D. COL1 COL2 
------------ ----------- 
1 2 
4 3 2 record(s) selected.

14.Given the table: 

STAFF 
ID     LASTNAME 
1       Jones 
2      Smith 
3      <null>; 
Which of the following statements removes all rows from the table where there is a NULL value for LASTNAME? 
  A. DELETE FROM staff WHERE lastname IS NULL 
  B. DELETE FROM staff WHERE lastname = 'NULL' 
  C. DELETE ALL FROM staff WHERE lastname IS NULL 
  D. DELETE ALL FROM staff WHERE lastname = 'NULL'

15.Given the following statements: 
CREATE TABLE t1 (id INTEGER, CONSTRAINT chkid CHECK (id<100)) 
INSERT INTO t1 VALUES (100) 
COMMIT 
Which of the following occurs as a result of issuing the statements? 
  A. The row is inserted with ID having a NULL value. 
  B. The row is inserted with ID having a value of 100. 
  C. The row insertion with a value of 100 for ID is rejected. 
  D. The trigger called chkid is activated to validate the data.
 
16.A stored procedure has been created with the following statement: 
CREATE PROCEDURE P1(IN VAR1 INTEGER, OUT VAR2 VARCHAR(10))... 
From the command line processor (CLP), which is the correct way to invoke this procedure? 
  A. RUN P1 (10, ?) 
  B. CALL P1 (10, ?) 
  C. SELECT P1 (10, ?) 
  D. EXECUTE P1 (10, ?)
 
17.Cataloging a remote database server from a Linux, UNIX, or Windows gateway is: 
  A. performed to identify the location of the clients. 
  B. performed to identify the server the DB2 database manager is on. 
  C. never performed in DB2, as only one database per node is allowed, so cataloging a node automatically catalogs the database at that node. 
  D. performed on a Linux, UNIX, or Windows machine to open the catalogs in the DB2 database server and present a user with a list of all accessible tables in that database.
 
18.An application using the Repeatable Read isolation level acquires an update lock. When does the update lock get released?
  A. When the cursor accessing the row is closed
  B. When the transaction issues a ROLLBACK statement 
  C. When the cursor accessing the row is moved to the next row 
  D. When the transaction changes are made via an UPDATE statement

19.Given a read-only application that requires consistent data for every query, which of the following isolation levels should it use to provide the most concurrency with other applications doing updates? 
  A. Read Stability 
  B. Repeatable Read 
  C. Cursor Stability 
  D. Uncommitted Read
 
20.Which of the following statements eliminates all but one of each set of repeated rows in the final result table?
  A. SELECT UNIQUE * FROM t1 
  B. SELECT DISTINCT * FROM t1 
  C. SELECT * FROM DISTINCT T1 
  D. SELECT UNIQUE (*) FROM t1 
  E. SELECT DISTINCT (*) FROM t1

21.A business has a requirement that a row not be deleted from the parent table if a row with the corresponding key value still exists in the child table. Which of the following delete rules would enforce this requirement? 
  A. DELETE 
  B. CASCADE 
  C. RESTRICT 
  D. SET NULL

22.When constraint checking is suspended or disabled, a table or table space (depending on platform) is placed in which of the following states? 
  A. Paused 
  B. Check pending 
  C. Intent locked 
  D. Constraint waiting

23.Which of the following DB2 components allows references to Oracle and DB2 databases in a single query? 
  A. DB2 Query Patroller 
  B. DB2 Warehouse Manager 
  C. DB2 Relational Connect 
  D. DB2 Connect Enterprise Edition
 
24.Which of the following has an object tree from which you can perform administrative tasks against database objects? 
  A. Control Center 
  B. Command Center
  C. Command Line Processor 
  D. DB2 Administration Client

25.Which two of the following SQL data types should be used to store double byte character data?(two) 
  A. CLOB 
  B. CHAR 
  C. DBCLOB 
  D. GRAPHIC 
  E. VARCHAR

 26.When using DB2 Connect, which of the following commands specifies the protocol information on how to connect to the host or to the server? 
  A. CATALOG DCS 
  B. CATALOG NODE
  C. CATALOG DATABASE 
  D. CATALOG ODBC DATA SOURCE

27.A client application on OS/390 or OS/400 must access a DB2 server on Linux. At a minimum, which of the following products is required to be on the DB2 server? 
  A. DB2 Connect Enterprise Edition 
  B. DB2 UDB Enterprise Server Edition 
  C. DB2 Connect Enterprise Edition and DB2 UDB Workgroup Server Edition 
  D. DB2 Connect Enterprise Edition and DB2 UDB Enterprise Server Edition

28.A stored procedure has been built and deployed on the DB2 UDB server machine. What is the minimum software that must be installed to allow an application on the client to execute the stored procedure?  
  A. DB2 Runtime Client 
  B. DB2 Personal Edition 
  C. DB2 Administration Client 
  D. DB2 Application Development Client

29.Given that table T1 needs to hold specific numeric values up to 99999.99 in column C1. 
  A. REAL 
  B. INTEGER 
  C. NUMERIC(7,2) 
  D. DECIMAL(5,2)
 
 30.Which of the following is a valid wildcard character in a LIKE clause of a SELECT statement? 
  A. * 
  B. _ 
  C. @ 
  D. ?
 
31.What is the difference between a unique index and a primary key? 
  A. They are different terms for the same concept. 
  B. Unique indexes can be defined over multiple columns.Primary keys must have only one column. 
  C. Unique indexes can be defined in ascending or descending order. Primary keys must be ascending. 
  D. Unique indexes can be defined over a column or columns that allow nulls. Primary keys cannot contain nulls

32.SQL source statements for which two of the following are stored in the system catalog?(2)
  A. Views 
  B. Tables 
  C. Indexes 
  D. Triggers 
  E. Constraints

 33.Given the following transaction in an embedded SQL application: 
CREATE TABLE dwaine.mytab (col1 INT, col2 INT) 
INSERT INTO dwaine.mytab VALUES (1,2) 
INSERT INTO dwaine.mytab VALUES (4,3) 
ROLLBACK 
What is the result of issuing the following statement? 
SELECT * FROM dwaine.mytab 
  A. SQLCODE -204 indicating that "DWAINE.MYTAB" is an undefined name. 
  B. COL1  COL2 
------------  -----------  
  0 record(s) selected.  
  C. COL1 COL2 
------------ ----------- 
1 2 1 record(s) selected.  
  D. COL1 COL2 
------------ ----------- 
1 2 
4 3 2 record(s) selected. 
 
34.Given that table T1 needs to hold specific numeric values up to 99999.99 in column C1. 
  A. REAL 
  B. INTEGER 
  C. NUMERIC(7,2)
   D. DECIMAL(5,2)
 
35.CREATE TABLE tab1 (c1 CHAR(3) WITH DEFAULT '123',c2 INTEGER); 
INSERT INTO tab1(c2) VALUES (123); 
Which will be the result of the following statement when issued from the Command Line Processor? 
SELECT * FROM tab1; 
  A. C1 C2 
--- ----------- 
0 record(s) selected. 
  B. C1 C2 
--- ----------- 
123 123 
1 record(s) selected. 
  C. C1 C2 
--- ----------- 
      123
1 record(s) selected. 
  D. C1 C2 
--- ----------- 
- 123 
1 record(s) selected.
 
36.Which two of the following SQL data types should be used to store double byte character data?(2) 
  A. CLOB 
  B. CHAR 
  C. DBCLOB 
  D. GRAPHIC 
  E. VARCHAR

 37.Which of the following can be used to store images in a DB2 database? 
  A. DB2 AVI Extender 
  B. DB2 XML Extender 
  C. DB2 Text Extender 
  D. DB2 Spatial Extender
 
38.CREATE TABLE tab1 (c1 CHAR(1)) 
INSERT INTO tab1 VALUES ('b') 
CREATE VIEW v1 AS SELECT c1 FROM tab1 WHERE c1='a' WITH CHECK OPTION 
INSERT INTO v1 VALUES ('a') 
INSERT INTO v1 VALUES ('b') 
How many rows would be returned from the statement, SELECT c1 FROM tab1? 
  A. 0 
  B. 1 
  C. 2 
  D. 3

39.A user creates the table TABLE1 with a referential constraint defined over column COL1. Which of the following statements would explicitly give USER1 the ability to read rows from the table? 
  A. GRANT SELECT ON TABLE table1 TO user1 
  B. GRANT ACCESS ON TABLE table1 TO user1 
  C. GRANT REFERENCES TO user1 ON TABLE table1 
  D. GRANT UPDATE (col1) TO user1 ON TABLE table1

40.A declared temporary table is used for which of the following purposes? 
  A. To store intermediate results 
  B. To share result sets between applications 
  C. To provide an area for database manager sorts 
  D. To create a backup copy of a database or table space

41.Which of the following statements will create an index and prevent table T1 from containing two or more rows with the same values for column C1? 
  A. CREATE UNIQUE INDEX ix1 ON t1 (c1) 
  B. CREATE DISTINCT INDEX ix1 ON t1 (c1) 
  C. CREATE UNIQUE INDEX ix1 ON t1 (c1,c2) 
  D. CREATE DISTINCT INDEX ix1 ON t1 (c1,c2)
 
42,Which of the following can duplicate the structure and related objects of a database table? 
  A. Copy table 
  B. Alter table
  C. Export table
  D. Generate DDL

43.A unit of work is using an isolation level of Uncommitted Read, and allows scanning through the table more than once within the unit of work. Which of the following can occur during processing of this unit of work? 
  A. It can access uncommitted changes made by other transactions. 
  B. It can update uncommitted changes made by other transactions. 
  C. It can update rows and have those updated rows be changed by other transactions from one scan to the next. 
  D. It can update rows and have those updated rows be committed by other transactions from one scan to the next.
 
44.Given the following tables: 

NAMES    
Name  Number  
Wayne Gretzky 
Jaromir Jagr 
Bobby Orr 
Bobby Hull 
Brett Hull 
Mario Lemieux 
Steve Yzerman 
Claude Lemieux 
Mark Messier 
Mats Sundin  99 
68 

23 
16 
66 
19 
19 
11 
13  
    
POINTS    
Name  Points  
Wayne Gretzky 
Jaromir Jagr 
Bobby Orr 
Bobby Hull 
Brett Hull 
Mario Lemieux  244 
168 
129 
93 
121 
189  
    
PIM    
Name  PIM  
Mats Sundin 
Jaromir Jagr 
Bobby Orr 
Mark Messier 
Brett Hull
Mario Lemieux 
Joe Sakic  14 
18 
12 
32 
66 
23 
94  
Which of the following statements will display the name, number, points and PIM for players with an entry in all three tables? 
  A. 
SELECT names.name, names.number, points.points, pim.pim FROM names INNER JOIN points ON names.name=points.name INNER JOIN pim ON pim.name=names.name 
  B. 
SELECT names.name, names.number, points.points, pim.pim FROM names OUTER JOIN points ON names.name=points.name OUTER JOIN pim ON pim.name=names.name 
  C. 
SELECT names.name, names.number, points.points, pim.pim FROM names LEFT OUTER JOIN points ON names.name=points.name LEFT OUTER JOIN pim ON pim.name=names.name 
  D. 
SELECT names.name, names.number, points.points, pim.pim FROM names RIGHT OUTER JOIN points ON names.name=points.name RIGHT OUTER JOIN pim ON pim.name=names.name 

45.Given the following table definitions: 
DEPARTMENT 
deptno         CHAR(3) 
deptname     CHAR(30) 
mgrno I        NTEGER 
admrdept     CHAR(3) 

EMPLOYEE 
empno         INTEGER 
firstname     CHAR(30) 
midinit         CHAR 
lastname      CHAR(30) 
workdept    CHAR(3) 

Which of the following statements will produce a result set satisfying these criteria? 
* The empno and lastname of every employee 
* For each employee, include the empno and lastname of their manager 
* Includes employees both with and without a manager 
  A. 
SELECT e.empno, e.lastname FROM employee e LEFT OUTER JOIN (department INNER JOIN employee m ON mgrno = m.empno) ON e.workdept = deptno 
  B. 
SELECT e.empno, e.lastname, m.empno, m.lastname FROM employee e LEFT INNER JOIN (department INNER JOIN employee m ON mgrno = m.empno) ON e.workdept = deptno 
  C. 
SELECT e.empno, e.lastname, m.empno, m.lastname FROM employee e LEFT OUTER JOIN (department INNER JOIN employee m ON mgrno = m.empno) ON e.workdept = deptno 
  D. 
SELECT e.empno, e.lastname, m.empno, m.lastname FROM employee e RIGHT OUTER JOIN (department INNER JOIN employee m ON mgrno = m.empno) ON e.workdept = deptno 

46.Given the following table definition and SQL statements: 
CREATE TABLE table1 (col1 INT, col2 CHAR(40), col3 INT) 
GRANT INSERT, UPDATE, SELECT, REFERENCES ON TABLE table1 TO USER usera 
Which of the following SQL statements will revoke the privileges granted to user USERA on COL1 and COL2? 
  A. REVOKE UPDATE ON TABLE table1 FROM USER usera 
  B. REVOKE ALL PRIVILEGES ON TABLE table1 FROM USER usera 
  C. REVOKE ALL PRIVILEGES ON TABLE table1 COLUMNS (col1, col2) FROM usera 
  D. REVOKE REFERENCES ON TABLE table1 COLUMNS (col1, col2) FROM USER usera
 
47. Which of the following processes is NOT performed by DB2 Warehouse Manager?
  A. Query 
  B. Loading 
  C. Extraction 
  D. Transformation
 
48.Which of the following DDL statements creates a table where employee IDs are unique? 
  A. CREATE TABLE t1 (employid INTEGER) 
  B. CREATE TABLE t1 (employid INTEGER GENERATED BY DEFAULT AS IDENTITY)  
  C. CREATE TABLE t1 (employid INTEGER NOT NULL) 
  D. CREATE TABLE t1 (employid INTEGER NOT NULL PRIMARY KEY)

49.Which of the following can duplicate the structure and related objects of a database table? 
  A. Copy table 
  B. Alter table 
  C. Export table 
  D. Generate DDL


posted on 2008-09-12 11:37  李昀璟  阅读(438)  评论(0)    收藏  举报