Ask Question
29 November, 13:34

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. 29 November, 16:59
    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?
Get 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 & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers