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

 找回密码
 会员注册

微信登录,扫一扫

手机号码,快捷登录

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

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

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

6 `! E- x3 {0 ?' Z: b; c0 E6 A6 M2 n! a9 y
一、单选(共 25 道试题,共 100 分。)V 1.  下列那种隔离级对于只读操作不在数据行上加锁?+ E: P2 M7 t2 [  a  l& G
A. RR" A% H9 n* d1 R" J2 J
B. RS
  Z& p& i* B& }- d9 M: EC. CS4 h+ M0 s3 C  y6 |" n9 m0 b
D. UR
9 D7 b4 Q" [% G& G5 g, |6 z      满分:4  分+ r+ [/ M9 ~1 s: K% n! g
2.  对于支持小规模的部门级应用,这些应用不需要存取驻留在OS/400、OS/390等平台上的远程数据库,则需要哪种级别的DB2 产品?
# b# l( d& m9 B, [! I; RA. 企业版
" H0 h* h0 S# t" ]B. 工作组版" r$ g7 F, I( d' `7 v
C. 企业扩展版
2 I1 ]- ], D% r! e1 rD. 个人版
/ H8 o; ~# D7 O7 m$ a1 U' p- P4 BE. 卫星版( d. q* k7 B( M' j
F. 微型版
" k* s; m0 p! k* n# d2 K      满分:4  分
& K8 Y3 P' q: |( \6 U! ?% L% Y3.  Which of the following is a benefit of user-defined functions?( v( D3 G& Y5 @& M
A. Improves application concurrency
3 i) y3 D1 Q4 F/ I% M7 FB. Improves blocking of result sets! u2 O) L$ R% m4 W8 k. e: e+ [
C. Simplifies application maintenance$ m# j0 c1 U. t' E& P" l
D. Reduces memory requirements on the server
+ b& ]5 y7 I* f4 r      满分:4  分
$ E# T; Q! r, b! x8 N4.  使用DROP语句撤消基本表时,使用以下哪个子句,可以将下属的视图和约束引用全部撤消?4 D$ `+ b/ \8 z  I4 ?% R: `
A. NULL
8 x  x! p  ^9 j7 |6 t7 VB. RESTRICT  ~; @: i- S* G
C. CASCADE2 e) e" x$ F" ~9 ]8 J1 O8 X6 l
D. DISTINCT% B6 [. @  z% u: R* J
      满分:4  分1 b) {# R  `( @
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 );
# H; Y( U# o: O* @4 Y: nA. 1,5
0 D1 ^6 {1 D1 F/ Z$ f8 E# gB. 1,2,5
  p- v3 M3 R: h/ RC. 1,2,4,5
7 b3 n* M" R/ [9 ~8 m3 Q% `) xD. 1,2,3,45 V* j0 ?3 m- C: ^' C! N
      满分:4  分$ \5 w+ |9 o' U1 T7 s
6.  如果开发人员在AIX操作系统上开发访问后台AS400上的DB2数据库,则需要在AIX开发环境中安装:()- W% g+ K# F. X% V4 w8 z
A. DB2个人开发版(PDE)1 y4 h* W2 q- |- A
B. DB2通用开发版(UDE)
4 L" s8 `. g3 S& [: V5 \! ]  Y- }      满分:4  分
% ^3 w! C2 E! J! @8 S* |7.  A cursor is declared with the WITH HOLD option. Which of the following statements is always true?4 Z6 x; ~- S' V  \- y' X1 A
A. The cursor will remain open after a COMMIT.
/ a; N' t9 A! zB. All rows retrieved are locked until a COMMIT.. X$ C4 G" x7 w/ p9 Z/ s: `8 `
C. A COMMIT will not be allowed until the cursor is closed.% l' [# C& n. |: z
D. Locks obtained by the cursor will be kept after a COMMIT.; S; G) j9 x9 c2 z
      满分:4  分
