=========================preview======================
(comp231)[2008](f)midterm~PPSpider^sol_10180.pdf
Back to COMP231 Login to download
======================================================
Student Number: __________________
HONG KONG UNIVERSITY OF SCIENCE & TECHNOLOGY
COMP231: Database Management Systems
Fall Semester, 2008
Mid-term Examination Solutions
Student Number: __________________
Question 1 Multiple choice questions (Circle the correct answer(s). Each incorrect answer deduct 1.5 marks until zero for each question) 15 marks
1. [3] Given a relation r defined over the schema R, which of the following can always uniquely identify the tuples in r?
A. any non-null attributes of R
B. super key of R
C. the first attribute in R
D. R itself
Answer: B D
2. [3] Comparing a DBMS and files for storing your data, which of the following is true?
A. DBMS is faster than files in data retrieval.
B. DBMS requires less application programming effort.
C. DBMS takes less disk space than files.
D. Data in files can only be accessed sequentially but DBMS cannot.
Answer: B
3. [3]
A. We can always modify a tuple in a view.
B. The tuples in a relation cannot be identical in their primary keys.
C..We.can.always.join.a.relation.with.a.view..
D. View may not change if a tuple is inserted or deleted from the relation that creates the view.
Answer: A
4. [3] Which of the following is not true about the weak entity?
A. A weak entity has a key.
B. A weak entity must imply an existence dependency.
C. An existence dependency needs not to imply a weak entity.
D. A weak entity can be identified by using its own attributes.
Answer: A D
5. [3] Which of the following is not fundamental operation?
A.
B.
C.
D.
Answer: C D
Student Number: __________________
Question 2 35 marks
You are required to build a database to manage the student societies in a university. The bold names should be the entities in your design.
1) For each society, you need to record its name, contact email, and the URL of the web site. We assume that the society name can uniquely identify a society.
2) A society issues membership card to member students. Each card has a unique card id, the holders name, holders student id, issue date, and membership expiry date.
3) A student joins one or more societies and holds a membership card of the societies. For every student, information like student ID, name, email, gender and department name are needed to be stored in the database.
4) Every semester of a year a society must elect a new executive committee to manage the society. Other information associated with the executive committee includes the office location. Members in the executive committee are students, who serve the executive committee of some society by taking some committee position (such as chairperson or secretary).
Student Number: __________________
a. [20] Draw an ER diagram f