好文档 - 专业文书写作范文服务资料分享网站

吉大18春学期《数据库应用技术》在线作业二

天下 分享 时间: 加入收藏 我要投稿 点赞

www.vu8o.com

------------------------------------------------------------------------------------------------------------------------------

(单选题) 1: 发人员开发访问后台AIX上的DB2的windows程序,需要在windows开发平台上安装:

A: DB2运行时间客户端 B: DB2管理客户端

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

(单选题) 2: 关系数据库管理系统应能实现的专门关系运算包括() A: 排序、索引、统计 B: 选择、投影、连接 C: 关联、更新、排序 D: 显示、打印、制表 正确答案: (单选题) 3: 下列SQL语句中,能够实现”收回U4对学生表(STUD)中学号(XH)的修改权”这一功能的是以下哪项?

A: REVOKE UPDATE(XH) ON TABLE FROM U4 B: REVOKE UPDATE(XH) ON TABLE FROM PUBLIC C: REVOKE UPDATE(XH) ON STUD FROM U4 D: REVOKE UPDATE(XH) ON STUD FROM PUBLIC 正确答案:

(单选题) 4: 下面哪个工具可以保存终端用户需要存取的元数据? A: Query Management Facility B: DB2 Query Patroller C: DB2存储过程构建器 D: 信息目录 正确答案:

(单选题) 5: 如果选用循环日志方式,辅助日志文件何时分配? A: 数据库建立的时候

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

(单选题) 6: 并发控制的主要方法是采用以下哪种机制? A: 口令 B: 锁 C: 副本 D: 检查点 正确答案:

(单选题) 7: 在SELECT语句的下列子句中,通常和HAVING子句同时使用的是以下哪项? A: ORDER BY子句 B: WHERE子句 C: GROUP BY子句 D: 均不需要

www.vu8o.com

------------------------------------------------------------------------------------------------------------------------------

正确答案:

(单选题) 8: 下列哪种工具可以向表中增添记录,并更改数据库的统计信息? A: import B: insert C: load D: update 正确答案:

(单选题) 9: 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 正确答案:

(单选题) 10: 关系模型中的关系模式至少是() A: 1NF B: 2NF C: 3NF D: BCNF 正确答案:

(单选题) 11: 对于支持小规模的部门级应用,这些应用不需要存取驻留在OS/400、OS/390等平台上的远程数据库,则需要哪种级别的DB2 产品? A: 企业版 B: 工作组版 C: 企业扩展版 D: 个人版 E: 卫星版 F: 微型版 正确答案:

(单选题) 12: SQL语言具有()功能。 A: 关系规范化、数据操纵、数据控制 B: 数据定义、数据操纵、数据控制 C: 数据定义、关系规范化、数据控制 D: 数据定义、关系规范化、数据操纵 正确答案:

(单选题) 13: 下面哪一工具允许用户开发存储过程? A: 控制中心 B: 命令中心 C: 任务中心 D: 开发中心 E: 健康中心 正确答案: (单选题) 14: 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

www.vu8o.com

------------------------------------------------------------------------------------------------------------------------------

most_cities In which of the following does MOST_CITIES exist? A: user tables B: server memory C: user table space

D: system catalog tables 正确答案: (单选题) 15: 定义基本表时,若要求某一列的值不能为空,则应在定义时使用什么保留字?但如果该列是主键,则可省写。 A: NULL B: NOT NULL C: DISTINCT D: UNIQUE 正确答案:

(单选题) 16: 如果需要创建一个表,并把表中的索引数据和其他数据分开存储,则应该 A: 建立两个SMS表空间分别存储索引数据和其他数据 B: 建立两个DMS表空间分别存储索引数据和其他数据

C: 建立一个DMS表空间存储索引数据,再建立一个SMS表空间存储其他数据 D: 建立一个SMS表空间存储索引数据,再建立一个DMS表空间存储其他数据 正确答案:

(单选题) 17: 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. 正确答案:

(单选题) 18: 据库系统和文件系统的主要区别是: A: 数据库系统复杂,而文件系统简单。

B: 文件系统不能解决数据冗余和数据独立性问题,而数据库系统可以解决。 C: 文件系统只能管理程序文件,而数据库系统能够管理各种类型的文件。 D: 文件系统管理的数据量较少,而数据库系统可以管理庞大的数据量。 正确答案: (单选题) 19: 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

www.vu8o.com

------------------------------------------------------------------------------------------------------------------------------

