Specify the following queries in SQL on the COMPANY relational database schema shown in Figure 5.5. Show
Question:
Specify the following queries in SQL on the COMPANY relational database schema shown in Figure 5.5. Show the result of each query if it is applied to the COMPANY database in Figure 5.6.
a. Retrieve the names of all employees in department 5 who work more than 10 hours per week on the ProductX project.
b. List the names of all employees who have a dependent with the same first name as themselves.
c. Find the names of all employees who are directly supervised by ‘Franklin Wong’.
Figure 5.5
Figure 5.6
Transcribed Image Text:
Figure 5.6 One possible database state for the COMPANY relational database schema EMPLOYEE Fname Minit Lname Sen Bdate Address Sex Salary Super_ssn Dno B 123456789 1965-01-09 731 Fondren, Houston, TX M 30000 333445555 333445555 1955-12-08 638 Voss, Houston, TX 999887777 1968-01-19 3321 Castle, Spring, TX John Smith Franklin Wong M 40000 888665555 Alicia Zelaya 25000 987654321 43000 888665555 F 4 Jennifer S Wallace 987654321 1941-06-20 291 Berry, Bellaire, TX F 4 K Narayan 666884444 1962-09-15 975 Fire Oak, Humble, TX M English 453453453 1972-07-31 5631 Rice, Houston, TX 987987987 1969-03-29 980 Dallas, Houston, TX 38000 333445555 25000 333445555 Ramesh Joyce A F Ahmad V M 25000 98B7654321 Jabbar James Borg 888665555 1937-11-10 450 Stone, Houston, TX M 55000 NULL 1 DEPARTMENT DEPT LOCATIONS Dname Dnumber Mgr_san Mgr_start_date Dnumber Dlocation Research 5 333445555 1988-05-22 1 Houston Administration 4 987654321 1995-01-01 4 Stafford Headquarters 888665555 1981-06-19 5 Bellaire 5 Sugarland 5 Houston WORKS ON PROJECT Essn Pno Hours Pname Pnumber Plocation Dnum 123456789 32.5 ProductX Bellaire 123456789 2 7.5 ProductY 2 Sugarland 666884444 40.0 Productz 3 Houston 453453453 20.0 Computerization 10 Stafford 453453453 2 20.0 Reorganization 20 Houston 333445555 10.0 Newbenefits 30 Stafford 4 333445555 3 10.0 333445555 10 10.0 DEPENDENT 333445555 20 10.0 Essn Dependent name Sex Bdate Relationship Daughter 999887777 30 30.0 333445555 Alice F 1986-04-05 999887777 10 10.0 333445555 Theodore 1983-10-25 Son 987987987 10 35.0 333445555 Joy 1958-05-03 Spouse 987987987 30 5.0 987654321 Abner 1942-02-28 Spouse 987654321 30 20.0 123456789 Michael M 1988-01-04 Son 987654321 20 15.0 123456789 Alice F 1988-12-30 Daughter 888665555 20 NULL 123456789 Elizabeth F 1967-05-05 Spouse -
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 80% (5 reviews)
Question a select fnamelname from employee inner join workson ...View the full answer
Answered By
Marvine Ekina
Marvine Ekina
Dedicated and experienced Academic Tutor with a proven track record for helping students to improve their academic performance. Adept at evaluating students and creating learning plans based on their strengths and weaknesses. Bringing forth a devotion to education and helping others to achieve their academic and life goals.
PERSONAL INFORMATION
Address: , ,
Nationality:
Driving License:
Hobbies: reading
SKILLS
????? Problem Solving Skills
????? Predictive Modeling
????? Customer Service Skills
????? Creative Problem Solving Skills
????? Strong Analytical Skills
????? Project Management Skills
????? Multitasking Skills
????? Leadership Skills
????? Curriculum Development
????? Excellent Communication Skills
????? SAT Prep
????? Knowledge of Educational Philosophies
????? Informal and Formal Assessments
0.00
0 Reviews
10+ Question Solved
Related Book For
Fundamentals Of Database Systems
ISBN: 9780133970777
7th Edition
Authors: Ramez Elmasri, Shamkant Navathe
Question Posted:
Students also viewed these Computer science questions
-
Specify the following queries on the COMPANY relational database schema shown in Figure 3.5, using the relational operators discussed in this chapter. Also show the result of each query as it would...
-
Specify the following queries in SQL on the database schema of Figure 1.2. (a) Retrieve the names of all senior students majoring in 'COSC' (computer science). (b) Retrieve the names of all courses...
-
Specify the following queries in SQL on the database schema of Figure 1.2. (a) Retrieve the names and major departments of all straight-A students (students who have a grade of A in all their...
-
1. You are required to compare the results of your printed reports and the results of reports of the MYOB assignment book in your MYOB assignment. If it is assumed that two results of the reports are...
-
For each of the following scatter diagrams, indicate whether the pattern is linear, curvilinear, or no correlation; if it is linear, indicate whether it is positive or negative and the approximate...
-
Find the centroid of the given region assuming the density (x, y) = 1. Quarter circle x 2 + y 2 R 2 , x 0, y 0
-
To what extent can international negotiations over economic policy be seen as a game of strategy? Are there any parallels between the behaviour of countries and the behaviour of oligopolies?
-
Ronald Company produces pipes for concert- quality organs. Each job is unique. In April 2012, it completed all outstanding orders, and then, in May 2012, it worked on only two jobs, M1 and M2: Direct...
-
wave Consider a 2m long medium in which a wave might propagate. The ends of the medium restrict the wa so that the wave always has an amplitude of 0 at those endpoints. Initially, there is no wave,...
-
Presented below is selected information related to Santos Company at December 31, 2011. Santos reports financial information monthly. (a) Determine the total assets of Santos Company at December 31,...
-
Write appropriate SQL DDL statements for declaring the LIBRARY relational database schema of Figure 6.6. Specify the keys and referential triggered actions. Data from figure 6.6 BOOK Book_id Title...
-
Design a relational database schema for a database application of your choice. a. Declare your relations using the SQL DDL. b. Specify a number of queries in SQL that are needed by your database...
-
1. The process of a computer forensics investigation includes each of the following components except: a. Gathering preliminary information b. Analyzing digital data c. Collecting and storing digital...
-
A hotel is considering changing its waiting line system. In the current system, hotel guests divide themselves equally between the lines that form in front of 3 hotel clerks. The manager is...
-
Knight, Inc., sued Real Developers, Inc., because Real had failed to pay a $ 5 0 , 0 0 0 bill owed to Knight. Both companies are incorporated in Delaware and operate only in Delaware. Knight lost at...
-
2 . What is the impact of the uninsured population on hospitals and long - term care facilities and their ability to remain profitable?
-
In the realm of Business and Operations Management, examine the strategic implications of agile methodologies in project management. How can organizations effectively implement agile frameworks,...
-
Equality is one of the founding American values. Does America meet the Founding Father s goals of equality, or do we fall short?
-
Draw a perspective structure or a Fischer projection for the products of the following SN2 reactions. (a) trans-1-bromo-3-methylcyclopentane + KOH (b) (R)-2-bromopentane + KCN (c) (d) (e) (f) CH Br-H...
-
Select the correct answer for each of the following questions. 1. On December 31, 20X3, Saxe Corporation was merged into Poe Corporation. In the business combination, Poe issued 200,000 shares of its...
-
Hillary claims that a postorder traversal of a heap will list its keys in nonincreasing order. Draw an example of a heap that proves her wrong.
-
Bill claims that a preorder traversal of a heap will list its keys in nondecreasing order. Draw an example of a heap that proves him wrong.
-
Show that the sum n i=1 logi, appearing in the analysis of heap-sort, is (nlogn).
-
1. You bought a 9-year, 6.98% semi-annual coupon bond today and the current market rate of return is 4.1%. The bond is callable in 3 years with a $90 call premium. What price did you pay for your...
-
Find the determinant of the matrix. [1-81- 3 6 1
-
Factor the expression -2x + 8x+ 10 fully.
Study smarter with the SolutionInn App