|
谋学网: www.mouxue.com 主要提供奥鹏作业资料,奥鹏在线作业资料,奥鹏离线作业资料以及奥鹏毕业论文,致力打造中国最专业远程教育辅导社区。
( e) I7 H, }- w8 j) K
! O0 S) q& b: k+ i4 v8 e: r) J# E% M1 \. }% X/ y7 B; K
0 i5 o$ H6 O4 x9 R, g2 }% d& P
$ f% G) Q$ g! o0 u4 V9 V: W
一、单选题(共 25 道试题,共 100 分。)V 1. 对于支持小规模的部门级应用,这些应用不需要存取驻留在OS/400、OS/390等平台上的远程数据库,则需要哪种级别的DB2 产品?
5 Q0 f! n0 |& C* ?( V" R6 kA. 企业版
0 r; t: |) D" {) n4 hB. 工作组版
8 `' j0 G s( P' ?$ J7 M9 P t) \C. 企业扩展版* `; b; \6 s- W+ e% D) `
D. 个人版- B N) c: a, v( G" J* s7 L5 h) A4 |
E. 卫星版4 d1 _, J$ k8 q
F. 微型版1 y, B- E0 ^$ y5 T+ }, c; X
满分:4 分8 [ c/ D* S5 w/ i" R/ m; p2 a: v
2. 下面哪一工具允许用户开发存储过程?; M B% `% a( J8 I/ c6 z* I
A. 控制中心
4 \( m* m) |5 b( ~, E3 HB. 命令中心4 A A( ?& Y& H
C. 任务中心
4 {! n, u2 l1 w% R9 n. UD. 开发中心
# x9 f, r. E' ~5 _ E; wE. 健康中心
6 B! l; t* q+ b% a; ~8 A% z/ E 满分:4 分0 Z; @' q7 a% v7 K
3. SQL语言具有()功能。
! f0 @& c- g S( g/ w- XA. 关系规范化、数据操纵、数据控制+ V" f ?, b( h6 Y( e6 }/ I
B. 数据定义、数据操纵、数据控制
0 j1 c: x/ I0 F1 r, S: YC. 数据定义、关系规范化、数据控制
3 [/ C: `4 F, C" |D. 数据定义、关系规范化、数据操纵5 _0 l% b+ ?7 Y' A- o
满分:4 分1 `" s- o- B0 h
4. 对于UNIX和Intel平台上的数据库应用,如果需要存取OS/400、VM/VSE和OS/390系统上的数据库,需要DB2哪种产品的支持?. K: q) S1 d! L, }, V" O1 D6 R6 N
A. DB2 Connect
; d: G+ w7 E; |& I0 r9 X, w4 |B. DB2 DataPropagator
5 o) a& |3 @6 G7 i5 L1 W& QC. DB2 Net.Data
! ` o, g3 h( ~7 E) m' z4 ^D. DB2 DataJoiner
V1 b0 V5 e: KE. DB2 Relational Connect
) D" B7 U* ]( w: @6 r 满分:4 分0 s) v( s6 x& x9 N: J8 }
5. An ODBC/CLI application has the following pseudocode: SQLAllocHandle( SQL_HANDLE_DBC, hEnv, &hDbc ) SQLConnect( hDbc, "CERTDB", SQL_NTS, "user1", SQL_NTS, "passwd", SQL_NTS ) SQLAllocHandle( SQL_HANDLE_STMT, hDbc, &hStmt ) SQLExecDirect( hStmt, "SET CURRENT SQLID db2cert", SQL_NTS ) Assuming all of the above calls execute successfully, which of the following fully qualified SQL statements is equivalent to: SQLExecDirect( hStmt, "SELECT * FROM user1.table1 t1, table2 t2 WHERE t1.col1=t2.col2", SQL_NTS )! T4 P7 Z' r. a$ B( O: Q
A. SQLExecDirect( hStmt, "SELECT * FROM user1.table1 t1, table2 t2 WHERE t1.col1=t2.col2", SQL_NTS )
' N1 g: f0 e) }; ZB. . SQLExecDirect( hStmt, "SELECT * FROM user1.table1 t1, user1.table2 t2 WHERE t1.col1=t2.col2", SQL_NTS ): j2 s' I5 m) x
C. . SQLExecDirect( hStmt, "SELECT * FROM user1.table1 t1, db2cert.table2 t2 WHERE t1.col1=t2.col2", SQL_NTS )
! G8 y _. y4 [% }3 rD. . SQLExecDirect( hStmt, "SELECT * FROM db2cert.table1 t1, db2cert.table2 t2 WHERE t1.col1=t2.col2", SQL_NTS )4 O& H- d! S8 H( t5 O) B4 ?5 R3 c
满分:4 分$ a% r8 ?# b+ O9 F9 j5 t
6. Which of the following is used to run an embedded dynamic SQL UPDATE statement?: _' C0 D1 E& g6 r* a$ @5 F' X
A. UPDATE$ Q" x7 n- J! p$ z/ g: q8 k
B. . PREPARE
+ o) [% J; J7 t6 h, F$ W; ZC. . DECLARE3 Q) N( c4 |% C( I4 D% S
D. . EXECUTE7 t, @6 Q: ^5 P
满分:4 分" Z) d4 f$ t# O! V8 u
7. 给出下面信息: CREATE TABLE tab1 (c1 char(3) WITH DEFAULT NULL, c2 INTEGER); INSERT INTO tab1(c2) VALUES (‘345’); 如果在命令行处理器(CLP)中执行以下语句,以下哪个结果是正确的? SELECT * FROM tab1;, h- a! H# a. k. Z! D+ o9 f
A. C1 C2 --- ----------- 0 record(s) selected.
! f m n8 v2 C" ZB. C1 C2 --- ----------- 123 345 1 record(s) selected.& e. Z6 d! ^# V9 g. W
C. C1 C2 --- ----------- 345 1 record(s) selected.
* j5 d9 o! A) yD. C1 C2 --- ----------- - 345 1 record(s) selected.
- ?% g8 g3 X% C/ M1 S4 Q: \; b3 D. f 满分:4 分
" V# J5 C0 s3 v' O& }8. Which of the following privileges is required to successfully execute a Java stored procedure that uses JDBC to update several different tables?& L* |+ W E `# W6 j
A. The user must have UPDATE privilege on the referenced tables.5 l5 M5 s% R) b- D0 m: u! H
B. The developer must have EXECUTE privilege on the stored procedure.
# u7 l9 b/ Q" cC. The user must have UPDATE privilege on the referenced tables and EXECUTE privilege on the stored procedure.
9 Q& I, M! L4 ?: C+ X) @. r% V7 q% lD. The developer must have UPDATE privilege on the referenced tables and EXECUTE privilege on the stored procedure.
9 C4 o) Z Q' H) L' ~/ m9 t 满分:4 分
' `- @8 N/ h+ Q8 K# O0 W/ {9. 当FROM子句中出现多个基本表或视图时,系统将执行什么操作?
3 \. h5 z1 L! f* O8 mA. 并1 E' S" e- [- b, F( P- ^
B. 等值联接( \" Z' P0 H3 |5 t0 e. \" Y7 h
C. 自然联接* u! d5 Z1 V7 M% {) I9 n/ P; P
D. 笛卡儿积
% G5 G8 l1 y N# e8 X. x9 C8 }% e 满分:4 分$ o9 }) f, n& |5 f
10. Given the following code: BEGIN ATOMIC UPDATE country SET cities=:count WHERE CURRENT OF C1; INSERT INTO country VALUES(:co11,:co12,:co13); INSERT INTO country VALUES(:co14,:co15,:co16); INSERT INTO country VALUES(:co17,:co18,:co19); INSERT INTO country VALUES(:co110,:co111,:co112); COMMIT; END Given that all statements succeed except the following: INSERT INTO country VALUES(:co17,:co18,:co19); How many rows will be affected in table COUNTRY?
4 ?3 j3 D3 v3 \/ R1 |( X0 ?A. 01 a# Y8 O6 \. W$ H% m% `# l
B. 3: ~9 ~7 A; a6 a& n4 N
C. 4$ e8 R" k' M3 T7 Z H }5 N
D. 5, v: c$ B" Y, {& m4 I+ H
满分:4 分
! e! _; e& c! b; ~8 R11. Which of the following produces a sequentially increasing number, suitable for use as a primary key?
/ a: s( o6 N0 L$ I I+ D2 z4 CA. ROWID data type: w; Z8 ~4 g: b- B0 C8 |6 X
B. Generated IDENTITY column) n: ?: ^* M3 i+ [& e m. m
C. GENERATE_UNIQUE built-in function3 \. O3 H! P) a! K
D. CURRENT SEQUENCE special register
9 p7 A3 p& y9 l$ e, u9 H 满分:4 分
! }2 y; V, W! H. [' T12. 发人员开发访问后台AIX上的DB2的windows程序,需要在windows开发平台上安装:1 M6 R9 Z& i8 [" k6 q
A. DB2运行时间客户端1 J# L C' ? _
B. DB2管理客户端! i0 D! G4 w* z- P3 o
C. DB2应用程序开发客户端! h3 K% G+ v3 @2 E/ `( D
D. DB2瘦客户端
; |/ g" q9 i; [' Q 满分:4 分9 ~1 J- _7 q: d2 X1 W' V
13. 如果需要创建一个表,并把表中的索引数据和其他数据分开存储,则应该
5 f) g8 @4 d0 b$ f& |! ZA. 建立两个SMS表空间分别存储索引数据和其他数据
6 k2 {$ d4 b* U! Y1 B' E, NB. 建立两个DMS表空间分别存储索引数据和其他数据4 }& @; m9 S- z& L
C. 建立一个DMS表空间存储索引数据,再建立一个SMS表空间存储其他数据
b. H% V0 L. \& b! i9 r' N4 qD. 建立一个SMS表空间存储索引数据,再建立一个DMS表空间存储其他数据6 {7 I# |: P- @- K& e: h
满分:4 分
# B* C( X% a# }: Z; w14. 下述关于数据库系统的正确叙述是()8 v- ]1 G% h o, y
A. 数据库中只存在数据项之间的联系$ b5 L6 f3 O3 ?+ M8 M$ D8 q
B. 数据库的数据项之间和记录之间都存在联系
) `4 a4 w, y# r; x6 b: pC. 数据库的数据项之间无联系,记录之间存在联系
9 F3 z. k5 [4 C1 A$ S" F# t8 uD. 数据库的数据项之间和记录之间都不存在联系# u) C" q1 O$ T
满分:4 分7 K9 `* }9 Z4 ?$ P/ c
15. E-R图中的联系可以与()实体有关# A# q* p$ X# `8 ?7 R
A. 0个
0 s4 \; U/ X) X! d) H$ aB. 1个 E H" h$ `7 c2 C
C. 1个或多个
) _! T! {1 |: F- ID. 多个+ M& T* q: c) W$ ?5 u+ K0 m; [
满分:4 分
0 \% q* k6 L4 l* `- U2 F16. Given the table T1 with the following data: COL1 IDX ---- ---- A single-threaded CLI application executes the following pseudocode in sequence: SQLAllocHandle( SQL_HANDLE_ENV, NULL, &hEnv ) SQLAllocHandle( SQL_HANDLE_DBC, hEnv, &hDbc ) SQLConnect( hDbc, "SAMPLE", SQL_NTS, NULL, SQL_NTS, NULL, SQL_NTS ) SQLSetConnectAttr( hDbc, SQL_ATTR_AUTOCOMMIT, SQL_AUTOCOMMIT_ON ) SQLAllocHandle( SQL_HANDLE_STMT, hDbc, &hStmt ) SQLExecDirect( hStmt, "UPDATE table1 SET col1=10 WHERE idx=1", SQL_NTS ) SQLExecDirect( hStmt, "UPDATE table1 SET col1=20 WHERE idx=2", SQL_NTS ) SQLEndTran( SQL_HANDLE_DBC, hDbc, SQL_COMMIT ) SQLExecDirect( hStmt, "UPDATE table1 SET col1=30 WHERE idx=1", SQL_NTS ) SQLExecDirect( hStmt, "UPDATE table1 SET col1=40 WHERE idx=1", SQL_NTS ) SQLEndTran( SQL_HANDLE_DBC, hDbc, SQL_ROLLBACK ) SQLExecDirect( hStmt, "SELECT col1 FROM table1 WHERE idx=1", SQL_NTS ) Which of the following values for COL1 will be fetched when the sequence for the pseudocode listed above is successfully executed?
( R* d6 k% }/ S" fA. 10
! e: b y' }- t9 d" U8 @( IB. 20
, h9 [. v4 R. B: w# @0 JC. 30
2 n0 s, }2 H+ T* q' F$ ?D. 40
2 X2 A3 N, h6 t# K: O 满分:4 分- s3 Q' }8 l1 Q1 e7 M Y
17. Given the tables: COUNTRY id name 1 Argentina 3 Cuba 4 - NATION id name 2 Belgium 4 USA and the code: EXEC SQL DECLARE C1 CURSOR FOR SELECT * FROM country WHERE name IS NOT NULL UNION SELECT * FROM nation EXEC SQL OPEN C1 How many rows are in the result set?
0 V, e) k7 d" W' s1 ~) @% vA. 1
* n( ]3 o* n( B- ]$ z, Z' nB. 2
2 q0 q2 }* L4 q* z2 w6 p4 gC. 3
+ L/ S5 D# }7 H, Q. e/ g3 ]D. 4" d1 {# e" d) L) J
满分:4 分# C, W9 r* \8 Y# j$ c. i) ?3 ^4 `( E, I
18. 要对应用程序预编译并生成绑定文件,需要什么特权?7 z. h+ G% y6 N1 B9 n
A. 数据库上的CONNECT特权
' `# m& ?( }* E% aB. 数据库上的BINDADD特权
U: W& E% z+ EC. 程序包上的BIND特权/ `+ C+ q( R4 {/ P
D. 程序包上的CONTROL特权
! t' P9 P! C3 }3 P 满分:4 分
7 O9 f4 f7 z6 y19. 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?
" d6 H# X! l1 ^; W# ^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.
8 u( \* r6 G4 ~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.# X6 N. F7 L8 D0 g; @( ?8 M
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.' [# E- j+ `8 w* {0 ~8 D
D. 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.2 T. ^ j3 q( h, O: _- I- g
满分:4 分: o' z* L. n _/ b$ B3 p& o
20. 缺省的数据库日志文件的类型是:% C. y; I+ |# Z
A. Circular Log5 B9 M: [. k( f9 ~2 }* ~/ l& {" J
B. Archival Log
# r( B1 Z- _5 }1 ^# x8 o" iC. Primary Log
2 O8 i; p3 b' @! A qD. Secondary log
, V; L: b! \ z7 U 满分:4 分! B! N) K: P( J% }/ i
21. 如果一个用户USER1被授予了表TAB上的CONTROL特权,如果需要限制该用户对表的存取,应使用以下哪条命令?
& T5 B3 F/ a. G6 a) ^A. REVOKE ALL ON TAB TO USER10 a1 L q/ K2 ]& w2 m" k% r
B. REVOKE ALL ON TAB FROM USER1
# e6 N* i b4 uC. REVOKE CONTROL ON TAB TO USER1
2 v& h* G% N2 J @6 [, ^3 C0 W/ N0 ?D. REVOKE CONTROL ON TAB FROM USER1, g' }- D" y4 _$ ~: f5 C$ V
满分:4 分
. `2 l, ~) H1 h) p% v8 A; h22. 如果开发人员在AIX操作系统上开发访问后台AS400上的DB2数据库,则需要在AIX开发环境中安装:()
1 o/ c P1 a, H7 u6 MA. DB2个人开发版(PDE)- [* p* \. [% f" u1 J& b$ I5 ^
B. DB2通用开发版(UDE)
9 F2 o0 D0 V: L# } 满分:4 分. T; I' I, _. w/ h* u. d
23. An application uses static SQL to connect to a remote DB2 server and inserts data into the CUST.ORDERS table on that remote DB2 server. To enable access to the remote DB2 server, FOO needs to create a package with default options so that BAR is the only non-administrative user that can use this package on the remote DB2 server. Which statement describes the privileges that FOO requires to accomplish this?
1 b% J& ^( k# n: }1 mA. FOO requires EXECUTE privilege on the package.% B6 C" e% h, S3 N h$ ?& P* e
B. FOO requires the privilege to create the package on the remote DB2 server.
- n2 f5 q7 v0 u0 G8 ^C. FOO requires EXECUTE privilege on the package and INSERT privilege on CUST.ORDERS.! z2 I. r! o) }1 K% @" m4 O
D. FOO requires the privilege to create the package on the remote DB2 server and INSERT privilege on CUST.ORDERS.
% h; h8 k/ s$ Z4 r4 c 满分:4 分. X' l* _( O2 F. D( ^" m: }( L* w r
24. 设有两个事务T1,T2,其并发操作如下所示: T1: T2: 1) 读A=10,B=5 2) 读A=10 3) 读A=20,B=5 求和25 验证错正确的评价是哪个?7 l7 h1 ~! C7 _9 P7 ]
A. 该操作不存在问题
$ E: E1 c7 Q- n3 z! J' b0 i- PB. 该操作丢失0005 v5 a7 g1 p6 [7 [
C. 该操作不能重复读, v# m8 s2 P- e. N
D. 该操作读“脏”数据
/ c( V) @ W0 b 满分:4 分6 _5 r+ z8 J- A M# H7 y& s
25. Which of the following will retrieve results that will only be in lower case?% J2 r4 b$ m3 c" h. N& Q
A. SELECT NAME FROM EMPLOYEE WHERE NAME='ali'
4 X3 t- ^7 d. R, q) x6 h. G1 PB. SELECT NAME FROM EMPLOYEE WHERE LCASE(NAME)='ali'
5 t. I4 o$ {: D3 J, ?C. SELECT UCASE(NAME) FROM EMPLOYEE WHERE LCASE(NAME)='ali'
/ P9 m$ D: Y6 i1 ]D. SELECT NAME FROM EMPLOYEE WHERE NAME IN (SELECT NAME FROM EMPLOYEE WHERE LCASE(NAME)=LCASE('ALI'))- ~0 M/ L6 Z, t/ a/ `" A2 i
满分:4 分
8 b* r5 p6 X0 R7 |/ N1 M
" J& {) T! U' q5 o, R0 l谋学网: www.mouxue.com 主要提供奥鹏作业资料,奥鹏在线作业资料,奥鹏离线作业资料以及奥鹏毕业论文,致力打造中国最专业远程教育辅导社区。
' S, n( z6 `2 B8 ]$ P2 m4 o |
|