Question
Question 1: employee (emp_name, street, city) works (emp_name, comp_name, sal) company (comp_name, city) manages (emp_name, manager_name) 1. Find the names of all employees who work
Question 1:
employee (emp_name, street, city)
works (emp_name, comp_name, sal)
company (comp_name, city)
manages (emp_name, manager_name)
1. Find the names of all employees who work for 1st Bank Corporation.
2. Find the names & cities of residence of all employees who work for 1st Bank Corporation.
3. Find the names, street addresses & cities of all employees who work for 1st Bank Corporation
& earn more than 10,000.
4. Find all employees in the DB who live in the same cities as the companies for which they
work.
5. Find all employees in the DB who live in the same city & the same street as do their managers.
6. Find all employees in the DB who dont work for 1st Bank Corporation.
Question 2:
sailors (sid, sname, rating, age)
reserved (sid, bid, day)
boats (bid, bname, color)
1. Find the names of the sailors who have reserved a red or green boat.
2. Find the names of the sailors with age over 20 who have not reserved a red boat.
3. Find the names of the sailor who have reserved all boats.
4. Find the color of the boat reserved by Smith.
Question 3:
staff (sno, sname, pos, dob, sal, bno)
branch (bno, street, city, pincode)
propertyforrent (pno, street, city, pincode, type, rooms, rent, ownerno, sno, bno)
1. List the names of all managers who earn more than 25000.
2. List the staff names who manage properties for rent in Kolkata.
3. List the names of staff who currently dont manage any properties.
Solve them using relational algebra
Introduction to database system
Solve it ASAP i will give you thumb up
Step 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