Question

Consider the following database instance, which contains information about employees and the projects to which they...

Consider the following database instance, which contains information about employees and the projects to which they are assigned:

Employee

empId

lastName

E101

Smith

E105

Jones

E110

Adams

E115

Smith

Project

projectNo

projectName

budget

P10

Hudson

50000

P15

Columbia

60000

P20

Wabash

40000

P23

Arkansas

80000

Assign

employeeId

projectNo

hours

E101

P10

40

E101

P15

30

E104

P10

20

E110

P15

30

E110

P20

30

E115

P10

20

E115

P20

30

  • Show the table that would be produced by each of the following relational algebra commands:

A. SELECT Employee WHERE lastName = ‘Adams’

B. SELECT Project WHERE budget < 70000 GIVING CheapProj
PROJECT ChapProj OVER projectName

C. SELECT Assign WHERE hours > 25 GIVING MuchWork
PROJECT MuchWork OVER employeeId

Homework Answers

Answer #1

A. SELECT Employee WHERE lastName = ‘Adams’
The table which will be displayed is
empId lastName
E110 Adams

as we are selecting the entry from the table with all columns where last name is adams

b)SELECT Project WHERE budget < 70000 GIVING CheapProj
the table that will be displayed is

projectNo cheapProject budget
P10 Hudson 50000
P15 Columbia 60000
P20 Wabash 40000

as we are selecting all entries whose budget is less than 70000 and changing the project name column to cheapProject

c)SELECT Assign WHERE hours > 25 GIVING MuchWork
the table that will be displayed is

MuchWork projectNo hours
E101 P10 40
E101 P15 30
E110 P15 30
E110 P20 30
E115 P20 30

as we are selecting all entries that have hours greater than 25, and changing the name of the column employeeId with MuchWork.

if you like the answer please provide a thumbs up.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions