Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MySQL/PHP Database Applications

Authors: Jay Greenspan, Brad Bulger

1st Edition

978-0764535376

More Books

Students also viewed these Databases questions