Mid_Term_Question_243_CSE3521
Mid_Term_Question_243_CSE3521
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
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.