5
Annexure-1 ARMY INSTITUTE OF MANAGEMENT & TECHNOLOGY MBA-8 BATCH Minor Assignment: E-R MODELS Syllabus Ref: MS 239.2.2 Mks Allotted : 10 Note: - All questions is compulsory for all. Last date of submission:-14-09-2012 Exercise1:-Design AN E-R Model Case study of university system A university DB contains information about professors (identified by social security number, or SSN) and courses (identified by coursei d). Professors teach courses; each of the following situations concerns the Teachers relationship set. For each situation, draw an ER diagram that describes it (assuming no further constraints hold). Professors can teach the same course in several semesters, and each offering must be recorded. Professors can teach the same course in several semesters, and only the most recent such offering needs to be recorded. (Assume this condition applies in all subsequent questions.) Every professor must teach some course. Every professor teaches exactly one course. Every professor teaches exactly one course, and every course must be taught by some professor. Now suppose that certain courses can be taught by a team of professors jointly, but it is possible that no one professor in a team can teach the course EXERCISE 2:-(Post-Graduate studies) Consider a database that records the grades of students in different exams of different course offerings. a) Assume that course offerings include time, room; and can be identified uniquely by course_no, semester, year, section_no. b) students, including student-id, name, and program;

ER Model Assignment

Embed Size (px)

Citation preview

Page 1: ER Model Assignment

Annexure-1

ARMY INSTITUTE OF MANAGEMENT & TECHNOLOGYMBA-8 BATCH

Minor Assignment: E-R MODELS

Syllabus Ref: MS 239.2.2 Mks Allotted : 10

Note: - All questions is compulsory for all. Last date of submission:-14-09-2012

Exercise1:-Design AN E-R ModelCase study of university system

– A university DB contains information about professors (identified by social security number, or SSN) and courses (identified by coursei d). Professors teach courses; each of the following situations concerns the Teachers relationship set. For each situation, draw an ER diagram that describes it (assuming no further constraints hold).

• Professors can teach the same course in several semesters, and each offering must be recorded.

• Professors can teach the same course in several semesters, and only the most recent such offering needs to be recorded. (Assume this condition applies in all subsequent questions.)

• Every professor must teach some course.• Every professor teaches exactly one course.• Every professor teaches exactly one course, and every course must be

taught by some professor. Now suppose that certain courses can be taught by a team of professors jointly, but it is possible that no one professor in a team can teach the course

EXERCISE 2:-(Post-Graduate studies) Consider a database that records the grades of students in different exams of different

course offerings.a) Assume that course offerings include time, room; and can be identified

uniquely by course_no, semester, year, section_no.b) students, including student-id, name, and program;c) Exam, including eid (optional), name, place, time.

Furthermore, grades of students in different exams of course offerings must be appropriately modeled.

Construct an E-R diagram that models exams as entities, and uses a ternary relationship, for the above database.

Construct an alternative E-R diagram that uses only a binary relationship between students and course-offerings.

Make sure that only one relationship exists between a particular student and course-offering pair, yet you can represent the marks that a student gets in different exams of a course offering.

Page 2: ER Model Assignment

Exercise3 : Airport database Prepare E-R model Convert to the relational model keeps track of airplanes, their owners, airport employees and pilots Each airplane has a registration number, is of a particular plane type and is stored in a

particular hanger. Each plane type has a model number, capacity and weight. Each hanger has a number, capacity and location.

The database also keeps track of who owns which plane. Persons have name, address and phones.

A person buys a plane on a particular date and cost. Airport database…. Each plane undergoes service many times. A service information contains date of work, nature, hours spent, cost, etc. Pilots and employees are persons. Pilots have a license number with validity and

salary. Employees have a number, rank and salary. Each pilot is authorized to fly certain types of planes. Employees are involved in

servicing of planes. prepare E-R model convert to the relational model

Exercises4: E-R Diagram for library management system

In the library Management system, the following entities and attributes can be identified.

Book -the set all the books in the library. Each book has a Book-id, Title, Author, Price, and Available (y or n) as its attributes.

Member-the set all the library members. The member is described by the attributes Member_id, Name, Street, City, Zip_code, Mem_type, Mem_date (date of membership), Expiry_date.

Publisher-the set of all the publishers of the books. Attributes of this entity are Pub_id, Name, Street, City, and Zip_code.

Supplier-the set of all the Suppliers of the books. Attributes of this entity are Sup_id, Name, Street, City, and Zip_code.

Assumptions: a publisher publishes a book. Supplier supplies book to library. Members borrow the book (only issue).Return of book is not taken into account

Exercise5:- Construct an E-R Diagram For Car Rental Co

A database is to be designed for a Car Rental Co. (CRC). The information required includes a description of cars, subcontractors (i.e. garages), company expenditures, company revenues and customers. Cars are to be described by such data as: make, model, year of production, engine size, fuel type, number of passengers, registration

Page 3: ER Model Assignment

number, purchase price, purchase date, rent price and insurance details. It is the company policy not to keep any car for a period exceeding one year. All major repairs and maintenance are done by subcontractors (i.e. franchised garages), with whom CRC has long-term agreements. Therefore the data about garages to be kept in the database includes garage names, addresses, range of services and the like. Some garages require payments immediately after a repair has been made; with others CRC has made arrangements for credit facilities. Company expenditures are to be registered for all outgoings connected with purchases, repairs, maintenance, insurance etc. Similarly the cash inflow coming from all sources - car hire, car sales, insurance claims - must be kept of file.CRC maintains a reasonably stable client base. For this privileged category of customers special credit card facilities are provided. These customers may also book in advance a particular car. These reservations can be made for any period of time up to one month. Casual customers must pay a deposit for an estimated time of rental, unless they wish to pay by credit card. All major credit cards care accepted. Personal details (such as name, address, telephone number, driving licence, number) about each customer are kept in the database.

Exercise6:- Construct an E_R Diagram for a Hospital

Construct an E_R Diagram for a Hospital with a Set of patients & a set of medical doctors. Associate with each patient a log of the various tests & examination conducted.

Exercise7:- Construct an E_R Diagram for a university DB

• Professors have an SSN, a name, an age, a rank, and a research specialty.

• Projects have a project number, a sponsor name, a starting date, an ending date, and a budget.

• Graduate students have an SSN, a name, an age, and a degree program (M.S. or Ph.D.)

• Each project is managed by one professor (known as the project’s principal investigator).

• Each project is worked on by one or more professors (known as the project’s co-investigators).

• Professors can manage and/or work on multiple projects.• Each project is worked on by one or more graduate students (the

project’s research assistants).

Exercise8:- Construct an E_R Diagram for a university registrar’s office A university registrar’s office maintains data about the following entities:

a) courses, including number, title, credits, syllabus, and prerequisites; b) course offerings, including course number, year, semester, section number,

instructor(s), timings, and classroom; c) students, including student-id, name, and program;d) instructors, including identification number, name, department, and title. e) Further, the enrollment of students in courses and grades awarded to students

in each course they are enrolled for must be appropriately modeled.

Exercise9:- Construct an E-R Diagram for a Banking Enterprise

Page 4: ER Model Assignment

INSTRUCTIONS FOR ASSIGNMENT

• Hand written, assignment is to be submitted with the standard AIMT Assignment Sheet (yellow color).

• This is an individual assignment and is to be written in own hand and NOT typed/printed on computer.

• Late submission will not be accepted.• This is an individual assignment.

Note: - Construct appropriate tables for each of the E_R diagrams in exercise