1. Relational Algebra/Calculus

Given the following database scheme:

CUSTOMER (Cust#, Cust_Name, Cust_City)
ORDER (Order#, Ord_Date, Cust#, Ord_Amt)
ORDER_ITEM (Order#, Item#, Qty)
ITEM (Item#, Item_Name, Unit_Price)
SHIPMENT (Order#, Warehouse#, Ship_Date)
WAREHOUSE (Warehouse#, Warehouse_City)
WareHOUSE_ITEM (Item#, Warehouse#, Qty)

Write down relational expressions (either relational algebra or relational calculus) for the following queries.

(a) List Order#, Ord_Date and Ship_Date for orders which have not been shipped. You can use CURRENT_DATE as the value of the current system date and time.

(b) List Order# and Warehouse_City from customers who live in Brisbane.

(c) Produce a list of Item# that has never been ordered.

(d) List Item_Name and Qty that are stored in all warehouses in Sydney.

(e) List the most popular item(s) being ordered.

2. B+ Tree

A PARTS file with Part# as the key field includes records with the following Part# values: 37, 11, 6, 12, 8, 26, 16, 35, 22, 1, 9, 4, and 27. Suppose that the search field values are inserted on the given order in a B+ tree of order p = 3 and Pleaf = 2.

(a) Show how the tree will expand after each inserted value and what the final tree will look like.

(b) Delete the following values: 26, 12, 1, 37, 9, 11, 35, and 6. Show how the tree will shrink after each deleted value in the given order and show the final tree.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.