2015数据库系统期末试题及答案
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
华南农业大学期末考试试卷(A 卷)
2015-2016学年第一学期 考试科目: 数据库系统 考试类型:闭卷 考试时间: 120 分钟 学号 姓名 年级专业
Question 1: true-false question (30 points) For each of the following
statements, indicate whether it is TRUE or FALSE (Using T for TRUE
and F for FALSE). You will get 1 point for each correct answer, and 0 point for each wrong or blank answer. BE SURE TO WRITE YOUR ANSWER IN THE ANSWER SHEET!
1. Database systems are designed for both defining storage structures and providing mechanisms
for manipulation of information.
2. Comparing with database system, file-processing system has many disadvantages such like
data redundancy and consistency, concurrent-access anomalies.
3. Physical data independence in database means that the user working on the logical level need
know nothing about complexity of the physical level of database.
4. The overall design of database is the database schema, while collection of data stored in the
database at a particular moment is an instance of the database.
5. The Entity-Relationship data model is often used in logical design phase.
6. SQL is a relational language that used as both DDL and DML.
7. Metadata is data about data that are stored in data dictionary.
8. A tuple is also known as a column in database table.
9. A relationship in an ER model can has its own attributes. 10. Composite attributes are not allowed in ER model.
11. The closure of a functional dependency set includes all functional dependencies in the set. 12. Dependency preservation is necessary to a practical decomposition algorithm.
13. The most common type of relationship encountered in data modeling is ternary relationship. 14. A relational schema R is in BCNF if domains of all attributes of R are atomic.
15. A tuple variable is a variable that stands for a tuple, in other words, it is a variable whose
domain is the set of all tuples.
16. A foreign key of a relation is a set of attributes (one or more) that allow us to identify a tuple
in that relation uniquely.
17. The set intersection operation can be replacing by a pair of set-difference operations. 18. Any relation that is not part of the logical model, but is made visible to a user as a virtual
relation, is called a view.
19. In SQL, the outer join operation defines how tuples in each relation that do not match any
tuple in the other relation are treated.
20. The main database design phase includes requirement analysis, logical-design and coding
phase.
21. The concept “relation” in relation model is exactly the same as the concept “entity ” in ER
model.
22. A weak entity set cannot participate in relationships like usual entity sets.
23. A functional dependency α→β is trivial if β ⊆ α.
24. Armstrong‟s axioms are used to calculate the closures of attribute sets.
25. Once a transaction is defined, it must be at active, partially committed, failed, aborted or
committed state.
26. Serial executions of transaction can improve throughput and resource utilization while add
waiting time.
27. A schedule is correct if it is conflict equivalent to a serial schedule, that means it is a
serializable schedule.
28. 2-Phase Locking Protocol ensures serializability and can avoid dead lock.
29. In recovery technology, Log must be written before updating is written into database. 30. Checkpoint is defined to simplify recovery when a system corruption is occurred.
Question 2 single-choice question (2 points for each, and 30 points in total) BE SURE TO WRITE YOUR ANSWER IN HE ANSWER SHEET!
1. Assume R(a, b) and S(b, c) are two relations.
Q1: =()S R c a ,∏, and Q2: =)(,S R c a ⨯∏
Which of the followings is correct? A. Q1 and Q2 produce the same answer.
B. The answer to Q1 is always contained in the answer to Q2.
C. The answer to Q2 is always contained in the answer to Q1.
D. Q1 and Q2 produce completely different answers.
2. Choose the only one correct expression from the followings: _______.
A. (<> some) ≡ in
B. (= all) ≡ not in
C. (<> all) ≡ not in
D. (= some) ≡ not in 3. Let R(x) be the schema of relation R.
Q1: SELECT DISTINCT(x) FROM R rr
WHERE NOT EXISTS(SELECT * FROM R WHERE x>rr.x); Q2: SELECT MAX(x) FROM R; Then _______ is correct.
A. Q1 and Q2 produce the same answer.
B. The answer to Q1 is always contained in the answer to Q2.
C. The answer to Q2 is always contained in the answer to Q1.
D. Q1 and Q2 produce different answers.
4. In SQL, a DELETE statement without a WHERE clause: A. delete all data in the table. B. drop the table.
C. delete one column in a table.
D. Results in a Cartesian product.
5. Mapping an E-R diagram into relation schemas can happen in the phase of ______. A. requirement analysis B. logical design C. conceptual design D. physical design
6. If the mapping cardinality from entity set S to entity set T is m-n, then an entity of T is