Question
Write the following queries in relational algebra. 1. Find the name of companies that produce milk 2. Find the cid of companies that produce milk
Write the following queries in relational algebra. 1. Find the name of companies that produce milk 2. Find the cid of companies that produce milk or sugar. 3. Find the cid of companies that produce both milk and sugar. 4. Find the cname of companies that produce same products that are produced by the company name XYZ 5. Find the cid of copanies that produce every products. 6. Find the cid of companies that produce milk but not sugar. 7. Find the name of companies that do not produce any product. 8. Find the name of companies that produce at least one product. 9. Find the name of the the most expensive product. 10. Find the pid of the most expensive product that produced by company named XYZ
companies (cid:integer, cname:string, address:string) products (pid:integer, pname:string) produce (cid:integer, pid:integer, cost:integer) companies products produce cid cname address 1Torku cid cname 1 milk 2 cola 3 sugar 4teia cid pid cost 1 1 2000 1 3 3000 2 1 1500 2 2 2500 3 2 4000 5 3 3000 5 4 3200 6 13000 6 22500 6 3 3000 6 4 2600 7 2 3000 8 1 2500 8 3 3200 8 4 3000 Konya Ankara 2Sutas 3 NametBursa 4 Tat 61 Pepsi 8Eti Bursa Rize ?stanbul 5 Dogus | Coca cola ?stanbul zmir Windows bu Windows bad iasl Gslac JJaStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started