数据库考题答案

  • 格式:doc
  • 大小:92.50 KB
  • 文档页数:8

下载文档原格式

  / 8
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

1.Fill in blanks.(1⨯9 points)

(1) DDL is the language for specifying the database schema and as well as other

properties of the data.

(2) With respect to integrity mechanisms in DBS, trigger defines actions to be executed automatically when some events occur and corresponding conditions are satisfied.

(3) An entity set that does not have sufficient attributes to form a primary key is termed a

weak entity set .

(4) The commonly-used schemes of organization of records in files are heap file organization , sequential file organization, and hashing file organization.

(5) The three steps in query processing are parsing and translation, optimization, and evaluation .

(6) The recovery-management component of a database system implements the support for transaction atomicity and durability .

(7) A cascadeless schedule ensures that the abort of a transaction does not result in cascading aborts of other transactions.

(8) The stric two-phase lock protocol requires that all exclusive-mode locks taken by a transaction be held until that transaction commits.

(9) The three types of failures in DBS are the transaction failures, system crash, and disk failures/crash .

2. Choice(1⨯11 points)

(1) With respect to DBS design , the index is designed at the D phase.

A. requirement analysis

B. conceptual design

C. logical design

D. physical design

(2) For the E-R diagram given below, the mapping cardinality from A to B is C

A. one-to-many

B. one-to-one

C. many-to-one

D. many-to-many

(3) The following SQL statement corresponds to the expression C .

Select*

From r, s

A.r∩s

B.r∞ s

C.r╳s

D. r—s

(4) Given the schema R(A, B, C, D, E, F) and the functional dependencies F={AB→D,

BC→E, D →F, AB→ F, CE→B} holding on it, D is a transitive functional dependency.

A. AB →D

B. BC → E

C. D →F

D. AB →F

E. CE →B

(5) Given a relation r (R), which one of the following functional dependencies is satisfied by r . C

A. A →B

(6) In a Select statement, C can be used to take out repetition tuples. A. unique B. count C. distinct

D. union (8) All information except D belong to meta-data and are stored in the data dictionary.

A. names of the relations

B. names of the authorized users

C. attributes on which the index is defined

D. tuples in the relations

3. (18 points). Here is the schema diagram for CAP database. Some definitions for the

attributes in the table customer, agents (代理商), products , and orders (订单) are also given in the following list. The customers order products from the agents . Each time an order is placed, a new row is inserted into the orders table.