midterm1-sample

midterm1-sample - Midterm 1 In a company, each employee has...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Midterm 1 In a company, each employee has the following attributes: ss#, name, age, salary. Each employee participates in an advisor/advisee relationship with another employee. An advisor is also an employee of the company and have an advisor of his or her own. An advisor may advise several employees. However, each employee has at most one advisor. Draw the ER: 2007/10/2 1 consider the following tables pertaining to employees working for different epartments: departments: Emp (SS#, name, age, salary, dno) Dept (dno, dname, floor, mgrSS#) Write the SQL statement to retrieve the average age of employees for each epartment department. 2007/10/2 2 Consider the following relational database, where the primary keys are underlined. Give an expression in the relational algebra to express each of the following queries: ployee( erson ame reet city) employee(person-name, street, city) works(person-name, company-name, salary) company(company-name , city) ( ) manages(person-name , manager-name) Modify the database so that Jones now lives in Newtown 2007/10/2 3 employee(person-name,...
View Full Document

Page1 / 13

midterm1-sample - Midterm 1 In a company, each employee has...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online