作业 考核 论文 答案联系 3064302332 微信:wxxygzs
吉大23春《数据库应用技术》在线作业一[满分答案]
试卷总分:100 得分:100
一、单选题 (共 25 道试题,共 100 分)
1.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
2.两个子查询的结果(),可以执行并、交、差操作
A.结构完全一致
B.结构完全不一致
C.结构部分一致
D.主键一致
3.对于支持小规模的部门级应用,这些应用不需要存取驻留在OS/400、OS/390等平台上的远程数据库,则需要哪种级别的DB2 产品?
A.企业版
B.工作组版
C.企业扩展版
D.个人版
E.卫星版
F.微型版
4.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?
A.0
B.1
C.2
D.3
5.在数据库中存储的是:()
A.数据
B.数据模型
C.数据以及数据之间的联系
D.信息
6.使用DROP语句撤消基本表时,使用以下哪个子句,可以将下属的视图和约束引用全部撤消?
A.NULL
B.RESTRICT
C.CASCADE
D.DISTINCT
7.关系模式中各级模式之间的关系为()
A.3NF包含 2NF包含 1NF
B.3NF包含 1NF包含 2NF
C.1NF 包含2NF包含 3NF
D.2NF包含 1NF 包含3NF
8.在语句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.错误
9.若用如下的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)
10.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?
A.SELECT salary FROM employee WHERE salary IN (SELECT (salary/(SELECT SUM(salary) FROM employee)) FROM employee)
B.SELECT COALESCE(AVG(salary)) FROM employee
C.SELECT SUM(salary)/COUNT(*) FROM employee
D.SELECT salary/(SELECT SUM(salary) FROM employee) FROM employee
11.并发控制的主要方法是采用以下哪种机制?
A.口令
B.锁
C.副本
D.检查点
12.E-R图中的联系可以与()实体有关
A.0个
B.1个
C.1个或多个
D.多个
13.下述关于数据库系统的正确叙述是()
A.数据库中只存在数据项之间的联系
B.数据库的数据项之间和记录之间都存在联系
C.数据库的数据项之间无联系,记录之间存在联系
D.数据库的数据项之间和记录之间都不存在联系
14.定义基本表时,若要求某一列的值不能为空,则应在定义时使用什么保留字?但如果该列是主键,则可省写。
A.NULL
B.NOT NULL
C.DISTINCT
D.UNIQUE
15.SQL语言具有()功能。
A.关系规范化、数据操纵、数据控制
B.数据定义、数据操纵、数据控制
C.数据定义、关系规范化、数据控制
D.数据定义、关系规范化、数据操纵
16.创建一个DMS类型的表空间,可以使用以下哪两种文件系统对象作为容器?
A.目录
B.文件
C.DEVICE
17.发人员开发访问后台AIX上的DB2的windows程序,需要在windows开发平台上安装:
A.DB2运行时间客户端
B.DB2管理客户端
C.DB2应用程序开发客户端
D.DB2瘦客户端
18.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
19.下列哪种工具可以向表中增添记录,并更改数据库的统计信息?
A.import
B.insert
C.load
D.update
20.Under which of the following situations must dynamic SQL be used?
A.When temporary table references exist at compile time
B.When the host variables' values are unknown at compile time
C.When the columns in the SELECT clause are unknown at compile time
D.When the number of rows being returned are unknown at compile time
21.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
22.下面哪个工具可以保存终端用户需要存取的元数据?
A.Query Management Facility
B.DB2 Query Patroller
C.DB2存储过程构建器
D.信息目录
23.要更改数据库管理器配置文件,需以下哪个数据库权限?
A.DBADM
B.SYSMAINT
C.SYSCTRL
D.SYSADM
24.下列那种隔离级对于只读操作不在数据行上加锁?
A.RR
B.RS
C.CS
D.UR
25.Given the EMPLOYEE table definition: CREATE TABLE employee ( workdept CHAR(30), salary INTEGER ) Which of the following is a correct usage of parameter markers in a JDBC program?
A.String sql = "UPDATE employee SET salary=salary*?WHERE workdept=?"; statement stmt=con.createStatement(sql);
B.String sql = "UPDATE employee SET salary=salary*?WHERE workdept=?"; statement stmt=con.createStatement(sql);
C.String sql = "UPDATE employee SET salary=salary*?WHERE workdept=?"; statement stmt=con.createStatement(sql);
D.String sql = "UPDATE employee SET salary=salary*?WHERE workdept=?"; statement stmt=con.createStatement(sql);