正确答案:

(单选题) 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? A: The current statement

B: Statements from any application

C: All statements within this application

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

(单选题) 21: 缺省的数据库日志文件的类型是: A: Circular Log B: Archival Log C: Primary Log D: Secondary log 正确答案:

(单选题) 22: An ODBC/CLI application has the following pseudocode: SQLAllocHandle( SQL_HANDLE_DBC, hEnv, &hDbc ) SQLConnect( hDbc, \SQL_NTS, \SQL_NTS, \SQL_NTS ) SQLAllocHandle( SQL_HANDLE_STMT, hDbc, &hStmt ) SQLExecDirect( hStmt, \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, \WHERE t1.col1=t2.col2\

A: SQLExecDirect( hStmt, \* FROM user1.table1 t1, table2 t2 WHERE t1.col1=t2.col2\

B: . SQLExecDirect( hStmt, \t1.col1=t2.col2\

C: . SQLExecDirect( hStmt, \t1.col1=t2.col2\

D: . SQLExecDirect( hStmt, \* FROM db2cert.table1 t1, db2cert.table2 t2 WHERE t1.col1=t2.col2\正确答案:

(单选题) 23: 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 正确答案:

(单选题) 24: Given the application code: EXEC SQL DECLARE cur CURSOR WITH HOLD FOR SELECT c1 FROM t1 EXEC SQL OPEN cur EXEC SQL FETCH cur INTO :hv /* Statement 1 */ EXEC SQL COMMIT /* Statement 2 */ EXEC SQL FETCH cur INTO :hv /* Statement 3 */ EXEC SQL ROLLBACK /* Statement 4 */ EXEC SQL CLOSE cur /* Statement 5 */ If the table T1 has no rows in it, which statement will cause the cursor \

www.vu8o.com

------------------------------------------------------------------------------------------------------------------------------

A: Statement 1 B: Statement 2 C: Statement 3 D: Statement 4 正确答案:

(单选题) 25: 要对应用程序预编译并生成绑定文件,需要什么特权? A: 数据库上的CONNECT特权 B: 数据库上的BINDADD特权 C: 程序包上的BIND特权 D: 程序包上的CONTROL特权 正确答案:

(单选题) 1: 发人员开发访问后台AIX上的DB2的windows程序,需要在windows开发平台上安装:

A: DB2运行时间客户端 B: DB2管理客户端

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

(单选题) 2: 关系数据库管理系统应能实现的专门关系运算包括() A: 排序、索引、统计 B: 选择、投影、连接 C: 关联、更新、排序 D: 显示、打印、制表 正确答案: (单选题) 3: 下列SQL语句中,能够实现”收回U4对学生表(STUD)中学号(XH)的修改权”这一功能的是以下哪项?

A: REVOKE UPDATE(XH) ON TABLE FROM U4 B: REVOKE UPDATE(XH) ON TABLE FROM PUBLIC C: REVOKE UPDATE(XH) ON STUD FROM U4 D: REVOKE UPDATE(XH) ON STUD FROM PUBLIC 正确答案:

(单选题) 4: 下面哪个工具可以保存终端用户需要存取的元数据? A: Query Management Facility B: DB2 Query Patroller C: DB2存储过程构建器 D: 信息目录 正确答案:

(单选题) 5: 如果选用循环日志方式,辅助日志文件何时分配? A: 数据库建立的时候

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

www.vu8o.com

------------------------------------------------------------------------------------------------------------------------------

(单选题) 6: 并发控制的主要方法是采用以下哪种机制? A: 口令 B: 锁 C: 副本 D: 检查点 正确答案:

(单选题) 7: 在SELECT语句的下列子句中,通常和HAVING子句同时使用的是以下哪项? A: ORDER BY子句 B: WHERE子句 C: GROUP BY子句 D: 均不需要 正确答案:

(单选题) 8: 下列哪种工具可以向表中增添记录,并更改数据库的统计信息? A: import B: insert C: load D: update 正确答案:

(单选题) 9: 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 正确答案:

(单选题) 10: 关系模型中的关系模式至少是() A: 1NF B: 2NF C: 3NF D: BCNF 正确答案:

(单选题) 11: 对于支持小规模的部门级应用,这些应用不需要存取驻留在OS/400、OS/390等平台上的远程数据库,则需要哪种级别的DB2 产品? A: 企业版 B: 工作组版 C: 企业扩展版 D: 个人版 E: 卫星版 F: 微型版 正确答案:

(单选题) 12: SQL语言具有()功能。 A: 关系规范化、数据操纵、数据控制 B: 数据定义、数据操纵、数据控制 C: 数据定义、关系规范化、数据控制

www.vu8o.com

------------------------------------------------------------------------------------------------------------------------------

D: 数据定义、关系规范化、数据操纵 正确答案:

(单选题) 13: 下面哪一工具允许用户开发存储过程? A: 控制中心 B: 命令中心 C: 任务中心 D: 开发中心 E: 健康中心 正确答案: (单选题) 14: 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? A: user tables B: server memory C: user table space

D: system catalog tables 正确答案: (单选题) 15: 定义基本表时,若要求某一列的值不能为空,则应在定义时使用什么保留字?但如果该列是主键,则可省写。 A: NULL B: NOT NULL C: DISTINCT D: UNIQUE 正确答案:

(单选题) 16: 如果需要创建一个表,并把表中的索引数据和其他数据分开存储,则应该 A: 建立两个SMS表空间分别存储索引数据和其他数据 B: 建立两个DMS表空间分别存储索引数据和其他数据

C: 建立一个DMS表空间存储索引数据,再建立一个SMS表空间存储其他数据 D: 建立一个SMS表空间存储索引数据,再建立一个DMS表空间存储其他数据 正确答案:

(单选题) 17: 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. 正确答案:

(单选题) 18: 据库系统和文件系统的主要区别是: A: 数据库系统复杂,而文件系统简单。

B: 文件系统不能解决数据冗余和数据独立性问题,而数据库系统可以解决。 C: 文件系统只能管理程序文件,而数据库系统能够管理各种类型的文件。 D: 文件系统管理的数据量较少,而数据库系统可以管理庞大的数据量。 正确答案:

www.vu8o.com

------------------------------------------------------------------------------------------------------------------------------

(单选题) 19: 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

正确答案:

(单选题) 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? A: The current statement

B: Statements from any application

C: All statements within this application

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

(单选题) 21: 缺省的数据库日志文件的类型是: A: Circular Log B: Archival Log C: Primary Log D: Secondary log 正确答案:

(单选题) 22: An ODBC/CLI application has the following pseudocode: SQLAllocHandle( SQL_HANDLE_DBC, hEnv, &hDbc ) SQLConnect( hDbc, \SQL_NTS, \SQL_NTS, \SQL_NTS ) SQLAllocHandle( SQL_HANDLE_STMT, hDbc, &hStmt ) SQLExecDirect( hStmt, \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, \WHERE t1.col1=t2.col2\

A: SQLExecDirect( hStmt, \* FROM user1.table1 t1, table2 t2 WHERE t1.col1=t2.col2\

B: . SQLExecDirect( hStmt, \t1.col1=t2.col2\

C: . SQLExecDirect( hStmt, \t1.col1=t2.col2\

D: . SQLExecDirect( hStmt, \* FROM db2cert.table1 t1, db2cert.table2 t2 WHERE t1.col1=t2.col2\正确答案:

www.vu8o.com

------------------------------------------------------------------------------------------------------------------------------

(单选题) 23: 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 正确答案:

(单选题) 24: Given the application code: EXEC SQL DECLARE cur CURSOR WITH HOLD FOR SELECT c1 FROM t1 EXEC SQL OPEN cur EXEC SQL FETCH cur INTO :hv /* Statement 1 */ EXEC SQL COMMIT /* Statement 2 */ EXEC SQL FETCH cur INTO :hv /* Statement 3 */ EXEC SQL ROLLBACK /* Statement 4 */ EXEC SQL CLOSE cur /* Statement 5 */ If the table T1 has no rows in it, which statement will cause the cursor \A: Statement 1 B: Statement 2 C: Statement 3 D: Statement 4 正确答案:

(单选题) 25: 要对应用程序预编译并生成绑定文件,需要什么特权? A: 数据库上的CONNECT特权 B: 数据库上的BINDADD特权 C: 程序包上的BIND特权 D: 程序包上的CONTROL特权 正确答案:

吉大18春学期《数据库应用技术》在线作业二

www.vu8o.com------------------------------------------------------------------------------------------------------------------------------(单选
推荐度:
点击下载文档文档为doc格式
5mcml5fz3e3cwgi893aj3uh255c6he00c7x
领取福利

微信扫码领取福利

微信扫码分享