Database Management System - Old Questions

Question Answer Details

3. From the relations given below, answer the following questions.
EMPLOYEE (Ssn, Ename, Bdate, Address, Sex, Salary, Super_ssn, Dno)
DEPARTMENT (Dname, Dnumber, Mgr_ssn, Mgr_start_date)
PROJECT (Pname, Pnumber, Plocation, Dnum)
DEPENDENT (Essn, Dependent_name, Sex, Bdate, Relationship)
DEPT_LOCATIONS (Dnumber, Dlocation)

(a) Retrieve the name and address of all employees who work for the 'Computer' department in SQL.
(b) For each Department, retrieve the department number, the number of employees in the department, and their average salary using SQL.
(c) Retrieve the employees' name and their Dname and Pname ordered by the employee's Dname.
(d) Retrieve the name and salary of all employees who work in department number 5 using Relational Algebra.
(e) Retrieve the name of the manager of each department using Relational Algebra. [5 × 2 = 10]

10 marks
Asked in 2080

Answer

AI Generated Answer

AI is thinking...