0% found this document useful (0 votes)
9 views

Assignment 02 (1)

The document contains a set of relational algebra queries related to a university schema and a relational database schema. It includes tasks such as finding course titles, student IDs, instructor salaries, and employee information based on various conditions. Each query is aimed at extracting specific data from the respective databases.

Uploaded by

eemanf240
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Assignment 02 (1)

The document contains a set of relational algebra queries related to a university schema and a relational database schema. It includes tasks such as finding course titles, student IDs, instructor salaries, and employee information based on various conditions. Each query is aimed at extracting specific data from the respective databases.

Uploaded by

eemanf240
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Assignment 02

Write the following queries in relational algebra, using the university schema.

a. Find the titles of courses in the Comp. Sci. department that have 3 credits.

b. Find the IDs of all students who were taught by an instructor named Einstein; make sure
there are no duplicates in the result.

c. Find the highest salary of any instructor.

d. Find all instructors earning the highest salary (there may be more than one with the same
salary).

e. Find the enrollment of each section that was offered in Autumn 2009.

f. Find the maximum enrollment, across all sections, in Autumn 2009.

g. Find the sections that had the maximum enrollment in Autumn 2009.

Consider the relational database of Figure 6.22 in text book, where the primary keys are
underlined. Give an expression in the relational algebra to express each of the following
queries:

a. Find the names of all employees who live in the same city and on the same street as do
their managers.

b. Find the names of all employees in this database who do not work for “First Bank
Corporation”.

c. Find the names of all employees who earn more than every employee of “Small Bank
Corporation”.

d. Find all employees who work directly for “Jones.”

e. Find all cities of residence of all employees who work directly for “Jones.”

f. Find the name of the manager of the manager of “Jones.”

g. Find those employees who earn more than all employees living in the city “Mumbai.”

You might also like