0% found this document useful (0 votes)
40 views3 pages

Mid_Term_Question_243_CSE3521

The document outlines the mid-term exam for the Database Management Systems course, detailing the structure, rules, and content of the exam. It includes requirements for designing a flight management system for an airline, relational database schema questions, and SQL query tasks. Additionally, it emphasizes the consequences of unfair practices during the exam.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views3 pages

Mid_Term_Question_243_CSE3521

The document outlines the mid-term exam for the Database Management Systems course, detailing the structure, rules, and content of the exam. It includes requirements for designing a flight management system for an airline, relational database schema questions, and SQL query tasks. Additionally, it emphasizes the consequences of unfair practices during the exam.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Mid-term Exam: : Trimester: Fall 2024

Course Code: CSE 3521, Course Title: Database Management Systems


Total Marks: 30 Duration: 1 Hour 30 Minutes

Any examinee found adopting unfair means will be expelled from the trimester / program as
per UIU disciplinary rules.
_________________________________________________________________________________

1. a) “Urao” is a leading airline in Bangladesh, which has decided to automate its entire 8+
flight management system to enhance service quality and customer satisfaction. To 2=
design the system the following requirement specifications were provided to a 10
software development company:

The airline operates from several airports throughout Bangladesh and internationally.
Each airport has a unique airport code, airport name, city, country, and contact phone
number. The airline operates multiple flights daily. Information stored about each
flight includes the flight number, airline name, departure time, arrival time, flight
status (Scheduled, On-Time, Delayed, or Canceled), and the airports from which the
flight departs and arrives. Each flight has a unique flight number across the airline's
network.

Each flight is assigned a specific aircraft. The details stored for each aircraft include a
unique aircraft ID, model name, manufacturer, number of economy seats and the
number of business class seats. An aircraft can be assigned to multiple flights over
time, but only one flight at a time.

Passengers must register with the airline before booking a flight. Information stored
about passengers includes their first and last names, address, contact number, and
email. Each registered passenger is assigned a unique passenger ID.

Flight bookings are mandatory for passengers intending to travel. A booking includes
the booking ID, booking date, payment status (Paid or Unpaid), total fare, passenger
ID, and the flight number for which the booking is made. Each booking is assigned a
unique booking ID.

Additionally, each flight is staffed by a team of crew members, including the pilot, co-
pilot, and cabin crew. The information stored about crew members includes a unique
crew ID, name, role (Pilot, Co-Pilot, Cabin Crew), years of experience, salary, and the
flight number they are assigned to. A flight may have multiple crew members assigned
to it.

Finally, for each flight, multiple tickets are issued. Ticket information includes a
unique ticket ID, seat number, travel class (Economy or Business), booking ID, and
the passenger ID for the person using the ticket. A booking may include multiple
tickets if several passengers are traveling together.

Now, design an ER diagram for the Scenario capturing all the entities, their
cardinalities and relationships.

b) “All super keys are eligible to be primary keys” - support or refute this statement
with proper reasoning and examples.

2. Draw the corresponding schema diagram based on the erd given in Figure 1. 5

3. Consider the following relational database schema: 1+


1+
Patients (patient_id, name, age, gender, address) 2=
Doctors (doctor_id, name, specialization, salary) 4
Appointments (appointment_id, patient_id, doctor_id, date, time_slot)
Medicine (medicine_id, name, category, price)
Medications (prescription_id, medicine_id, dosage)
Prescriptions (prescription_id, appointment_id, remarks)

Answer the following questions using relational algebra:


a) Find the details of male patients who reside in Palashi.
b) List the names of all patients along with the medicines prescribed to them.
c) Find the specializations of doctors who have never treated patients older than
70 years.
4. Consider the following schema. 2+
2+
Employee (employee_id, name, salary) 1+
Showroom (showroom_id, location, opening_date, manager_id) 2+
Customer (customer_id, name, email, phone_number, address) 2+
Order (order_id, order_date, customer_id, showroom_id) 2=
Product (product_id, name, description, unit_price, stock_quantity) 11
OrderDetails (order_id, product_id, quantity, total_price)

Now write sql queries for the below.

a) Write an SQL query to create the Showroom table. location and opening_date
columns must not allow null values.
b) Add a new column „showroom_id‟ to the employee table, which should store
the showroom each employee is assigned to and ensure that it references the
Showroom table. [Consider this change for the following questions]
c) Find the name, description, and stock quantity of products that have a price
greater than 1000 taka.
d) Find the employee names who earn more than their manager.
e) Find the product ID, name and the number of times each product has been
ordered and display the results in descending order.
f) Find all the showrooms that have the top three most number of employees.

You might also like