作业辅导 发表于 2017-5-10 21:07:31

奥鹏吉大17春学期《数据库应用技术》在线作业一 二辅导资料

一、单选题(共 25 道试题,共 100 分。)V 1. Given the tables EMPLOYEE DEPT emp_num emp_name dept dept_id dept_name 1 Adams 1 1 Planning 2 Jones 1 2 Support 3 Smith 2 4 Williams 1 and the statement ALTER TABLE employee ADD FOREIGN KEY (dept) REFERENCES dept (dept_id) ON DELETE CASCADE How many rows will be deleted when the following statement is executed? DELETE FROM employee WHERE dept=1
A. 0


B. 1
C. 3
D. 4
2.Given the following code BEGIN ATOMIC UPDATE country SET cities=count WHERE CURRENT OF C1 INSERT INTO country VALUES(co11co12co13) INSERT INTO country VALUES(co14co15co16) INSERT INTO country VALUES(co17co18co19) INSERT INTO country VALUES(co110co111co112) COMMIT END Given that all statements succeed except the following INSERT INTO country VALUES(co17co18co19) How many rows will be affected in table COUNTRY?
A. 0
B. 3
C. 4
D. 5
3.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
4.实体是信息世界中的术语,与之对应的数据库术语为:()
A. 文件
B. 数据库
C. 字段
D. 记录
转载请注明易百网www.openhelp100.com

