Ask Question
17 October, 23:06

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. 17 October, 23:09
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers