Question
Consider the following relational schema (primary keys are underlined): Person ( ssn, pn, age, city); a person's name and age, and the city he/she lives
Consider the following relational schema (primary keys are underlined):
Person ( ssn, pn, age, city); a person's name and age, and the city he/she lives in
Company ( cn, city); a companys name and the city it is located in
WorksFor ( ssn, cn, comp); the company a person works for and his/her compensation from this particular company (a person may work for several companies)
Express the following queries in relational algebra. You may use P,C, and W
as shorthand for Person, Company , and WorksFor respectively.
a)Find the names of people who work in both NYC and Boston.
b)Find the names of unemployed people who live in NYC.
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