DB PracticeLab 04
DB PracticeLab 04
Q1. Consider a database system for an educational institute. Map Given ERD to
Relational Schema
In an educational institute, there are several departments and students belong to one of
them. Each department has a unique department number, a name, a location, phone
number and is headed by a professor. Professors have a unique employee Id, name
including first and last name and phone number. We like to keep track of the following
details regarding students: name, unique roll number, gender, phone number, date of
birth, age and one or more email addresses. Students have a local address consisting of
the hostel name and the room number. They also have home address consisting of house
number, street, city and PIN. It is assumed that all students reside in the hostels. A course
taught in a semester of the year is called a section. There can be several sections of the
same course in a semester; these are identified by the section number. Each section is
taught by a different professor and has its own timings and a room to meet. Students
enroll for several sections in a semester. Each course has a name, number of credits and
the department that offers it. A course may have other courses as pre- requisites i.e,
courses to be completed before it can be enrolled in. Professors also undertake research
projects. These are sponsored by funding agencies and have a specific start date, end date
and amount of money given. More than one professor can be involved in a project. Also,
a professor may be simultaneously working on several projects. A project has a unique
projectId.
Q2. Consider a database system for a Courier service. Map Given ERD to
Relational Schema
UPS prides itself on having up-to-date information on the processing and current location of
each shipped item. To do this, UPS relies on a company-wide information system. Shipped
items are the heart of the UPS product tracking information system. Shipped items can be
characterized by item number (unique), weight, dimensions, insurance amount, destination,
and final delivery date. Shipped items are received into the UPS system at a single retail
center. Retail centers are characterized by their type, uniqueID, and address. Shipped items
make their way to their destination via one or more standard UPS transportation events (i.e.,
flights, truck deliveries). These transportation events are characterized by a unique
scheduleNumber, a type (e.g, flight, truck), and a deliveryRoute. Please create an Entity
Relationship diagram that captures this information about the UPS system. Be certain to
indicate identifiers and cardinality constraints.
Q3. Business Case: Pak Wheels. Map Relational Schema
Pak Wheels offers to its customers the option of purchasing a car using repayment schemes
of over 1 year, 2 years, 3 years, 4 years or 5 years. A customer may purchase one or more
cars under the scheme. When a customer purchases a car, he or she gets to choose one of the
repayment scheme options for each purchase or may pay the whole amount in one go,
meaning a repayment scheme option may be selected by one or more customers or may not
be selected at all. A customer will have a unique customer number, a name, an address, and a
phone number. A repayment scheme option will have a unique repayment scheme number, a
name and the number of years for repayment. A car will have a unique car code, a make, a
model, year of manufacture and a price. The company pays commission on sales of cars to its
salespeople and therefore it will also keep information about each sale which will include a
unique sales ID and commission to be paid on that sale. The company will also want to know
who made the sales and the car involved in that transaction so that the commission can be
determined. A salesperson will have a unique salesperson ID, a name, a phone number and an
email address.