2

I have an assigned task at the uni and I have the three relations that follow:

  • Customer (Name, City, Account)

  • Offer (Product_Description, Supplier, Price)

  • Order (Name, Product_Description, Quantity, Supplier)

Domain calculus is already given:

  • F = {Name, City| ∃ Account, Product_Description, Supplier, Price, Quantity (customer(Name, City, Account)

  • ∧ offer(Product_Description, Supplier, Price)

  • ∧ order(Name, Product_Description, Quantity, Supplier)

  • ∧ Price≥ 100 ∧ Supplier= ’Meier’)}

I have been asked to express this domain calculus as a sentence and convert it to relational algebra.

The expression is:

  • List the name and cities of the customers who ordered a product that has a value greater than or equal to 100 and product supplier is Meier.

    (I didn’t use “customers who ordered greater than or equal to 100” because it’s possible that the customer ordered, for example, 2 products (quantity is 2) which has a value of 50 euros.)

Relational Algebra:

  • π name,city (Customer) ⋈π name (Order Price 100 Supplier = 'Meier' (Offer))

I am not sure if my relational expression is accurate. There are many ways to express it but I tried to find the best efficient way for execution plan. (Equivalence of expressions)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.