- 13
- 0
- 约6.79千字
- 约 5页
- 2017-08-20 发布于北京
- 举报
吉大17春学期《数据库应用技术》在线作业一
一、单选题(共 25 道试题,共 100 分。)
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(:co11,:co12,:co13); INSERT INTO country VALUES(:co14,:co15,:co16); INSERT INTO country VALUES(:co17,:co18,:co19); INSERT INTO country VALUES(:co110,:co111,:co112); COMMIT; END Given that all statements succeed except the following: INSERT INTO country VALUES(:co17,:co18,:co19); 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. 记录
正确答案:
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 (c1,c4) ) //自动创建索引 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 :threshold ) SELECT id, name, citie
原创力文档

文档评论(0)