Closed book University of Calgary Department of Computer Science CPSC 471 Database Management Systems Sample Quiz Solve the 4 (four) questions and write your solutions on your own white papers in clean and well organized manner. Scan or take a photo of each sheet which contains your answers, Combine your answers in one file and upload on D2L. Q1. You are asked to work as database designer to consider the following problem description: A research institute hires researchers to work in research labs. A researcher may work in more than one research lab. Each research lab has a director (who is a researcher), a location and students (keep only names of students); it also runs different research projects. A researcher has equipment in each lab he/she works in. Each equipment has serial number, name, color and may be shared by several researchers. A researcher has an ID, name, office, and at least one research area. Researchers may collaborate and write papers from research projects. Each researcher records the number of hours he/she spent on writing a paper. A research project has a title, budget, description, and several deadlines specified as month and year. A paper has a title, at least one author and number of pages. Further, a paper may be published in a conference or in a journal. A conference has a name, publisher, location and date. A journal has name, publisher, and at least one editor who is a researcher. A publisher may also publish books written by researchers. A book has title, number of pages and is used as a reference in at least one research project. Finally, a researcher gets paid for each book he/she writes. 1. Draw an extended or normal Entity Relationship diagram by identifying entities, relationships, and their attributes. 2. Only when it is obvious from the above description, decide on relationship cardinality. Q2. Consider the following table R and its current content (three columns and only five rows/instances): Assume no new rows (instances) will be added to table R. List one candidate key, one super key and one secondary (general) key of R. Your suggested keys may overlap but should not be the same. Candidate key: __________________________ Super key: ___________________________ Secondary key: ____________________________ B b1 b2 b1 b2 b3 A a1 a2 a3 a1 a5 C c2 c2 c3 c2 c1 Q3. Consider the following Entity-Relationship Diagram (ERD): Write down the corresponding relational database schema, all relations, their attributes, primary and foreign keys.