Essay on Assignment2

613 WordsNov 10, 20143 Pages
Question 1 In SQL, specify the following queries on the database specified in Figure 1 below using the concept of nested queries and the concepts described in chapter 5. a. Retrieve the names of all employees who work in the department that has the employee with the highest salary among all employees. SELECT fname, minit, lname FROM employee WHERE dno =(SELECT dno FROM employee WHERE salary= (SELECT MAX(Salary) FROM employee)); b. Retrieve the names of all employees whose supervisor’s supervisor has '888665555' for SSN. SELECT fname, minit, lname FROM employee WHERE Super_ssn IN (SELECT ssn FROM employee WHERE Super_ssn= '888665555'); c. Retrieve the names of employees who make at least $10,000 more than the employee who is paid…show more content…
Consultants also work on many problems at any given time. For each type of problem there is one consultant who is considered the expert on this problem. A consultant can be an expert on many different types of problems. Assuming constraints are not exact Question 4 Create an ER diagram for the following case. Write your assumptions about any missing information: You want to track information about 10 departments in your company. Each department has a unique name, is located on a specific floor and has a phone number. Within each department there is a department head and a range of additional employees. For all employees we want to track their name, who their boss is, their salary as well as the unique employee number each had assigned to them when they started the company. Each employee also has a set of skills. You need to track this set of skills so you can locate employees with the right skill set to be part of various cross department project teams. You need to also track information about all of the projects that are under taken by these various departments. Each project has a unique id, a name, a start date, and at least 3 employees on it. All teams have a project leader and a project coordinator. Any employee can be a project leader but they

More about Essay on Assignment2

Open Document