|
一、单选题(共 25 道试题,共 100 分。)V 1. How many rows can be retrieved using a single SELECT INTO statement?: D8 V/ p/ G0 a! c
A. Only one row
1 H3 c4 z5 e- {2 h/ WB. As many as are in the result
f; a! l' Q. Y7 I' o& QC. As many as are host variables used in the call
& W! u7 K, Y# A, I/ C7 \; y- iD. As many as host variable array structures can hold
; U/ z* E- P* x; C% y 满分:4 分& b# J7 Z" E1 B0 V+ M
2. An application uses embedded dynamic SQL to connect to a remote DB2 server and inserts data into the CUST.ORDERS table on that remote DB2 server. To enable access of the remote DB2 server, Administrator FOO needs to create a package with default options such that BAR is the only non-administrative user that can use this package on the remote DB2 server. Which statement describes the privileges that must be granted and/or revoked by FOO to accomplish this?
7 e3 ~* n$ c4 ^A. BAR requires EXECUTE privilege on the package and UPDATE privilege on CUST.ORDERS, and the EXECUTE privilege for the package must be revoked from PUBLIC.4 @7 R3 ~% d5 Q% `1 z/ }* D* `
B. BAR requires EXECUTE privilege on the package and INSERT privilege on CUST.ORDERS, and the EXECUTE privilege for the package must be revoked from PUBLIC.* [2 i$ {* ]% R9 p; \! _! n, k, H
C. BAR requires EXECUTE privilege on the package and INSERT privilege on CUST.ORDERS, and the REFERENCES privilege for the package must be revoked from PUBLIC.
, @* n$ W! h3 R9 G* I) n- G, Y FD. BAR requires EXECUTE privilege on the package and UPDATE privilege on CUST.ORDERS, and the REFERENCES privilege for the package must be revoked from PUBLIC.
# D# N- C5 K: n% E5 o+ b 满分:4 分
4 z+ K3 j0 U* }% I$ E9 r3. 当数据库遭到破坏时,为了能迅速恢复,在进行事务处理过程中将对数据库更新的全部内容写入以下哪项?. D5 `. |; @* Y' Y
A. 副本文件
) v i) K8 _, Y- O3 xB. 日志文件% s ]( r; _1 Q& C% _3 U& l9 @
C. 检查点文件
9 a9 Z: ^# x/ U ^& }D. 死锁文件
# m# I; O: H; w' f 满分:4 分4 a& ?7 D0 y* t
4. 下列SQL语句中,能够实现“收回用户U4对学生表(STUD)中学号(XH)的000权”这一功能的是()$ y2 M) N9 D8 ], J g
A. REVOKE UPDATE(XH) ON TABLE FROM U4
* c: A# N7 w m8 J9 _* UB. REVOKE UPDATE(XH) ON TABLE FROM PUBLIC: m9 X6 M a+ g: N6 ?$ W6 P: X7 Z
C. REVOKE UPDATE(XH) ON STUD FROM U4
6 s* A% C& `4 @0 H7 ~$ J ~/ RD. REVOKE UPDATE(XH) ON STUD FROM PUBLIC- _8 S& a: Z" A; J
满分:4 分' X" y0 W) k# i
5. Given an ODBC/CLI program with a single connection, two threads and the following actions which complete successfully: Thread 1: INSERT INTO mytab VALUES (1) Thread 2: INSERT INTO mytab VALUES (2) Thread 1: COMMIT Thread 2: INSERT INTO mytab VALUES (3) Thread 1: ROLLBACK Thread 2: COMMIT How many records will be inserted and retained in the table MYTAB?
! D+ y" F' t: i4 X: `6 ~) q, SA. 09 ~8 ^1 g4 f2 j- A6 r) Q
B. 19 q( Q' W( M/ ~5 s5 V3 L+ e
C. 2
: ]5 L' t a% H5 dD. 3- M' Y& B6 V, E1 C; ^; ]' I
满分:4 分
9 q; H7 {, o& r+ m' h: s& p0 `6. 下面哪个工具提供了对文本、图象、音频、视频和XML文档等非传统数据类型的处理能力?8 `. S0 Q( r6 E& v4 g q6 u/ M
A. DB2 数据仓库中心9 k% D1 V& Q0 u! n1 ~# G
B. DB2数据链接管理器5 e" Z$ e% N/ v( @6 i
C. DB2关系扩展器
% x2 y2 A+ W1 k$ D8 @8 gD. DB2 OLAP Starter Kit" t0 O1 }1 G/ [1 U+ m
满分:4 分' a' d3 M6 X, Q8 C
7. 下列哪种工具可以向表中增添记录,并更改数据库的统计信息?1 N& X* j* o8 B) p9 c
A. import3 Y2 E+ z, V6 P: e& r" ?: R
B. insert! l# a5 R/ R- e" k. M7 w) t
C. load P, e6 z4 g/ k
D. update
. P; P" r& a% C 满分:4 分0 D( Y0 ?9 B1 U6 l; X; r# ]
8. 向基本表增加一个新列后,原有元组在该列上的值为什么?
1 P, w6 O# G$ `A. TRUE
# Q# B& \4 t/ O. a& J. ~B. FALSE/ [. u! m4 @: i
C. 空值
. K V- U9 D- V0 Q) nD. 不确定; j/ e# F# O' @( g3 r" t+ Q
满分:4 分
- G/ e N" E5 u8 [- M9. 要更改数据库管理器配置文件,需以下哪个数据库权限?
% i4 W9 r! b- oA. DBADM z5 \3 F6 P! U$ ~$ I2 }
B. SYSMAINT
4 n. m2 |4 S; c* Z) |% D" R# FC. SYSCTRL% @! {4 K, E- g5 a _! N6 _, V" N
D. SYSADM
6 W: D# H. B' ^! a 满分:4 分1 `$ |8 J D/ A6 f6 i. y/ v. H; O
10. Given the table T1 with the following data: C1 --- ABC DE and the application code: EXEC SQL DECLARE cur1 CURSOR WITH HOLD FOR SELECT c1 FROM t1 ORDER BY c1 EXEC SQL DECLARE cur2 CURSOR WITH HOLD FOR SELECT c1 FROM t1 ORDER by c1 EXEC SQL OPEN cur1 EXEC SQL OPEN cur2 EXEC SQL FETCH cur1 INTO :hv EXEC SQL FETCH cur1 INTO :hv EXEC SQL FETCH cur2 INTO :hv EXEC SQL COMMIT EXEC SQL FETCH cur2 INTO :hv EXEC SQL FETCH cur2 INTO :hv EXEC SQL FETCH cur1 INTO :hv EXEC SQL CLOSE cur2 EXEC SQL CLOSE cur1 What is the final content of the host variable "hv"?7 j* f/ e4 o5 `& d) R
A. A
. P. B: O1 P" } lB. B
3 w. u( e& b3 d9 u8 G2 sC. C
. q6 x# c: g/ N" g5 z3 ND. D
6 B! i% c" J3 F+ @- b2 @) Q$ O 满分:4 分" w; H" D3 [% Y7 B' m
11. Given the EMPLOYEE table definition: CREATE TABLE employee ( workdept CHAR(30), salary INTEGER ) Which of the following is a correct usage of parameter markers in a JDBC program? {/ _5 A2 V3 s7 \) a1 K
A. String sql = "UPDATE employee SET salary=salary*?WHERE workdept=?"; statement stmt=con.createStatement(sql);) u* g* P4 T# _: }/ m( W
B. String sql = "UPDATE employee SET salary=salary*?WHERE workdept=?"; statement stmt=con.createStatement(sql);
2 t6 z: T# l: ^4 F9 `9 eC. String sql = "UPDATE employee SET salary=salary*?WHERE workdept=?"; statement stmt=con.createStatement(sql);, v2 C; o- g" U+ T/ ^# f
D. String sql = "UPDATE employee SET salary=salary*?WHERE workdept=?"; statement stmt=con.createStatement(sql);; d4 L0 P/ h8 q
满分:4 分
) u3 l( k3 ^! R2 ^# U; [12. Given the tables T1 and T2, each with an INTEGER column: T1 COL1 ----------- 1- 1- 22 T2 COL1 ----------- 1- 2- 22 and the following query that executes successfully: SELECT * FROM T1 LEFT OUTER JOIN T2 ON T1.COL1=T2.COL1 How many rows will the query return?: A+ K: G1 m$ N" e8 N& C
A. 5, C1 ?9 `. v3 c _6 c: [ |% E
B. 60 R' ~' R5 e, K- M) n
C. 10
* {3 C9 e K# B$ U+ R: SD. 36
0 U& n' j1 z/ c4 ?0 N 满分:4 分8 D, _& Z! ^7 s# a8 r; |( \$ f( h
13. E-R图中的联系可以与()实体有关
+ s7 g1 J2 L( bA. 0个
; ^% v+ }! L2 p; C9 QB. 1个7 d7 D2 W/ F" A& k$ z8 s
C. 1个或多个/ G% Z! D0 J9 g, X! Y" m W
D. 多个
3 n; ^. E/ i0 ? m: [ 满分:4 分
+ V/ R i- K5 B1 N% C& E14. 下面哪个工具可以保存终端用户需要存取的元数据?
/ m( {# e. R0 f" L @0 QA. Query Management Facility
3 Q. j8 X j: |& LB. DB2 Query Patroller2 h8 Q6 N3 R3 q4 q
C. DB2存储过程构建器
: {/ k( y0 [+ O( I; XD. 信息目录
% c; `: w" C5 g 满分:4 分) U. A8 o7 V; Z' J: Y
15. 两个子查询的结果(),可以执行并、交、差操作
/ O& R* z( U( _& tA. 结构完全一致
p/ k: Z$ v. U# i: x0 V: _, @7 `B. 结构完全不一致
4 O7 ?+ F( l9 d# O1 E' v) \C. 结构部分一致4 v/ B& t# c3 l* D/ R* I8 m7 F
D. 主键一致
4 Y& j. U+ e0 t) y Q7 \ 满分:4 分
( c/ U/ X2 }) n q V$ K16. 关系数据库管理系统应能实现的专门关系运算包括()4 c9 {' T: d1 V
A. 排序、索引、统计8 \8 c4 G/ j, p, o0 y+ o7 ]
B. 选择、投影、连接) h* z+ t+ I: I% D, M# W
C. 关联、更新、排序
- L% q1 D7 |# t3 h/ dD. 显示、打印、制表
5 t* Q+ `9 _1 b( p 满分:4 分
+ d; ?! Q2 G. w* p! A/ x' q9 j17. 如果选用循环日志方式,辅助日志文件何时分配?
* f9 S8 [: Y7 d2 j! R8 PA. 数据库建立的时候
, g, V9 I& n" T0 I0 ZB. 数据库服务器启动的时候
# O$ p! ?* s [C. 需要的时候
( E( W# H2 v; D. ~ J5 U3 }7 R' MD. 以上都不对2 i* H) o/ z, m
满分:4 分0 o& S; K7 s t, ?0 N& `; d- I
18. Given the expression: WITH most_cities AS ( SELECT b.id,b.name,a.cities FROM country a, staff b WHERE a.person = b.id AND cities > :threshold ) SELECT * FROM most_cities In which of the following does MOST_CITIES exist?2 O& t! o5 ?, i, S2 i- V
A. user tables
0 a$ q% \0 D) ]: I! G k5 [B. server memory: B5 `7 e Z7 l ~- {# A: y
C. user table space2 t% ]7 n- ?8 e+ d+ Z$ t% e2 L
D. system catalog tables: T8 [* k) R# Q, C+ m& U2 k
满分:4 分
2 C9 R' r( r, y4 z% {& E; {8 E4 p- {19. Given the tables T1 and T2 with INTEGER columns: T1 COL1 ----------- 1- 1- 22 T2 COL1 ----------- 1- 2- 22 and the following statement that executes successfully: DELETE FROM t1 WHERE col1 IN (SELECT * FROM t2) How many rows will be left in T1 after running this statement?! p/ p) l4 u6 r! W+ p. W8 R
A. 08 R& K u& h, F, a0 A L7 ^
B. 2
' W9 V; Y/ T1 n+ b, t# a& N" z, pC. 3
$ X. \- Y/ v- V' B, A* pD. 6
0 W: v `/ A2 A; \0 g 满分:4 分, p" v' h0 v- N9 K. N
20. Given the code: EXEC SQL WITH most_cities AS ( SELECT b.id, b.name, a.cities FROM country a, staff b WHERE a.person = b.id AND cities > :threshold ) SELECT id, name, cities FROM most_cities INTO :id, :name, :cities WHERE cities IN (SELECT MAX(cities) FROM most_cities) Which of the following can reference MOST_CITIES?; i1 N O5 A+ ~. V+ g# F
A. The current statement
. b5 \& u9 D' ~; B) m; _ JB. Statements from any application
' x6 x6 x! a' O9 eC. All statements within this application
$ l: U7 r: ]/ X3 `0 @D. All statements within the current unit of work
+ J0 B; t( g7 U3 O& x/ { 满分:4 分! w4 t8 W7 T; R9 |0 ?, x
21. 对于支持小规模的部门级应用,这些应用不需要存取驻留在OS/400、OS/390等平台上的远程数据库,则需要哪种级别的DB2 产品?3 h& |9 V% |' @) h4 C
A. 企业版
7 c N- T' A# ?3 F- aB. 工作组版* ]$ M3 B! v) [) X6 V$ ]# r/ }
C. 企业扩展版
8 l( k r' h" h- |" y8 L- JD. 个人版
( X2 _0 i& ]( R3 |% \) DE. 卫星版
x7 |& _9 x9 qF. 微型版
& j1 l& S+ \; q" B% ]5 L3 v( Y 满分:4 分
; @1 c% [, |3 X% T22. DBMS是()
4 S8 J3 Z5 i5 _8 c9 `0 k( @A. 操作系统的一部分
2 z9 |/ [! r2 C$ D( t( MB. 在操作系统支持下的系统软件 w' b0 R3 i# J8 ]9 f! L% d0 Y1 [) B
C. 一种编译程序 O8 m1 M4 k# g' w$ k
D. 应用程序系统, T# ?. o9 T5 N5 A: H8 B
满分:4 分8 ]- F) q# |8 o
23. 当FROM子句中出现多个基本表或视图时,系统将执行什么操作?
: F; L/ U) q# q, _6 g3 @9 ]- S: |5 lA. 并& [* [4 F- r1 }8 b" _# w% F$ N* S
B. 等值联接$ e0 s. H6 D& M$ B* S* i4 }( n
C. 自然联接
! Y1 l5 `9 n$ z) J" MD. 笛卡儿积
# Q C, X) Y4 U6 v* ]8 O! y+ Y8 t/ @ 满分:4 分
( z) U. D C+ I" `. Z$ `1 s24. 关系模型中的关系模式至少是()
4 e& A0 k4 E7 {/ u' iA. 1NF
h% N9 D' a3 v) ?B. 2NF
& f! c* ?5 ^3 G! M$ e8 ]C. 3NF
! [- ]/ _" s% ~1 A# }D. BCNF
7 E( B+ j5 W$ Y& w& x 满分:4 分
! R8 [: ]% N3 v* H/ J25. 如果想在数据导入的过程中创建表,应该
6 F; T8 N3 C$ a. v$ K/ A( g( }# WA. 使用IXF文件格式进行LOAD+ g1 p; O: s! ?# S+ Y
B. 使用WSF文件格式进行LOAD. @6 P+ |6 y3 U
C. 使用IXF文件格式进行IMPORT
+ r2 F: u' T, z* yD. 使用WSF文件格式进行IMPORT/ b0 I6 S# F2 u1 a1 j t
满分:4 分 8 E: G( v+ B4 x }3 C) e3 O
' Y Y% a" j9 Q5 K, R% `7 X9 n! H
如果资料还未上传请加QQ:1306998094 谢谢 |
|