Exercise 1 Draw an E-R diagram for each of the following situations (if you believe that you need to make additional assumptions, clearly state them for each situation): a. A hospital has a large number of registered physicians. Attributes of PHYSICIAN include Physician_ID (the identifier) and Specialty. Patients are admitted to the hospital by physicians. Attributes of PATIENT include Patient__ID (the identifier) and Patient_Name. Any patient who is admitted must have exactly one admitting physician. A physician may optionally admit any number of patients. Once admitted, a given patient must be treated by at least one physician. A particular physician may treat any number of patients, or may not treat any patients. Whenever a patient is treated by a physician, the hospital wishes to record the details of treatment (Treatment_Detail). Components of Treatment_Detail include Date, Time, and Results.

2. Table below shows a Grade Report that is mailed to students at the end of each semester. Prepare an ER diagram reflecting the data contained in Grade Report. Assume that each course is taught by one instructor. Millennium College Grade Report Fall Semester 199X Name: Emily Williams ID: 268300458 Campus Address: 208 Brooks Hall Major: Information Systems Course Title Instructor Instructo Grade ID Name r Location IS 350 IS 465 Database Mgt System Analysis Codd Parsons B104 B317 A B

3. Prepare an E-R diagram for a real estate firm that lists property for sale. The following describes this organization: • The firm has a number of sales offices in several states. Attributes of sales office include Office_Number (identifier) and Location. • Each sales office is assigned one or more employees. Attributes of employee include Employee_ID (Identifier)

and Zip_Code. The firm lists property for sale. Attributes of owners are Owner_ID (identifier) and Owner_Name. no record of marriage is required if an employee’s spouse is not also an employee. there is always one employee assigned to manage that office. An employee does only one type of job at any given time. There are 11 different departments. State. A vendor typically supplies equipment to many departments. City. . An attribute of the relationship between property ad owner is Percent_Owned. and so on). An employee may manage only the sales office to which she is assigned. engineer. their skills. required to store his or her name and date of birth. each department deals with many vendors. Attributes of property include Property_ID (identifier) and Location. • An employee must be assigned to For each sales office. If an employee is currently married to another employee of Projects. A database is required to keep track of all employees. An employee can report to only one department. Inc. or may have no properties listed. Each unit of property must be listed with one (and only one) of the sales offices. Projects. Each employee is given a job title (for example. Draw an E-R diagram for the following situation. Each unit of property has one or more owners. only one sales office. Every employee has a unique number assigned by the firm. however. A sales office may have any number of properties listed. projects assigned. is an engineering firm with approximately 500 employees. Components of Location include Address.. each with a unique name. Inc. We are required to store the name and address of each vendor and the date of the last meeting between a department and a vendor.and Employee_Name. and we only need to retain information for an employee’s current job. To procure various kinds of equipment. An owner may own one or more units of property. secretary. the date of marriage and who is married to whom must be stored. • • • 4. and departments worked in. Each department has a phone number..

and we must store the estimated cost of each project. a name. checking drawings.). Each project is worked on by one or more graduate students (known as the project’s research assistants). a professor must supervise their work on the project. 5. Each skill is assigned a number. M. Graduate students can work on multiple projects. An employee can have many skills (preparing material requisitions. g. California Petrochemicals. Graduate students have an SSN. and a budget. Each project is managed by one professor (known as the project’s principal investigator). Projects have a project number.D. and we must store a short description of each skill. Employees use each skill that they possess in at least one project. or Ph. and a research specialty.Many employees can work on a project. Each project is worked on by one or more professors (known as the project’s co-investigators). a starting date. For each city. a rank. h. . When graduate students work on a project. Projects are distinguished by project numbers. in which case they will have a (potentially different) supervisor for each one. an ending date. a sponsor name (e. c. f. d. and a degree program (e. and so on). e. an employee MURPHY may prepare requisitions for the Southwest Refinery project and prepare requisitions as well as check drawings for California Petrochemicals).g. an age. Professors have an SSN. Consider the following information about a university database: a. but she or he may use only a given set of skills on a particular project. and so on) but can only be assigned to at most one project in a given city. An employee can work on many projects (for example.S. Professors can manage and/or work on multiple projects. an age. Southwest Refinery. a name. b.g. (For example. NSF). we are interested in its state and population.

Be sure to indicate any key and participation constraints. j.i. and attributes. address. Design and draw an ER diagram that captures the information about the university. SSN. and a main office. A number of technicians work at the airport. DC-10) and has a capacity and a weight. phone number. a time percentage is associated with their job. As a result. and each model is identified by a model number (e. and his or her expertise may overlap with that of other • • . more senior graduate student (known as a student advisor) who advises him or her on what courses to take. a department name.. relationships. m. and each airplane is of a specific model. Your first task is to organize the information about all the airplanes that are stationed and maintained at the airport. Professors work in one or more departments. The airport accommodates a number of airplane models. You need to store the name. Each technician is an expert on one or more place model(s).g. k. that is. l. Graduate students have one major departments in which they are working on their degree. and for each department that they work in. Departments have a professor (known as the chairman) who runs the department. the officials have decided that all information related to the airport should be organized using a DBMS. and you’ve been hired to design the database. and salary of each technician. Computer Sciences Department frequent fliers have been complaining to Dane Country Airport officials about the poor organization at the airport. Departments have a department number. Each graduate student has another. entities. The relevant information is as follows: • • Every airplane has a registration number. Use only the basic ER model here. 6.

and the score that the airplane received on the test. Specify any necessary overlap and covering constraints as well (in English). All airport employees (including technicians) belong to a union. For each testing even. You can assume that each employee is uniquely identified by the social security number. How would you express this constraint in the ER diagram? If you cannot express it. Each test has a Federal Aviation Administration (FAA) test number. a name. the information needed is the date.technicians. also specify the key and participation constraints for each relationship set. explain briefly. Be sure to indicate the various attributes of each entity and relationship set. o. the number of hours the technician spent doing the test. For each traffic controller. The FAA requires the airport to keep track of each time that a given airplane is tested by a given technician using a given test. n. You must store the union membership number of each employee. The airport has a number of tests that are used periodically to ensure that airplanes are still airworthy. The FAA passes a regulation that tests on a plane must be conducted by a technician who is an expert on that model. • • • . Draw an ER diagram for the airport database. • Traffic controllers must have an annual medical examination. This information about technicians must also be recorded. you must store the date of the most recent exam. and a maximum possible score.

Physician_ID Admits Patient_ID PHYSICIAN Treats Specialty PATIENT Patient_ Treatment_ Date Time Results 2.1. a. Student_ID Grade Course_ID Title STUDENT Registers for Instructor_ Name COURSE Name Address Major INSTRUCTOR Teaches Location .

3. Employee_ID Employee_ Name EMPLOYEE Manages Is_ assigned Office_ Number SALES OFFICE Location Property_ID Address City PROPERTY Location State Zip_Code Lists Percent_ Owned Owns Owner_ID OWNER Owner_Name .

Cost Date_Married PROJECT EMPLOYEE Marriage Date_Birth Emp_ Location Title City_Name CITY State Population . Dname Phone Date_Last_ Meet Skill # SKILL Description DEPT Buys _from VENDOR Vname Address Belongs to Emp_skill Ename Emp# Proj # Est.4.

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master Your Semester with a Special Offer from Scribd & The New York Times

Cancel anytime.