DOC PREVIEW
UCI ICS 184 - Midterm Exam

This preview shows page 1-2-3-4 out of 12 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Midterm ExamFall 2000Max. Points: 100(Please read the instructions carefully)Instructions:- Total time for the exam is 75 minutes. No extra time will be awarded so budget yourtime accordingly.- The exam is closed books and closed notes.- The exam is divided into 2 sections.- 10 multiple choice questions – a correct answer will get you 5 points, an incorrectanswer will cost you 2 point and answers left blank will get you 0 points.- 4 other questions totaling 50 points- If you find ambiguities in a question or in the schema, write down the interpretationyou are taking, and then answer the question based on your interpretation.- This exam contains 12 pages of which pages 11 and 12 are blank. You can use themas scratch paper.NAME: ALIAS:Part Points ScoreI50II 50Total 100Question 1: Which of the following statements are true1. Each superkey is a superset of some candidate key.2. Each primary key is also a candidate key, but there may be candidate keys that are notprimary keys.a) only 1 is trueb) only 2 is truec) both 1 and 2 are trued) neither 1 nor 2 are trueAnswerQuestion 2. Below is an ODL specification:Interface A interface B interface C{relationship Set<B>R {relationship Set<A>R {relationship Set<B>S inverse B ::R; inverse A ::R; inverse B ::S; relationship C T relationship C S relationship A T inverse C::T; inverse C::S; inverse A::T;}; }; };For simplicity all attributes are omitted.Which one of the E –R diagrams below , best captures the intent of the ODL specificationabove?a)AnswerABCRTSABCRTSb)ABCRTSABCRTSc)d)Question 3: Consider the following E-R diagramSuppose the key of entity set A is attribute A, the key of B is B , the key of C is C, the keyof D is D. If we translate relationship set R into a relation R (A,B, C,D), what are thekeys of R?a) {A}b) {B,C} AND {C,D}c) {A,C}d) none of the aboveAnswer :A BC DRThe following two questions refer to the relational scheme R (A, B, C, D, E , F, G, H)and the following functional dependencies over R:A → BCDAD → EEFG → HF → GHQuestion 4: Based on the functional dependencies, there is one key for R.What is it ?Question 5: One of the four functional dependencies can be removed without altering thekey.Which one ?The following two questions refer to the instances of relations R( A,B,C,D,E) and S (P,Q,R,S) shown below :ABCDE PQRS74123 721415311 521216324 123755123Question 6: Which of the following FDs hold over the instance of relation R givenabove?I) ABC → EII) CD → EBIII) B → Da) I & III b) II & III c) I & II d) I onlyAnswer :Question 7: Which of the following Inclusion Dependencies hold over the instances ofrelation R and S given above?I) PQ⊆ ADII) RS ⊆ CDIII) PQR ⊆ ADCa) I & III b) II & III c) I & II d) I onlyAnswer :Question 8: Consider a relation scheme R( P,M,L,Q,N) with the FD’s :M → Q, PM →L, QN→PWhat are the keys of R,a) {P,M,N} & {M,Q,N}b) {P,M,Q,N}c) {M,N}d) {P,M} & {Q,N}Answers :Question 9: Consider the following ER diagramFor simplicity, we have not listed the attributes associated with the entity sets. Let usassume that the keys corresponding to the three entity sets employee, projects, and toolsare ssn, proj#, and toolid respectively. Furthermore, the work relationship has an attributestart-date. If we map the above ER diagram into the relational model, what will be therelation scheme for the relationship set usinga) using(ssn, toolid)b) using(toolid,start-date)c) using(ssn,toolid,proj#)d) none of the aboveAnsweremployeeprojecttoolsworkusingQuestion 10: Consider the following two ER diagrams -- ER1 and ER2ER1 ER2The statement that the number of entities in entity set P must be greater than or equal tothe number of entities in entity set Q holds for:a) ER1 but not ER2b) ER2 but not ER1c) Both ER1 and ER2d) Neither ER1 nor ER2AnswerP QRPRQThe next four questions are based on the following information1. Manufacturers have a name, which we may assume is unique, an address, and aphone number.2. Products have a model number and a type (e.g., television set). Each product is madeby one manufacturer, and different manufacturers may have different products withthe same model number. However, you may assume that no manufacturer would havetwo products with the same model number.3. Customers are identified by their unique social security number. They have emailaddresses, and physical addresses. Several customers may live at the same (physical)address, but we assume that no two customers have the same email address.4. An order has a unique order number, and a date. An order is placed by one customer.For each order, there are one or more products ordered, and there is a quantity foreach product on the order.Question 11: (15 points) In the space below, draw an E/R diagram that represents theabove information. Do not forget to underline the keys as usual.Question 12: (15 points) Design the ODL Description of the above information. Givethe classes (Interfaces), attributes and relationships for each class, and information aboutthe inverse of relationships.Question 13: (15 points) Convert the E/R diagram in Question 11 to the relationalmodel. Remember to specify not just the relational scheme but also integrity constraintsincluding keys as well as inclusion dependencies.Question 14: (5 points) Suppose we had a relation Customer(ssNo, email, addr) as partof our relational database schema. What functional dependencies would you expect tohold?What are the keys for this


View Full Document

UCI ICS 184 - Midterm Exam

Download Midterm Exam
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Midterm Exam and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Midterm Exam 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?