0 C6 }9 r% c" a8.  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?
1 ^& ~: c' H; e" z8 ?) H8 e- O; KA. SELECT salary FROM employee WHERE salary IN (SELECT (salary/(SELECT SUM(salary) FROM employee)) FROM employee)
% ^, e5 l1 n9 `0 h+ M+ _B. SELECT COALESCE(AVG(salary)) FROM employee
+ {6 F! n6 a, o) K5 l6 K+ B( tC. SELECT SUM(salary)/COUNT(*) FROM employee+ }0 V, V, V0 A# i7 \9 e  H; J
D. SELECT salary/(SELECT SUM(salary) FROM employee) FROM employee
# `, v( i' ~6 y1 i2 _      满分:4  分' n6 G9 I( S" r6 L: b7 O
9.  To prepare an embedded SQL program for use with a host-language compiler, which of the following database components is required?
& A0 e0 n6 F2 x( n1 b1 _A. Binder5 C3 {. X- R$ {& R5 d2 R7 p
B. Precompiler& Y+ F. @: z  r" ^' v4 y; Q
C. Stored Procedure Builder
/ n" B8 V9 h4 \D. Application Development Center
2 M  |8 O! z4 {* B  B      满分:4  分0 o: N8 e- [! |$ h
10.  实体是信息世界中的术语,与之对应的数据库术语为:()) x" ^9 B$ Q0 u- R  B
A. 文件
; J: V3 o4 o) x# p. t$ `# [* NB. 数据库
0 Y2 s+ c/ a* ~4 w; GC. 字段
+ d- o1 Q3 u. S1 H) ID. 记录- B' L* k# |  x) S. [$ W
      满分:4  分( k: Z9 _5 Z' w/ K% F& n& }# ^2 k
11.  E-R图中的联系可以与()实体有关
$ F  l, V4 i8 w. L, B% K' tA. 0个
, G- D1 N1 ]; D$ ^B. 1个
2 S4 @: r2 h: g. l" u1 Y! F- NC. 1个或多个
" F7 Z' T: J  G. P% k2 d) ED. 多个; K. }& M7 t( W9 C$ b
      满分:4  分. G1 P4 R0 ?  v
12.  设有两个事务T1,T2,其并发操作如下所示: T1: T2: 1) 读A=10,B=5 2) 读A=10 3) 读A=20,B=5 求和25 验证错正确的评价是哪个?2 i" K! n) P0 D/ z: h
A. 该操作不存在问题
& a' G# z' f2 }# CB. 该操作丢失000
' y# ^. l( P7 t& o5 e: VC. 该操作不能重复读& C* C) r5 }5 ~+ C) {9 ?  {
D. 该操作读“脏”数据
0 I9 {- f# |% @4 A& t# M9 J) L" t" c5 q      满分:4  分
' }1 r' W* ]" N: n& d* Q* M% n13.  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?* Q: Y' W" t  ^) h3 M' |( d! {
A. SQLError()
5 n: a! h: O% s& HB. SQLNumRows()
$ {. ]+ x/ j9 \( U1 y! T" uC. SQLRowCount()( B. E7 w& p; D* [3 X+ H8 w8 {  ~
D. SQLGetDiagField()0 ]; |, _* I" X
      满分:4  分3 ?8 ?5 J0 n# T8 k& ?+ X% @
14.  Which of the following produces a sequentially increasing number, suitable for use as a primary key?
7 L7 I5 F! o5 q  R5 g5 dA. ROWID data type
) X7 U7 P4 Z, X; g" ^+ T9 Y% wB. Generated IDENTITY column' X0 l1 Y: `- d: O! w- {2 q4 y
C. GENERATE_UNIQUE built-in function
# {$ U- N5 Y0 nD. CURRENT SEQUENCE special register
1 l% ]1 T+ c% c, ~- a9 _      满分:4  分# j4 D+ g2 D- _$ G' n
15.  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 c26 T) k' k% J+ i$ \
A. 10 1 20 2% Q$ i( @: \+ }( U9 A& w
B. 30 1 50 3
, m* l' V5 S* l1 kC. 30 1 40 3* n+ @# z& W3 N& Y9 [* k
D. 10 1 50 34 O9 h0 ]; ?; U5 Z. n
      满分:4  分
