数据库期中考试1

上传人:kms****20 文档编号:45849718 上传时间:2018-06-19 格式:PDF 页数:11 大小:209.51KB
返回 下载 相关 举报
数据库期中考试1_第1页
第1页 / 共11页
数据库期中考试1_第2页
第2页 / 共11页
数据库期中考试1_第3页
第3页 / 共11页
数据库期中考试1_第4页
第4页 / 共11页
数据库期中考试1_第5页
第5页 / 共11页
点击查看更多>>
资源描述

《数据库期中考试1》由会员分享,可在线阅读,更多相关《数据库期中考试1(11页珍藏版)》请在金锄头文库上搜索。

1、 Database System Principles Test One (07401 07405) Class_No_Name_ 1. Fill in blanks (1 x 7 points) (1)The collection of information stored in the database at a particular moment is called an _instance_of the database. (2)The database system provides users with three levels of data abstraction, the _

2、view_ level of abstraction describes only part of the entire database. (3)Database design involves the following phases: requirements analysis, conceptual/external schema design, logical schema design and physical schema design. (4) Data model is a collection of conceptual tools for describing data,

3、 data relationships, data semantics, and data constraints. (5) As human-machine interfaces, the database language consists of two parts, i.e the data definition language (DDL) and DML (data manipulation language) . (6) In the following figure, the participation constraints of A in R is partial , the

4、 mapping cardinality form A to B is many-to-many 0.* 1.3 RB A (7) An entity set that does not have a primary key is referred to as a weak entity set . 2. Choice (1 x 9 points) (1) For the entity set Student(#student, sname, department, course, grade), the primary attributes are . A. #student, course

5、 B.#student C. #student, course D. #student E. #student F. course (2) With respect to the following relational database, is the data model, is the relational schema. A. R= B. C. Student(sname, #student, department, course, grade) 移动台MS小区cell业务类型Fig.1 服务于(3) Considering reduction of the E-R diagram i

6、n Fig.1 into relational schemas, For the relationship set “服务于” among the entity sets cell and MS, primary_key(服务于) is A. either primary_key(MS) or primary_key(cell) B. primary_key(MS) C. primary_key(cell) D. primary_key(MS) primary_key(cell) For the descriptive attribute “业务类型” of the relationship

7、set “服务于” among MS and cell, when reducing “服务于” into the relational table, how to deal with the attribute “业务类型” A. “业务类型” can only be assigned as the attribute of the table corresponding to MS B. “业务类型” can only be assigned as the attribute of the table corresponding to cell C. “业务类型” can only be

8、assigned as the attribute of the table corresponding to 服务 于服务 于 (4) For a many-to-one relationship sets R that associates entity set A and B, if R is partially on the many-side A and the one-side B, how to deal with R ? A. R should be represented as a independent table corresponding to R B. R shoul

9、d not be represented as a independent table, it can be reduced to the table A corresponding to the many and total side entity set A C. R should not be represented as a independent table, it can be reduced to the table B corresponding to the one and part side entity set B (5) For the extended E-R mod

10、el in Fig.3, if entity-set-L1 entity-set-L2=, then the generalization/specialization is A. overlapping B. disjoint , and if (entity-set-L1 entity-set-L2) H-entity-set, then the generalization/specialization is A. total B. partial (6) Given the cardinalities of the entity sets A and B with respect to

11、 the relationship set R, the participation constraints of A can be decided by ; A. lA B. hA C. lB D. hB lA.hA lB.hBentity-set-L1 entity-set-L2 RB A H-entity-set The mapping cardinality from A to B can be decided by .A. lA, lB B. hA , hB C. hB , hA D. lA, hB 答案:答案:A A C B A A B B A C 3. (10 points) R

12、educe the E-R diagram in Fig.3 into relational schemas. 天线基站BTS天线-基站BTS-id发射功率对应扇区型号方向角增益Fig.3Answers: BTS(BTS-id, 发射功率发射功率); 天线(天线(BTS-id, 对应扇区对应扇区, 型号,增益,方向角)型号,增益,方向角) 4. (6 points) Convert the following E-R diagram into the diagram that contains only binary relationships RBCA Attr-RAnswers: RBCA

13、ERbBRaARcC(b)(a)Attr-RAttr-Re? E = ei , | E |= | R |, i.e. each (ai , bi , ci ) in R corresponds to one ei in E, or E = ei =R=(ai , bi , ci ) ? Ra = (ei , ai) | ei E , ai A , relating E and A ? Rb = (ei , bi) | ei E , bi B , relating E and B ? Rc = (ei , ci) | ei E , ci B , relating E and C ? E has

14、an identifying attribute e ( candidate key) to distinguish each ei in E ? all attributes of R, i.e. attr-R, are assigned to E 5. (10 points) Convert the entity set “学生学生”, of which the attribute “老乡” is a multivalued attribute, in Fig.4 into relational tables student-id籍贯 老乡 性别 年龄 07494 北京 07596, 07

15、611 男 20 07498 河北 07320, 07321 女 19 Fig.4 Answers: student-id籍贯 性别 年龄 07494 北京 男 20 07498 河北 女 19 student-id老乡07494 07596 07494 07611 07498 07320 07498 07321 6. (15 points) 给出下列关系代数操作对应的给出下列关系代数操作对应的 SQL 语句语句 (1) p(r) (2) A1, A2, ., Am ( r ) (3) rrs , , 假设假设 r(A, B, C), s(C, E, F) (4) r s (5) loan loan amount 0 and amount 50 (loan) 假设 loan(loan-number, branch, amount) Answers: (1) select * f

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 生活休闲 > 科普知识

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号