5.如果开发人员在AIX操作系统上开发访问后台AS400上的DB2数据库,则需要在AIX开发环境中安装:()
A. DB2个人开发版(PDE)
B. DB2通用开发版(UDE)
6.关系模型中的关系模式至少是()
A. 1NF
B. 2NF
C. 3NF
D. BCNF
7.若用如下的SQL语句创建一个student表: CREATE TABLE student(NO CHAR(4) NOT NULL, NAME CHAR(8) NOT NULL, SEX CHAR(2), AGE NUMBERIC(2))可以插入到student表中的是哪一项?
A. (‘1031’,‘曾华’,男,23)
B. (‘1031’,‘曾华’,NULL,NULL)
C. (NULL,‘曾华’,‘男’,‘23’)
D. (‘1031’,NULL,‘男’,23)
8.执行下面两条SQL语句后: CREATE TABLE t1 ( c1 char(10) NOT NULL PRIMARY KEY c2 int c3 char(10) c4 char(10) NOT NULL CONSTRAINT c4 UNIQUE (c1c4) ) //自动创建索引 CREATE INDEX Index1 ON t1 (c2 ASC) 表t1上有几个索引?
A. 0
B. 1
C. 2
D. 3
E. 4
9.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 &gt 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
10.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 nonadministrative user that can use this package on the remote DB2 server. Which statement describes the privileges that FOO requires to accomplish this?
A. FOO requires EXECUTE privilege on the package.
B. FOO requires the privilege to create the package on the remote DB2 server.
C. FOO requires EXECUTE privilege on the package and INSERT privilege on CUST.ORDERS.
D. FOO requires the privilege to create the package on the remote DB2 server and INSERT privilege on CUST.ORDERS.
11.Given the table T1 with the following data COL1 IDX   A singlethreaded CLI application executes the following pseudocode in sequence SQLAllocHandle( SQL_HANDLE_ENV NULL &amphEnv ) SQLAllocHandle( SQL_HANDLE_DBC hEnv &amphDbc ) SQLConnect( hDbc &quotSAMPLE&quot SQL_NTS NULL SQL_NTS NULL SQL_NTS ) SQLSetConnectAttr( hDbc SQL_ATTR_AUTOCOMMIT SQL_AUTOCOMMIT_ON ) SQLAllocHandle( SQL_HANDLE_STMT hDbc &amphStmt ) SQLExecDirect( hStmt &quotUPDATE table1 SET col1=10 WHERE idx=1&quot SQL_NTS ) SQLExecDirect( hStmt &quotUPDATE table1 SET col1=20 WHERE idx=2&quot SQL_NTS ) SQLEndTran( SQL_HANDLE_DBC hDbc SQL_COMMIT ) SQLExecDirect( hStmt &quotUPDATE table1 SET col1=30 WHERE idx=1&quot SQL_NTS ) SQLExecDirect( hStmt &quotUPDATE table1 SET col1=40 WHERE idx=1&quot SQL_NTS ) SQLEndTran( SQL_HANDLE_DBC hDbc SQL_ROLLBACK ) SQLExecDirect( hStmt &quotSELECT col1 FROM table1 WHERE idx=1&quot 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
12.下面哪个工具可以保存终端用户需要存取的元数据?
A. Query Management Facility
B. DB2 Query Patroller
C. DB2存储过程构建器
D. 信息目录
13.设有两个事务T1,T2,其并发操作如下所示: T1: T2: 1) 读A=10,B=5 2) 读A=10 3) 读A=20,B=5 求和25 验证错正确的评价是哪个?
A. 该操作不存在问题
B. 该操作丢失修改
C. 该操作不能重复读
D. 该操作读“脏”数据
14.关系规范化中的删除操作异常是指()
A. 不该删除的数据被删除
B. 不该插入的数据被插入
C. 应该删除的数据未被删除
D. 应该插入的数据未被插入
15.Given the table COUNTRY with the following data ID NAME PERSON CITIES   1 Argentina 1and the code EXEC SQL DECLARE c1 CURSOR FOR SELECT idname FROM country EXEC SQL OPEN c1 EXEC SQL FETCH c1 INTO idname EXEC SQL FETCH c1 INTO idname Which of the following SQLCODE/SQLSTATEs will be contained in the SQLCA after the last fetch?
A. SQLCODE 0 SQLSTATE 00000
B. SQLCODE 100 SQLSTATE 02000
C. SQLCODE 100 SQLSTATE 00100
D. SQLCODE 501 SQLSTATE 24501
16.Given the following code EXEC SQL EXECUTE IMMEDIATE sqlstmt Which of the following values must sqlstmt contain so that all rows are deleted from the STAFF table?
A. DROP TABLE staff
B. DELETE FROM staff
C. DROP * FROM staff
D. DELETE * FROM staff
17.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
18.Which of the following is used to run an embedded dynamic SQL UPDATE statement?
A. UPDATE
B. . PREPARE
C. . DECLARE
D. . EXECUTE
19.Which of the following is TRUE for all cursors defined as FOR FETCH ONLY?
A. The cursors are unambiguous.
B. Only the first row is returned.
C. Cursor stays open after a commit.
D. A temporary table is created on the server.
20.在数据库中存储的是:()
A. 数据
B. 数据模型
C. 数据以及数据之间的联系
D. 信息
21.在语句CREATE VIEW EMP_VIEW2 (EMPNO EMPNAME DEPTNO JOBTITLE HIREDATE) AS SELECT ID NAME DEPT JOB HIREDATE FROM EMPLOYEE WHERE DEPT=10 WITH CHECK OPTION 所定义的视图中,当使用INSERT语句时,若新增的行中DEPTNO数值不为10,则该行将被拒绝插入。
A. 正确
B. 错误
22.创建一个DMS类型的表空间,可以使用以下哪两种文件系统对象作为容器?
A. 目录
B. 文件
C. DEVICE
23.如果一个用户USER1被授予了表TAB上的CONTROL特权,如果需要限制该用户对表的存取,应使用以下哪条命令?
A. REVOKE ALL ON TAB TO USER1
B. REVOKE ALL ON TAB FROM USER1
C. REVOKE CONTROL ON TAB TO USER1
D. REVOKE CONTROL ON TAB FROM USER1
24.定义基本表时,若要求某一列的值不能为空,则应在定义时使用什么保留字?但如果该列是主键,则可省写。
A. NULL
B. NOT NULL
C. DISTINCT
D. UNIQUE
25.据库系统和文件系统的主要区别是:
A. 数据库系统复杂,而文件系统简单。
B. 文件系统不能解决数据冗余和数据独立性问题,而数据库系统可以解决。
C. 文件系统只能管理程序文件,而数据库系统能够管理各种类型的文件。
D. 文件系统管理的数据量较少,而数据库系统可以管理庞大的数据量。









数据库应用 在线作业 技术 资料

更多免费学习资料请进www.openhelp100.com下载



页: [1]
查看完整版本: 奥鹏吉大17春学期《数据库应用技术》在线作业一 二辅导资料