& h- Q. D# s2 J$ W4 I16.  两个子查询的结果(),可以执行并、交、差操作, o6 Z* v$ e6 `5 l
A. 结构完全一致( u& q- k2 X6 p
B. 结构完全不一致2 A2 p$ L: S; S5 u
C. 结构部分一致
. U( v$ E& J9 A% d8 z& X+ gD. 主键一致" U' g2 `3 ^, Y# c1 d
      满分:4  分
# x) ^  f2 V8 p% K! t! R17.  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?- c! W* }5 r. R3 O# c# B7 D
A. 10& J- P" O4 \5 `. e
B. 202 v1 T( ]' ^2 S4 f" ~3 c
C. 30
% b, j0 S, U/ iD. 400 T2 g5 D6 E$ U# }0 w
      满分:4  分! k& H0 T! k4 E5 R
18.  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?
: F6 p* c7 P6 bA. An INSERT trigger on COMPANY
) }! M5 z; i7 ~  aB. An UPDATE trigger on COMPANY. m1 r2 c8 S. ~! W1 g
C. An INSERT trigger on EMPLOYEE
) `/ {3 g$ A: |* ?) JD. An UPDATE trigger on EMPLOYEE
# m/ I( f  F$ T4 i4 a" c" _      满分:4  分, A/ J1 V7 ]% e$ \2 K& H
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?
& N* W1 p  p' D, UA. 0" W; u. G: w$ u" A7 A# a3 U2 Q
B. 1
! h8 f9 i+ B, L. [! t$ a# ~1 TC. 28 s# w; z. c/ W) N8 B' i
D. 3( H2 B: Y3 y4 D' Y# C2 N( }7 V& s
      满分:4  分9 i+ k! Y* x" p; T
20.  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?! @* [% T& M; P8 T
A. user tables
' n. ?, i4 o7 \& l9 WB. server memory
0 P+ u! q) }) BC. user table space
4 n$ K' R9 [% p$ K1 y& lD. system catalog tables" f4 g( G1 V5 |. V2 f' r
      满分:4  分& }: i* O( X# ?0 j) r' u
21.  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
. B* o2 g3 K; E& ?A. 1, 2, 2, C9 s# }7 E! q8 M+ R; N
B. 1, 2, 3
9 L7 u# O" f; _C. 2, 3, 45 a* M" e3 ^  C  h! Y$ f9 {
D. 0, 1, 24 k! m3 u4 [& c# }" O
      满分:4  分; G3 u/ _* b$ B
22.  在客户端直接连接到DB2 UDB服务器的环境中,服务器端的认证类型为以下哪个时,在编目时指定的认证类型不一定要与服务器端认证参数的值相匹配。
  f% |2 Z+ K+ {. _1 G9 |3 PA. SERVER_ENCRYPT
5 w0 X$ h* ?. F- Y& pB. DCE
  M1 h+ A8 I3 q8 Y) |3 mC. DCE_SERVER_ENCRYPT' t4 P% B0 ?. B$ F! d- h* v
D. KERBEROS
* k, K( o) h1 Y/ ^+ c9 w: N& ^& _      满分:4  分
/ D1 v) N/ V1 s2 q' q; W) H23.  Which of the following is TRUE for all cursors defined as FOR FETCH ONLY?/ U5 O' ]- H( @$ ]* }
A. The cursors are unambiguous.
' `- x* [$ Q! e  P/ Y$ RB. Only the first row is returned.' W4 J) B- e5 E+ G
C. Cursor stays open after a commit.
  w% ~! ?1 e$ m: J' ?& XD. A temporary table is created on the server.$ b! t" ?. `8 J
      满分:4  分5 P. S2 b# c' S4 R
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?
! [  N+ B' j. ~9 d  M1 tA. user2.org, |+ i+ L7 c' p. X
B. org.sample
( ~: A9 N3 c: D' B$ m/ @C. sample.org
8 X5 V& D" d7 N8 ND. sample.sample$ W' e1 G2 d1 [4 u: H3 }
      满分:4  分. b& N1 O  b1 Y/ d+ R1 i, @( W) b
25.  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?
( d! i8 }& P$ p2 c# R+ lA. The current statement
+ c% I( W4 I- W5 aB. Statements from any application
2 r9 p0 }! J) Q2 u& EC. All statements within this application
& z( b' w! ^: [1 A6 V  hD. All statements within the current unit of work
* \/ s# d$ d( X% y: j- c      满分:4  分
# e$ K# V7 @0 c
) _* N6 U8 g9 ?" a  d' A: X4 F谋学网: www.mouxue.com 主要提供奥鹏作业资料,奥鹏在线作业资料,奥鹏离线作业资料以及奥鹏毕业论文,致力打造中国最专业远程教育辅导社区。7 q" U( X0 d* u" F8 A

本帖子中包含更多资源

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

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

本版积分规则

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

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

GMT+8, 2024-12-24 03:39 , Processed in 0.117696 second(s), 23 queries .

Powered by Discuz! X3.5

Copyright © 2001-2023 Tencent Cloud.

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