6639420-Ex1-Solutions.pdf

August 15, 2017 | Author: Alcides Eduardo Zelaya | Category: Federal Aviation Administration, Databases, Business, Further Education, Computing And Information Technology
Share Embed Donate


Short Description

Download 6639420-Ex1-Solutions.pdf...

Description

1.

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 Employee_Name. only one sales office.

An employee must be assigned to



For each sales office, there is always one employee assigned to manage that office. An employee may manage only the sales office to which she is assigned.



The firm lists property for sale. Attributes of property include Property_ID (identifier) and Location. Components of Location include Address, City, State, and Zip_Code.



Each unit of property must be listed with one (and only one) of the sales offices. A sales office may have any number of properties listed, or may have no properties listed.



Each unit of property has one or more owners. Attributes of owners are Owner_ID (identifier) and Owner_Name. An owner may own one or more units of property. An attribute of the relationship between property ad owner is Percent_Owned.

4. Draw an E-R diagram for the following situation. Projects, Inc., is an engineering firm with approximately 500 employees. A database is required to keep track of all employees, their skills, projects assigned, and departments worked in. Every employee has a unique number assigned by the firm, required to store his or her name and date of birth. If an employee is currently married to another employee of Projects, Inc., the date of marriage and who is married to whom must be stored; however, no record of marriage is required if an employee’s spouse is not also an employee. Each employee is given a job title (for example, engineer, secretary, and so on). An employee does only one type of job at any given time, and we only need to retain information for an employee’s current job. There are 11 different departments, each with a unique name. An employee can report to only one department. Each department has a phone number. To procure various kinds of equipment, each department deals with many vendors. A vendor typically supplies equipment to many departments. 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.

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

i. Departments have a department number, a department name, and a main office. j. Departments have a professor (known as the chairman) who runs the department. k. Professors work in one or more departments, and for each department that they work in, a time percentage is associated with their job. l. Graduate students have one major departments in which they are working on their degree. m. Each graduate student has another, more senior graduate student (known as a student advisor) who advises him or her on what courses to take. Design and draw an ER diagram that captures the information about the university. Use only the basic ER model here, that is, entities, relationships, and attributes. Be sure to indicate any key and participation constraints. 6.

Computer Sciences Department frequent fliers have been complaining to Dane Country Airport officials about the poor organization at the airport. As a result, 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. Your first task is to organize the information about all the airplanes that are stationed and maintained at the airport. The relevant information is as follows: •

Every airplane has a registration number, and each airplane is of a specific model.



The airport accommodates a number of airplane models, and each model is identified by a model number (e.g., DC-10) and has a capacity and a weight.



A number of technicians work at the airport. You need to store the name, SSN, address, phone number, and salary of each technician.



Each technician is an expert on one or more place model(s), and his or her expertise may overlap with that of other

technicians. This information about technicians must also be recorded. •

Traffic controllers must have an annual medical examination. For each traffic controller, you must store the date of the most recent exam.



All airport employees (including technicians) belong to a union. You must store the union membership number of each employee. You can assume that each employee is uniquely identified by the social security number.



The airport has a number of tests that are used periodically to ensure that airplanes are still airworthy. Each test has a Federal Aviation Administration (FAA) test number, a name, and a maximum possible score.



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. For each testing even, the information needed is the date, the number of hours the technician spent doing the test, and the score that the airplane received on the test. n. Draw an ER diagram for the airport database. Be sure to indicate the various attributes of each entity and relationship set; also specify the key and participation constraints for each relationship set. Specify any necessary overlap and covering constraints as well (in English). o. The FAA passes a regulation that tests on a plane must be conducted by a technician who is an expert on that model. How would you express this constraint in the ER diagram? If you cannot express it, explain briefly.

1.

a.

Physician_ID

Patient_ID Admits

PHYSICIAN

PATIENT Treats

Specialty

Patient_

Treatment_

Date

Time

Results

2. Student_ID

Grade

Registers for

STUDENT

Name

Address

Course_ID

Major

Title

COURSE Instructor_ Name

INSTRUCTOR

Location

Teaches

3.

Employee_ Name

Employee_ID

EMPLOYEE

Manages

Is_ assigned Office_ Number SALES OFFICE

Lists

Location Property_ID Address City

PROPERTY

Location

State Zip_Code

Percent_ Owned

Owns Owner_ID OWNER Owner_Name

4.

Dname

Phone

DEPT

Skill #

Date_Last_ Meet

Buys _from

VENDOR

SKILL Vname

Description

Address

Belongs to

Ename

Emp_skill

Emp# Proj #

Date_Married PROJECT

Est. Cost

EMPLOYEE

Marriage

Date_Birth Emp_ Location Title

City_Name CITY State Population

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF