数据库系统期末试题及答案.doc
《数据库系统期末试题及答案.doc》由会员分享,可在线阅读,更多相关《数据库系统期末试题及答案.doc(7页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、华南农业大学期末考试试卷A卷2021-2021 学年第一学期 考试科目: 数据库系统 考试类型:闭卷 考试时间:120 分钟学号 姓名 年级专业 题号一二三四五六总分得分评阅人Question 1: true-false question (15 points) For each of the following statements, indicate whether it is TRUE or FALSE (Using for TRUE and for FALSE). You will get 1 point for each correct answer, -0.5 point for
2、each incorrect answer, and 0 point for each answer left blank. Be sure to write your answer in the answer sheet.1. A primary key is a field (or group of fields) that uniquely describes each record in the database. 2. Data redundancy improves the integrity of a database. 3. SQL is the language used b
3、y relational databases to create objects and to manipulate and retrieve data.4. A relational database management system does not include tools for backing up & restoring databases. 5. An attribute is also known as a row in most databases. 6. An association between entities is known as a relationship
4、. 7. Integrity constraints limit the number of entities that can be placed in a table or database. 8. The Entity-Relationship data model is often used in the physical design phase.9. The concept “relation in relation model is exactly the same as the concept “relationship in ER model.10. Most relatio
5、nship sets in a database system involves two entity sets.11. The closure of an attribute set contains that attribute set.12. Lossless decomposition is necessary in a decomposition algorithm.13. If A B and C D hold, then AC BD also holds.14. It is not necessary that a legal schedule preserves the ord
6、er in which the instructions appear in each individual transaction.15. Update operations in database must be written into log before updating database.Question 2 single-choice question (2 points for each problem, 30 points in total)1. is the only one incorrect description from the followings:A. R=(R
7、-S)(RS) B. R-S=R-(RS)C. RS=S-(R-S)D. RS=S-(S-R)2. Choose the only one correct expression from the followings: _ _.A. ( some) in B. (= all) not in C. exists r r D. X-Y X Y3. of the following four expressions of relational algebra is not equivalent to the other three They are all based on the relation
8、s R(A,B) and S(B,C). A. B. C. D.4. In the following, assume a is an attribute of some character-string type, e.g. CHAR(10), and that it may be NULL.Q1: SELECT * FROM R WHERE a IS NULL;Q2: SELECT * FROM R WHERE a NOT LIKE %;A.Q1 and Q2 produce the same answer. B. The answer to Q1 is always contained
9、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.5. The Entity-Relationship data model is A. DBMS dependent B. DBMS independent C. both A and B D. neither A nor B6. In SQL, an UPDATE statement without a WHERE clause:A. Updates e
10、very row in a table. B. Updates no rows in a table.C. Updates every column in a table. D. Results in a Cartesian product.7. If a course can be taught by many teachers, and a teacher can teach only one course, then the mapping cardinality from course to teacher isA. one-to-one B. one-to-many C. many-
11、to-one D. many-to-many8. If there is a many-to-one relationship between entity A and B, then A. there exists a functional dependency from the primary key in B to the primary key in A, i.e., PK(B) PK(A).B. there exists a functional dependency from the primary key in A to the primary key in B, i.e., P
12、K(A) PK(B).C. both A and B. D. neither A nor B9. If a functional dependency ABR holds on relation R(A, B, C), then (A, B) is definitely a _ of R.A. super key B. primary key C. candidate key D. foreign key10. A relational schema R is in _ if the domains of all attributes of R are atomicA. 1NF B. 3NF
13、C. BCNF D. 4NF11. Which one of the following statement is trueA. 3NF is more strict than BCNF B. 4NF is more strict than BCNFC. 1NF is more strict than BCNF D. BCNF is the most strict normal form12. If a transaction Ti has obtain an exclusive lock on data item Q, then transition Tj can _.A. obtain a
14、n exclusive lock on data item Q B. obtain a shared lock on data item Q C. wait for lock granting on data item Q D. read or write Q without a lock13. If both and appear in the log after the nearest checkpoint to system crash, then transaction Ti must be _A. undone B. redone C. deleted D. Neither A or
15、 B14. _ is the final state in a life cycle of a transaction.A. committed B. aborted C. failed D. A or B15. in 2PL protocol, at stage, A transaction may obtain locks, but may not release locks. A. Shrinking phase B. Growing phase C. CommittedD. AbortedQuestion 3 (12 points) Consider the following dat
16、abase requirement:A hospital has properties like ID, name, location, rank, capacity. A doctor can be described by ID, name, age, skill. A patient has properties like ID, name, age, sex, address. The above three entities must satisfy some constraints: Each doctor can be unemployed or employed by one
17、hospital. If a doctor is employed, his salary needs to be recorded in the database. A patient can go to many hospitals.1. Draw ER diagram to illustrate the above database requirement 8 points.2. Translate your ER diagram into relational database schemas, and point out the primary keys and foreign ke
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 数据库 系统 期末 试题 答案
限制150内