奥鹏作业答案-谋学网-专业的奥鹏在线作业答案辅导网【官网】

 找回密码
 会员注册

微信登录,扫一扫

手机号码,快捷登录

VIP会员,3年作业免费下 !奥鹏作业,奥鹏毕业论文检测新手作业下载教程,充值问题没有找到答案,请在此处留言!
2022年5月最新全国统考资料投诉建议,加盟合作!点击这里给我发消息 点击这里给我发消息
奥鹏课程积分软件(2021年最新)
查看: 2269|回复: 0

吉大12春《数据库应用技术》在线作业一

[复制链接]
发表于 2012-3-31 13:49:14 | 显示全部楼层 |阅读模式
谋学网
谋学网: www.mouxue.com 主要提供奥鹏作业资料,奥鹏在线作业资料,奥鹏离线作业资料以及奥鹏毕业论文,致力打造中国最专业远程教育辅导社区。' Q$ h4 H. q5 _

+ ^. ~( R. p: Y7 g7 P( W# ?) U7 W# c* |8 y6 y( \
一、单选(共 25 道试题,共 100 分。)V 1.  下列那种隔离级对于只读操作不在数据行上加锁?5 _5 W4 _# A' ~
A. RR
( n5 |  {( o8 S9 `2 X, Z# ~B. RS
( V/ q. w+ `9 f( a8 sC. CS
1 ^/ Y/ o5 j1 J5 ]7 XD. UR( |0 m* C* r4 J8 [, Z/ F3 S
      满分:4  分9 `; Q: {* Q; U# U* Q/ W
2.  对于支持小规模的部门级应用,这些应用不需要存取驻留在OS/400、OS/390等平台上的远程数据库,则需要哪种级别的DB2 产品?
" ^+ T* V2 N% W1 @' Z; b6 _& x! tA. 企业版! @' i, \4 J' A- ^( }, {
B. 工作组版
; G9 }7 X; t$ ]& t1 IC. 企业扩展版
! A( v2 b) o5 q7 B/ _/ l/ r0 vD. 个人版' j" g: [/ O% Z
E. 卫星版( G7 K" {( B- V4 C3 c5 I# ^
F. 微型版
8 N2 p, B! K& S7 z      满分:4  分3 J3 E0 }3 ~3 {6 [8 j- A$ {* O0 ]$ q
3.  Which of the following is a benefit of user-defined functions?
+ b0 M% l' k5 c" w0 A- @, `0 W; B% wA. Improves application concurrency
# ~! r( W9 A) L0 ^B. Improves blocking of result sets8 U: }# M! U! X8 [% ]
C. Simplifies application maintenance1 k: p) H2 z$ i  U: J" q8 a
D. Reduces memory requirements on the server
* H" N  t; p' L' w* \5 Q# J' m      满分:4  分7 @6 x8 J# g% _& j
4.  使用DROP语句撤消基本表时,使用以下哪个子句,可以将下属的视图和约束引用全部撤消?
# N# N% L4 I. |, H4 fA. NULL4 i% b- P2 r3 A) z
B. RESTRICT+ s- Q2 U" ]* g& x* c# x
C. CASCADE% ]! \) @/ [; L2 d  z' `, F& M
D. DISTINCT0 O/ S2 J% n3 ~5 J
      满分:4  分- ^; P" z2 `# g, s$ T$ _
5.  Given the table T1 containing an INTEGER column: C1 --- 1 A multithreaded ODBC/CLI application successfully executes the following pseudocode in sequence: Thread 1:SQLConnect(hDbc1,"CERTDB",SQL_NTS,"",NULL,"",NULL); Thread 2:SQLConnect(hDbc2,"CERTDB",SQL_NTS,"",NULL,"",NULL); Thread 1: SQLSetConnectAttr( hDbc1, SQL_ATTR_AUTOCOMMIT, SQL_AUTOCOMMIT_ON); Thread 2: SQLSetConnectAttr( hDbc2, SQL_ATTR_AUTOCOMMIT, SQL_AUTOCOMMIT_ON); Thread1:SQLA11ocHandle(SQL_HANDLE_STMT,hDbc1,&hStmt1); Thread2:SQLA11ocHandle(SQL_HANDLE_STMT,hDbc2,&hStmt2); Thread 1: SQLExecDirect( hStmt1, "SAVEPOINT sp1 ON ROLLBACK RETAIN CURSORS",SQL_NTS); Thread 1:SQLExecDirect(hStmt,"INSERT INTO T1 VALUES(2)",SQL_NTS); Thread 2: SQLExecDirect( hStmt2, "SAVEPOINT sp1 ON ROLLBACK RETAIN CURSORS",SQL_NTS); Thread2:SQLExecDirect(hStmt2,"INSERT INTO T1 VALUES(3)",SQL_NTS); Thread1:SQLExecDirect(hStmt1,"INSERT INTO T1 VALUES(4)",SQL_NTS); Thread2:SQLExecDirect(hStmt2,"ROLLARBACK TO SAVEPOINT spl",SQL_NTS); Thread2:SQLExecDirect(hStmt2,"INSERT INTO T1 VALUES(4)",SQL_NTS); Which result set would be returned by: Thread 2: SQLExecDirect( hStmt2, "SELECT c1 FROM t1 ORDER BY C1", SQL_NTS );
1 v  U% n& E" x" w$ wA. 1,57 r+ A7 h7 t9 p
B. 1,2,5
. d5 S( d. X4 l; lC. 1,2,4,58 \) c. p- G  p* f5 C. G
D. 1,2,3,4
2 s" S- l5 n/ }3 [/ l+ ?5 V+ f      满分:4  分
$ c0 P+ |' W7 q3 k9 |, I+ H6.  如果开发人员在AIX操作系统上开发访问后台AS400上的DB2数据库,则需要在AIX开发环境中安装:()
+ E. P3 w# |; p, q6 \A. DB2个人开发版(PDE): r- x- G4 W- }3 Z; c( B
B. DB2通用开发版(UDE)1 T" f8 E) L# s6 Z1 {
      满分:4  分- o# e% o8 [" U) q+ M3 t
7.  A cursor is declared with the WITH HOLD option. Which of the following statements is always true?3 M/ y+ c& O& J* m, e+ E
A. The cursor will remain open after a COMMIT.% u6 V1 {- K9 R
B. All rows retrieved are locked until a COMMIT.: W# E2 L* U% g" J5 ]" L# e
C. A COMMIT will not be allowed until the cursor is closed.
, F1 y/ I8 A1 P5 L: E- ^D. Locks obtained by the cursor will be kept after a COMMIT.
! Q% \' d, z1 C/ g2 q9 C. l- {      满分:4  分- E+ R( Y2 W7 U# N: F
8.  Given the following table: CREATE TABLE employee (name CHAR(10), salary DEC NOT NULL WITH DEFAULT) INSERT INTO employee (name, salary) VALUES ('SMITH', 30000) INSERT INTO employee (name) VALUES ('JONES') INSERT INTO employee (name, salary) VALUES ('ALI', 35000) Which of the following statements will retrieve more than one row?
- |6 E! x8 {! ~3 G3 F+ ?5 w0 YA. SELECT salary FROM employee WHERE salary IN (SELECT (salary/(SELECT SUM(salary) FROM employee)) FROM employee)
& F3 A4 k5 i, J) @! cB. SELECT COALESCE(AVG(salary)) FROM employee
$ L0 x3 X% l- {6 t5 ?C. SELECT SUM(salary)/COUNT(*) FROM employee
0 v& H  k5 }8 [6 {# mD. SELECT salary/(SELECT SUM(salary) FROM employee) FROM employee
: r4 F- v3 ^5 _* u      满分:4  分
3 N2 ~: N7 b0 M9.  To prepare an embedded SQL program for use with a host-language compiler, which of the following database components is required?
; l8 q0 Z% |! g. F1 gA. Binder" D7 @9 ]# m( K( o% \# d+ j
B. Precompiler
, ]# g" g2 q. \* G! NC. Stored Procedure Builder
) ^  F; V. T$ z; N7 o+ c% _D. Application Development Center
" b0 `7 R9 I% t9 w4 A# F      满分:4  分
  e) U% ?+ `0 M10.  实体是信息世界中的术语,与之对应的数据库术语为:()
+ L, J; P0 z2 n" `8 F* A; Q" iA. 文件
6 P2 X4 j3 G& L7 W( eB. 数据库( T. L6 c) k' X5 n' u
C. 字段: s, M5 j# q) ]( p
D. 记录
- k: M/ |  I0 ^& O+ P      满分:4  分+ @( p4 P( V  V# s# w
11.  E-R图中的联系可以与()实体有关
; [1 \+ U: [% F1 r4 Z8 i4 sA. 0个
' ?& j! z2 v7 j+ k( VB. 1个: ]" N1 r; q8 V5 t
C. 1个或多个
: P( n- p2 q7 y+ U& lD. 多个
! Q, q' P. h  e* H2 n      满分:4  分8 K3 \3 Y- N" P- U
12.  设有两个事务T1,T2,其并发操作如下所示: T1: T2: 1) 读A=10,B=5 2) 读A=10 3) 读A=20,B=5 求和25 验证错正确的评价是哪个?
: x2 o( i* A# h1 H1 }A. 该操作不存在问题+ r! \$ v# A3 t
B. 该操作丢失000
. z8 \1 H2 _; t. @. b8 ~/ l7 C9 TC. 该操作不能重复读6 L. ^8 O1 ^$ Z+ U( r& ^+ e
D. 该操作读“脏”数据
6 R* L# r1 T* d6 _" m0 h      满分:4  分
* H3 Z- v* q( w- c% s% X13.  An ODBC/CLI application performs an array insert into a table containing a primary key. If one of the values inserted generates a duplicate row error, which of the following APIs can be called to determine the failing row?$ u9 z& l& F( ?6 X& ^2 [, ~
A. SQLError()
- _' G7 V; s& A. C" f  Y) I6 @( lB. SQLNumRows()
* g7 t: Y, f6 y# B+ n% v) bC. SQLRowCount()
+ B. D, K0 {- M- \/ }D. SQLGetDiagField()
; H6 t- W: Q" Q6 Y      满分:4  分
' E! j/ X3 ^7 j2 I9 V14.  Which of the following produces a sequentially increasing number, suitable for use as a primary key?
% L0 K+ U. R! p( h, rA. ROWID data type
+ q& J' i8 [1 W( Z& f. E! _B. Generated IDENTITY column9 B' j7 c/ L8 ^
C. GENERATE_UNIQUE built-in function4 e2 ^* r! \/ Y5 `9 g9 R2 A
D. CURRENT SEQUENCE special register# p/ z0 ]) p4 {$ D$ A  q
      满分:4  分
# I& J& s- e; q7 C9 c15.  Given the table T1 with the following data: C1 C2 -- -- 1 1 2 2 An application issues the following SQL statements with AUTOCOMMIT disabled: UPDATE t1 SET c1 = 10 WHERE c2 = 1 UPDATE t1 SET c1 = 20 WHERE c2 = 2 SAVEPOINT sp1 UPDATE t1 SET c1 = 30 WHERE c2 = 1 UPDATE t1 SET c1 = 40, c2 = 3 WHERE c2 = 2 SAVEPOINT sp1 UPDATE t1 SET c1 = 50 WHERE c2 = 1 UPDATE t1 SET c1 = 60 WHERE c2 = 2 ROLLBACK TO SAVEPOINT sp1 UPDATE t1 SET c1 = 50 WHERE c2 = 3 COMMIT What is the result of the following query? SELECT c1, c2 FROM t1 ORDER BY c2
8 R: d) m3 W/ c) Y9 EA. 10 1 20 2; S, X' v$ ]; q0 E4 C9 X
B. 30 1 50 3  i3 c5 y9 V: n; c
C. 30 1 40 34 r: s0 i, j* s2 C2 F
D. 10 1 50 3- P) ?7 V' V& O4 ~2 i9 i
      满分:4  分
# L/ U7 n0 r# K5 |* Y16.  两个子查询的结果(),可以执行并、交、差操作* T/ @  [& L7 g' @! s  v0 q
A. 结构完全一致% k- K6 k& u5 \
B. 结构完全不一致
4 K7 U7 w7 V. x/ ]5 A3 CC. 结构部分一致
7 j$ \4 D/ O6 P  a) `D. 主键一致
. S  J( o" N# F# y# S      满分:4  分' B7 v8 ~; \6 L, B" k
17.  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?/ }# ^! h8 y. W
A. 106 f: z* r4 c- h$ C9 X. f, V
B. 20
( }/ v" @2 G+ a) S; v1 S4 ]: l" oC. 30
. Q* n& k1 W: O/ f  s: B, CD. 405 A7 b3 r9 y9 @3 H2 m
      满分:4  分
! h2 R. A2 d! R% q$ j  v( N18.  Given the following statements: EXEC SQL INSERT INTO employee VALUES(:new_emp, :new_name) EXEC SQL UPDATE company SET num_employees=num_employees+1 WHERE company_id=1 EXEC SQL COMMIT Which of the following can be added to the database so that the company table will still be updated without the need for the explicit UPDATE SQL statement?! J7 @, f2 }2 l. P
A. An INSERT trigger on COMPANY& [9 e% p1 W& ]# G' J. b
B. An UPDATE trigger on COMPANY
2 }3 q  R) b' C* DC. An INSERT trigger on EMPLOYEE
& [" }% V; _2 z( h) k; f; fD. An UPDATE trigger on EMPLOYEE2 t0 X# k+ b& f+ _. m' G5 r
      满分:4  分; H5 b" w* j1 t; ?
19.  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?8 ~( @0 {; A" ^% \/ Q# v& s  S
A. 04 K( t4 l* D" C* c2 O9 d
B. 1
: O$ U4 Y8 }2 g- T2 J9 v% t* fC. 29 O7 P" F* f2 X* |, w$ A3 j
D. 3
( G3 d2 N+ D0 D$ A5 e& E, B      满分:4  分
1 i+ [3 J. o$ E! |* s20.  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?
8 R2 M! K6 T; k. V# f0 A3 Q0 P2 F! vA. user tables0 x4 Q* F7 b" K, {0 T2 Y2 m, h( v: C
B. server memory
+ j+ z% i0 ?, `( oC. user table space
# E( @$ x/ ^/ jD. system catalog tables
% f3 R# j9 u( {. D$ v; s7 e      满分:4  分
; m' f# n4 Q( T+ H5 e, F# z21.  Given the table T1, created using the following statement: CREATE TABLE t1 ( id INTEGER GENERATED BY DEFAULT AS IDENTITY, c1 CHAR(3) ) The following SQL statements are issued: INSERT INTO t1 VALUES (2, 'def') INSERT INTO t1 VALUES (DEFAULT, 'abc') INSERT INTO t1 VALUES (DEFAULT, 'ghi') Which of the following represents the order in which the values are returned from the following SELECT statement? SELECT id FROM t1 ORDER BY id$ f4 {6 _5 B: q% e
A. 1, 2, 2
, F+ p4 @# Y! v: V( Y' AB. 1, 2, 38 G, F# k) n8 g3 w8 D
C. 2, 3, 4
+ T1 ]* Y/ M4 z4 SD. 0, 1, 2" \) I% ?3 s2 S+ u* \, H
      满分:4  分
/ h- ?+ M. a. |# Y22.  在客户端直接连接到DB2 UDB服务器的环境中,服务器端的认证类型为以下哪个时,在编目时指定的认证类型不一定要与服务器端认证参数的值相匹配。
1 P1 R4 P1 R+ l! c3 r& rA. SERVER_ENCRYPT
9 L! ?3 m3 Q1 z' xB. DCE7 \) d7 e0 M/ Q1 L& Z
C. DCE_SERVER_ENCRYPT
! ?; f8 m0 `! M$ @D. KERBEROS5 J) C9 _; I7 H* b, m$ n
      满分:4  分! f  l* m: B/ j' O1 P4 S% H
23.  Which of the following is TRUE for all cursors defined as FOR FETCH ONLY?
6 Q. Y" g- [: j( PA. The cursors are unambiguous.
2 s' K8 T+ R  Y1 w, v+ E+ _- R7 H8 ]B. Only the first row is returned.
8 i+ s# K( {4 ~; p/ J% _- Z; K5 MC. Cursor stays open after a commit.
2 G& n! g+ \; r+ ~# T5 W) oD. A temporary table is created on the server.. j5 v0 R& `7 t# Z9 y. I4 l; D
      满分:4  分
! Y3 \. {" F% [1 ]24.  The following commands are issued against a data source containing table user2.org: CREATE ALIAS user1.org FOR sample.org CREATE TABLE org.sample ( c CHAR(1)) CREATE ALIAS sample.org FOR user2.org CREATE ALIAS user2.sample FOR sample.org Given the user SAMPLE issues the following statement: SELECT * FROM sample For which of the following database objects will access be attempted?
2 v8 H6 Y6 a- w. ?# RA. user2.org
  i) C# y8 @; ~- q9 H# d  Y! G* TB. org.sample: R  Y& B- C' [0 r2 e6 J
C. sample.org
% M) r- |' G; UD. sample.sample
6 g# _( i1 }  ~      满分:4  分
/ ~5 W4 M6 v" D! J; C( k3 t2 Z25.  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?
8 ~& m. f' [1 N  {0 u+ MA. The current statement- ]& n: G0 s3 ]/ ^/ h+ r
B. Statements from any application; \% H% M# V" Z: W! _
C. All statements within this application
8 q' f) c1 t4 J3 Z) PD. All statements within the current unit of work5 W* m4 z. l8 [. A) D/ @
      满分:4  分
! q' `; w' T! m: B: s. b2 y/ Q: f0 b! o# i; r6 s- ^) o1 X, N
谋学网: www.mouxue.com 主要提供奥鹏作业资料,奥鹏在线作业资料,奥鹏离线作业资料以及奥鹏毕业论文,致力打造中国最专业远程教育辅导社区。
8 {. J! R+ ?  M. ~/ H

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?会员注册

×
奥鹏作业答案,奥鹏在线作业答案
您需要登录后才可以回帖 登录 | 会员注册

本版积分规则

 
 
客服一
客服二
客服三
客服四
点这里给我发消息
点这里给我发消息
谋学网奥鹏同学群2
微信客服扫一扫

QQ|关于我们|联系方式|网站特点|加入VIP|加盟合作|投诉建议|法律申明|Archiver|小黑屋|奥鹏作业答案-谋学网 ( 湘ICP备2021015247号 )

GMT+8, 2024-3-29 19:51 , Processed in 0.115926 second(s), 24 queries .

Powered by Discuz! X3.5

Copyright © 2001-2023 Tencent Cloud.

快速回复 返回顶部 返回列表