Consider the Electrical Power company database which has the following tables: Powerplant(Powerplant_ID, location, type, capacity, unit_price)…
Consider the Electrical Power company database which has the following tables:
Powerplant(Powerplant_ID, location, type, capacity, unit_price)
Customer(Customer_ID, name, address, DoB, monthly_demand)
Customer_usage_profile(ID, month_name, Customer_ID, Powerplant_ID)
The powerplant relation has attributes Powerplant_ID, location, type {Thermal power, hydro power, nuclear power}, capacity, and unit_price of power generated by the powerplant.
The customer relation has attributes Customer_ID, name, address, date of birth (DoB) and monthly_demand of electrical power.
The Customer_usage_profile relation stores the user profile of a customer. A customer uses more hydropower during the rainy season and thermal or nuclear power during the dry season.
Write the relational algebra expressions for the following queries:
(i) List the customers with a yearly bill of more than taka 5,000.
(ii) List the customers who use nuclear power during December and have a monthly bill less than 500 in December.
From the BPDB Assistant Engineer (CSE) 2021 – Written (BUET) exam, question 5 of 6.