0% found this document useful (0 votes)
21 views2 pages

BaiTapSuaTaiLop - EN - Final

bttl
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views2 pages

BaiTapSuaTaiLop - EN - Final

bttl
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

UNIVERSITY OF INFORMATION TECHNOLOGY Course: Fundamental of Database Systems

Faculty of Information Systems Topic: Relational Algebra


Lecturer: Cao Thi Nhan

The COMPANY relational database including:


1. EMPLOYEE (Fname, Minit, Lname, Ssn, Bdate, Address, Sex, Salary, Super_ssn, Dno)
2. DEPARTMENT (Dnumber, Dname, Mgr_ssn, Mgr_start_date)
3. DEPT_LOCATIONS (Dnumber, Dlocation)
4. PROJECT (Pnumber, Pname, Plocation, Dnum)
5. WORKS_ON (Essn, Pno, Hours)
6. DEPENDENT (Essn, Dependent_name, Sex, Bdate, Relationship)

Page 1 of 2
Write queries in Relational Algebra:

1. Retrieve the employees that have last name is ‘Smith’ and salary higher than $5.000

2. List the employees that have birthday in September and works for the department
number 5.
3. Retrieve the employees (Ssn, Fname, Lname) and project name (Pname) that the
employee works on.
4. Retrieve the employees (Ssn, Fname, Lname) participating in the project with the
project number 1 and working on the project for more than 30 hours/week.
5. List the employees (Ssn, Fname, Lname) participating in both projects with project
number 1 and project number 30
6. List the employees (Ssn, Fname, Lname) who do not work on any projects.

7. List the employees (Ssn) work on all projects managed by department number 5.

8. List the number of location for each department. The result shows Dnumber, Dname,
and number of location.
9. Calculate the total number of projects of the company.

10. For every department, calculate the maximum salary and the minimum salary. The
result shows Dnumber, Dname, maximum salary, and the minimum salary.

Page 2 of 2

You might also like