midterm-w2005-ans - Winter 2005 COSC-3421 Midterm Test w/...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Winter 2005 COSC-3421 Midterm Test w/ answers p. 1 of 16 COSC-3421 Midterm Test w/ answers Family Name: Given Name: Instructor: Parke Godfrey Exam Duration: 75 minutes Term: Winter 2005 Your assignment, should you choose to accept it, is to answer the following questions to the best of your knowledge. Keep answers brief and to the point. Answers, such as yes or no should be justified by supporting argument, however. Be precise and be careful. The exam is closed-book and closed-notes. Write any assumptions that you need to make along with your answers, whenever necessary. There are five major questions. Each is worth ten points for a total of 50 points. The weight for each sub-question is indicated (or is one point by default). Regrade Policy You must not write anything on the exam paper after the exam period if it is to be considered for regrading. Write any subse- quent notes on separate paper. Regrading should be requested in writing. Write what you would like to be reconsid- ered. Note that an exam accepted for re- grading will be reviewed and regraded in entirety (all questions). Grading Box 1. 2. 3. 4. 5. Total Winter 2005 COSC-3421 Midterm Test w/ answers p. 2 of 16 1. (10 points) E-R. Wheres the diagram?! (Exercise) Customer ( cid , name , address ) Magazine ( title , publisher , topic , frequency , url ) Pricing ( title , publisher , period , offer , price ) FK (title, publisher) refs Magazine Subscribes ( cid , title , publisher , offer , from , period ) FK (cid) refs Customer FK (title, publisher, period, offer) refs Pricing In each relation, the underlined attributes indicate the primary key. Attributes in italics (e.g., name ) are not nullable. FK stands for foreign key . (These conventions are used throughout the test.) The attribute period in Pricing tells for how many years the subscription is. The attribute frequency in Magazine tells how often the magazine is published (weekly, monthly, etc.). The attribute from in Subscribes tells when the subscription for the customer commences. a. (7 points) Draw an E-R diagram for the relational schema above. Do not add any unnec- essary elements. Do not make anything an entity that can be modeled appropriately as a relationship. Do not make anything a relationship (or an entity) that can be modeled appropriately as an attribute. Magazine frequency url Pricing costs price title publisher Customer name address cid offer topic subscribes from period Note that this would mean that period is part of subscribes s primary key. There is no easy way to model in E-R what we have exactly (that period is not part of subscribes s key). So a further constrint we add to accompany the diagram is that a customer can subscribe to a magazine via a given offer once, so for just one period. Winter 2005 COSC-3421 Midterm Test w/ answers p. 3 of 16 b. (3 points) Say that your schema additionally has Offer ( offer , period ) and Pricing is changed to Pricing ( title , publisher ,...
View Full Document

This note was uploaded on 02/13/2011 for the course CSE/MATH 3421 taught by Professor Mixprofs during the Winter '09 term at York University.

Page1 / 16

midterm-w2005-ans - Winter 2005 COSC-3421 Midterm Test w/...

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

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