![](https://csdnimg.cn/release/download_crawler_static/86294206/bg1.jpg)
天津大学试卷专用纸
学院
计算机科学与技术专业计算机科学与技术 班 年级 学号 姓名 共 7 页 第 1 页
○
B
2014-2015 学年第一学期期末考试试卷
《数据库原理》(B 卷 共 7 页)
(考试时间:2015 年 1 月 12 日)
题号 一 二 三 四 五 六 成绩 核分人签字
得分
一、选择题(20 分)
1. The relational data model was proposed by the ( )
A. E. F. Codd's paper B. DBTG report
C. IMS system D. CODASYL organization
2. What one of the following options is not a part of a data model? ( )
A. physical storage of data B. structure of data
C. operations on the data D. constraints on the data
3. Given two relations R(A, B) and S(A, B) have schemas with identical sets of attributes,
and the domains for each attribute are the same. Which of the following equations of
the relational algebra expressions hold? ( )
I. ()
SRRS II. ()
SS SR III.
SR
S
A. I. only B. I. and II.
C. I., II. and III. D. None of the above
4.
Given two relations R(A, B) and S(C, D), the following clause is in the CREATE
TABLE
statement of the relation S: FOREIGN KEY (D) REFERENCES R(A)
R has two tuples (1, 2) and (2, 3).
Which of the following tuples cannot occur in S ? ( )
A. (1, 2) B. (2, 3) C. (2, 1) D. (2, NULL)
5.
Given the following E/R diagram. Which is the relation converted from the weak
entity set Crews? ( )
A. Crews (number, crewChief) B. Crews (number, name)
C. Crews (name, number, crewChief) D. Crews (name, crewChief)
6.
Consider relations R(A, B) and S(B, C) where the current instance of R has 5000
tuples and the current instance of S has 3000 tuples. The primary key of R and S are
both B. The expected number of tuples in R
S is ( )
A. Greater than 3000 B. Greater than 5000
C. Less than or equal to 3000 D. Less than or equal to 5000
7.
Given a relation R(A, B, C), the functional dependency AB→C holds on R. If
(a
1
, b
1
, c
1
), (a
2
, b
2
, c
2
), (a
1
, b
1
, c
3
), (a
1
, b
2
, c
4
) are four tuples of R and we know
a
1
a
2
and b
1
b
2
, then which one of the following equations must hold? ( )
A. c
1
= c
2
B. c
1
= c
3
C. c
1
= c
4
D. c
2
= c
4
8.
Suppose T
1
and T
2
are two transactions, and A is a database element. Which of the
following statements about database locking is not correct? ( )
A. If T
1
has already held an update lock on A, then T
2
can obtain a shared lock on A.
B. If T
1
has already held an exclusive lock on A, then T
2
cannot obtain a shared lock on A.
C. If T
1
has already held a shared lock on A, then T
2
can obtain a shared lock on A.
D. If T
1
has already held an exclusive lock on A, then T
2
cannot obtain an exclusive lock on A.
9. In case of transaction failure under a deferred update incremental logging scheme,
which of the following will be needed? ( )
A. An undo operation C. A redo operation
B. An undo and redo operation D. None of the above
10.
Consider a database that has an element A whose initial value is 5. The following
table shows actions of a transaction T and its corresponding undo log records. If after
step 4), T is completed and about to commit. Which is the correct action at step 5)?
( )
Step Action Log
1) <START T>
2) READ(B,t)
3) t := t+2
4) WRITE(B,t) <T, B, 5>
5) ?
A. INPUT(B) B. OUTPUT(B) C. WRITE(B, t) D. FLUSH LOG