LIVES(personname, street, city) shows where a person employed by the company lives
WORKS(personname, companyname, salary) shows a person's company name and salary
LOCATEDIN(companyname, city) shows in which city a company is located
MANAGES(personname, managername) shows the manager name of an employee
For the relations given above, define relational algebraic expressions for the following queries.
Along with correctness, efficiency of queries is an important consideration in query design.
Learn to type only the symbols given in class notes for the relational algebraic expressions. You
can find many of the symbols under the Symbol option under the Insert tab in Word. Do not use
Pi for $\pi$, * for $\bowtie$, S for $\sigma$, etc. You can find the bowtie symbol in the Lucida Sans font, and $\sigma$
and $\pi$ under the Symbol font in MS-Word. Note: The Join operation between two relations
MUST be done on only one attribute with a common attribute domain in both relations.
1. Find the personnames of all people who do not work for the company "First Bank
Corporation" located in "Sycamore".
2. Find the personnames and city where they live for all those who work for the company "First
Bank Corporation." Use the Join operation for this query.
3. Find the personnames and city where they live for all those who work for the company "First
Bank Corporation." Use the Product operation for this query.
4. Find the personname, street, city of all people who work for "First Bank Corporation" and
earn more than $10,000.
5. Find personnames of all people who do not live in the same city as the company they work
for.
6. Modify table Locatedin so that Company "First Bank Corporation" is now located in the city
"DeKalb."
7. Give all those who are not employees of "First Bank Corporation" a 1 percent raise.
8. Delete all tuples (rows) in the WORKS relation for employees of "First Bank Corporation".
9. Add to the LIVES table a new row of data with personname "Smith", street "10 State Street
and city "Cortland".
10. Explain in English what will this relational algebraic expression would do?
MANAGES $\Join$ $\Pi_{personname}$ ($\sigma_{city = "Sycamore"}$ (LIVES))