77范文网 - 专业文章范例文档资料分享平台

吉大16秋学期《数据库应用技术》在线作业一

来源:网络收集 时间:2018-12-08 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

奥鹏17春吉大16秋学期《数据库应用技术》在线作业一

一、单选题(共 25 道试题,共 100 分。)

1. 对于UNIX和Intel平台上的数据库应用,如果需要存取OS/400、VM/VSE和OS/390系统上的数据库,需要DB2哪种产品的支持? A. DB2 Connect

B. DB2 DataPropagator C. DB2 Net.Data D. DB2 DataJoiner

E. DB2 Relational Connect 正确答案:

2. A cursor is declared with the WITH HOLD option. Which of the following statements is always true?

A. The cursor will remain open after a COMMIT. B. All rows retrieved are locked until a COMMIT.

C. A COMMIT will not be allowed until the cursor is closed. D. Locks obtained by the cursor will be kept after a COMMIT. 正确答案:

3. 发人员开发访问后台AIX上的DB2的windows程序,需要在windows开发平台上安装: A. DB2运行时间客户端 B. DB2管理客户端

C. DB2应用程序开发客户端 D. DB2瘦客户端 正确答案:

4. Given the following table: TestTable C1 ----------- 12345 And if the following CLI calls are made: SQLAllocHandle(SQL_HANDLE_ENV,SQL_NULL_HANDLE,&henv); SQLSetEnvAttr( henv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER) SQL_OV_ODBC3,0); SQL AllocHandle(SQL_HANDLE_DBC,henv,&hdbc); SQLConnect( hdbc, (SQLCHAR *)\SQL_NTS, (SQLCHAR *)\SQL_NTS, (SQLCHAR *)\SQL_NTS ); SQLSetConnectAttr( hdbc, SQL_ATTR_AUTOCOMMIT, SQL_AUTOCOMMIT_OFF, 0); SQLAllocHandle(SQL_HANDLE_STMT,hdbc,&hstmt); SQLPrepare(hstmt,(unsigned char*)\*from Test order by C1',SQL_NTS); SQLBindCol(hstmt,1,SQL_C_SHORT,&data,0,NULL); SQLExecute(hstmt); SQLFetch(hstmt); printf(Data:%i\\n\SQLFetch(hstmt); printf(Data:%i\\n\SQLFetch(hstmt); printf(Data:%i\\n\SQLEndTran(SQL_HANDLE_ENV,henv,SQL_COMMIT); SQLFetch(hstmt); printf(Data:%i\\n\Which of the following will be returned by the program?

A. Data: 1 Data: 2 Data: 3 Data: 3 B. Data: 1 Data: 2 Data: 3 Data: 4

C. Data: 1 Data: 2 Data: 3 Data: 1 D. Data: 1 Data: 2 Data: 3 Data: 5 正确答案:

5. The following commands are issued against a data source: CREATE TABLE userid.org ( i INT) CREATE ALIAS user1.org FOR userid.org CREATE TABLE org.sample ( c CHAR(1)) CREATE ALIAS sample.org FOR userid.org CREATE ALIAS userid.sample FOR sample.org When issued by USER1, which of the following statements will have a different result set than this SELECT statement? SELECT * FROM org A. SELECT * FROM org.sample B. SELECT * FROM sample.org C. SELECT * FROM userid.org D. SELECT * FROM userid.sample 正确答案:

6. DBMS是() A. 操作系统的一部分

B. 在操作系统支持下的系统软件 C. 一种编译程序 D. 应用程序系统 正确答案:

7. 嵌入式SQL语句中引用共享变量时,必须在变量名前加什么标志? A. 号 B. 分号 C. 句号 D. 冒号 正确答案:

8. 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. 5 B. 6 C. 10 D. 36

正确答案:

9. Given the tables: COUNTRY STAFF id name person cities id name 1 Argentina 1 10 1 Aaron 2 Canada 2 20 2 Adams 3 Cuba 2 10 3 Jones 4 Germany 1 0 5 France 3 5 6 Italy 1 5 the report: id name number_of_countries ---------- ---------- ------------------- 1 Aaron 3 and the SQL statement: SELECT B.id,B.name,COUNT(DISTINCT A.name) AS number_of_countries FROM country A, staff B WHERE B.id=A.person GROUP BY B.id,B.name HAVING COUNT(DISTINCT A.name)>:count_var Which of the following values does :count_var require to print out the above report? A. 1 B. 2 C. 3 D. 4

正确答案:

10. Which of the following is used to run an embedded dynamic SQL UPDATE statement? A. UPDATE B. . PREPARE C. . DECLARE D. . EXECUTE 正确答案:

11. How many rows can be retrieved using a single SELECT INTO statement? A. Only one row

B. As many as are in the result

C. As many as are host variables used in the call

D. As many as host variable array structures can hold 正确答案:

12. 下面哪个工具可以帮助用户对语句性能进行分析? A. 可视化解释工具 B. 性能监视器 C. 命令行处理器 D. 控制中心 正确答案:

13. 下列那种隔离级对于只读操作不在数据行上加锁? A. RR B. RS C. CS D. UR

正确答案:

14. 给定三个表:学生表S,课程表C和学生选课表SC,它们的结构分别如下: S(S#,SN,SEX,AGE,DEPT) C(C#,CN) SC(S#,C#,GRADE)其中:S#为学号,SN为姓名,SEX为性别,AGE为年龄,DEPT为系别,C#为课程号,CN为课程名,GRADE为成绩。检索选修课程“C2”的学生中成绩最高的学生的学号,正确的SELECT语句是哪个?

A. SELECT S# FROM SC WHERE C#=“C2” AND GRADE >= (SELECT GRADE FROM SC WHERE C#=” C2”)

B. SELECT S# FROM SC WHERE C#=”C2” AND GRADE IN (SELECT GRADE FROM SC WHERE C#=”C2”)

C. SELECT S# FROM SC WHERE C#=”C2” AND GRADE NOT IN (SELECT GRADE FROM SC WHERE C#=”C2”)

D. SELECT S# FROM SC WHERE C#=”C2” AND GRADE>=ALL (SELECT GRADE FROM SC WHERE C#=”C2”) 正确答案:

15. Which of the following is a benefit of user-defined functions? A. Improves application concurrency B. Improves blocking of result sets C. Simplifies application maintenance

D. Reduces memory requirements on the server

正确答案:

16. 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, \SQL_NTS, NULL, SQL_NTS, NULL, SQL_NTS ) SQLSetConnectAttr( hDbc, SQL_ATTR_AUTOCOMMIT, SQL_AUTOCOMMIT_ON ) SQLAllocHandle( SQL_HANDLE_STMT, hDbc, &hStmt ) SQLExecDirect( hStmt, \TE table1 SET col1=10 WHERE idx=1\TE table1 SET col1=20 WHERE idx=2\SQL_NTS ) SQLEndTran( SQL_HANDLE_DBC, hDbc, SQL_COMMIT ) SQLExecDirect( hStmt, \TE table1 SET col1=30 WHERE idx=1\SQL_NTS ) SQLExecDirect( hStmt, \SQLEndTran( SQL_HANDLE_DBC, hDbc, SQL_ROLLBACK ) SQLExecDirect( hStmt, \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? A. 10 B. 20 C. 30 D. 40

正确答案:

17. 如果选用循环日志方式,辅助日志文件何时分配? A. 数据库建立的时候

B. 数据库服务器启动的时候 C. 需要的时候 D. 以上都不对 正确答案:

18. 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? A. The current statement

B. Statements from any application C. All statements within this application

D. All statements within the current unit of work 正确答案:

19. 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? A. user2.org B. org.sample C. sample.org

D. sample.sample 正确答案:

20. 要对应用程序预编译并生成绑定文件,需要什么特权? A. 数据库上的CONNECT特权 B. 数据库上的BINDADD特权 C. 程序包上的BIND特权

D. 程序包上的CONTROL特权 正确答案:

21. 当数据库遭到破坏时,为了能迅速恢复,在进行事务处理过程中将对数据库更新的全部内容写入以下哪项? A. 副本文件 B. 日志文件 C. 检查点文件 D. 死锁文件 正确答案:

22. 事务的原子性是指()

A. 事务中包含的所有操作要么都做,要么都不做 B. 事务一旦提交,对数据库的改变是永久性的

C. 一个事务内部的操作及使用的数据对并发的其他事务是隔离的 D. 事务必须是使数据库从一个一致性状态变到另一个一致性状态 正确答案:

23. 定义基本表时,若要求某一列的值不能为空,则应在定义时使用什么保留字?但如果该列是主键,则可省写。 A. NULL

B. NOT NULL C. DISTINCT D. UNIQUE 正确答案:

24. 数据操纵语言的基本功能中不包括() A. 向数据库中插入数据 B. 描述数据库的访问控制 C. 修改数据库中的数据 D. 删除数据库中的数据 正确答案:

25. 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? A. 1 B. 2 C. 3 D. 4

正确答案:

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库吉大16秋学期《数据库应用技术》在线作业一在线全文阅读。

吉大16秋学期《数据库应用技术》在线作业一.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/zonghe/351509.html(转载请注明文章来源)
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: