CPSC 304 2005 MIDTERM 1 SOLUTIONS

CPSC 304 2005 MIDTERM 1 SOLUTIONS - ComputerScience304...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
The University of British Columbia Computer Science 304 Midterm Examination October 31, 2005 Time: 50 minutes Total marks: 50 Instructor: Rachel Pottinger Name ANSWER KEY Student No (PRINT) (Last) (First) Signature This examination has 6 pages. Check that you have a complete paper. This is a closed book exam. No books or other material may be used. Answer all the questions on this paper. Give very short but precise answers. State any assumptions you make Work fast and do the easy questions first. Leave some time to review your exam at the end. The marks for each question are given in {}. Use this to manage your time. Do not spend on a question more minutes than the marks assigned to it. Good Luck MARKS 1. 2. 3. 4. Total
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Name Student No Page 2 1. {8 marks, 1 mark per question} Circle only one answer per question – no points will be taken off for incorrect answers (i.e., you might as well guess): a. SQL is a procedural language False. SQL is declarative – you specify what you want, not how you want it. The query optimizer will come up with a declarative query execution plan True False b. We use ER diagrams to logically model concepts False. ER diagrams are used for conceptual modeling, not logical modeling. This is on the reminder of where we are in the introduction slide for most units. True False c. This diagram is an example of a relationship with a many to one cardinality ratio False. This is one to many. See ER diagram slides. Note that this was initially graded incorrectly, but this is the correct answer. True False d. Every query that can be expressed in relational algebra can be expressed as a safe query in domain relational calculus; the converse is also true True. The catch is that the queries must be safe, otherwise domain relational calculus is more expressive. See slides on DRC. True False e. AB & C, D & E, E & C is a minimal cover for the set of functional dependencies AB & C, D & E, AB & E, E & C. False. There’s no way to derive AB & E from the first list of dependencies True False f. An update anomaly is when it is not possible to store certain information unless some other, unrelated, information is stored as well. False. An update anomaly is if one copy of such repeated data is updated, an inconsistency is created unless all copies are similarly update. What is described is an insertion anomaly (see textbook page 607) True False g. Given the table R(a,b ,c) (i.e., a and b form the primary key of R), the following is a valid table definition.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 6

CPSC 304 2005 MIDTERM 1 SOLUTIONS - ComputerScience304...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online