Ask Question
18 January, 09:51

You may use the CAP database handout. Write the relational algebra statement to answer the following question. Then write the SQL statement to answer the same question.

Get cities of agents booking an order from customer c002.

+2
Answers (1)
  1. 18 January, 13:34
    0
    Answer and Explanation:

    I'm assuming that you have two databases (since no CAP database is provided in the question) Agent, Customer.

    Agent having the attributes agent_id, city, customerid etc ...

    Customer having customerid, customer_name etc.

    Relational Algebra statement:

    π customerid (Agent) (customerid = c002 (Customer))

    city

    Query:

    select city from Agent where customerid in (select customerid from Customer where customer_name="c002);
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “You may use the CAP database handout. Write the relational algebra statement to answer the following question. Then write the SQL statement ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers