Tarea 4
Fecha de Entrega: Lunes 22 de Marzo (en clase)
Tipo de Entrega: papel
Crear en álgebra relacional las siguientes consultas, (Ejercicios 3.5, 3.8 y 3.10 libro Silberschatz) en base al siguiente esquema:
employee (person-name, street,city)
works (person-name, company-name, salary)
company (company-name, city)
manages (person-name, manager-name)
- Find the names of all employees who work for First Bank Corporation
- Find the names and cities of residence of all employees who work for First Bank Corporation
- Find the names, street addresses, and cities of residence of all employees who work for First Bank Corporation and earn more than $10,000 per annum.
- Find the names of all employees in this database who live in the same city as the company for which they work.
- Find the names of all employees who live in the same city and on the same street as do their managers.
- Find the names of all employees in this database who do not work for First Bank Corporation.
- Find the names of all employees who earn more than every employee of Small Bank Corporation.
- Assume the companies may be located in several cities. Find all companies located in every city in which Small Bank Corporation is located.
- Modify the database so that Jones now lives in Newtown
- Give all employees of First Bank Corporation a 10 percent salary raise.
- Give all managers in this database a 10 percent salary raise, unless the salary would be greater than $100,000. In such cases, give only a 3 percent raise.
- Delete all tuples in the works relation for employees of Small Bank Corporation.
- Find the company with the most employees.
- Find the company with the smallest payroll.
- Find those companies whose employees earn a higher salary, on average, than the average salary at First Bank Corporation.
Detalles de la entrega
- La tarea es en parejas (aunque puede ser individual)
- Indicar claramente id y nombre de los integrantes del equipo