{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CPSC 304 2005 MIDTERM 1 SOLUTIONS

# CPSC 304 2005 MIDTERM 1 SOLUTIONS - ComputerScience304...

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

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

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

View Full Document
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.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern