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...
-
Describe the differences in the following three types of processing: a. Batch processing b. Online processing c. Real-time processing
-
Converting a business idea into a profitable company is challenging. Finding and using a mentor is one approach entrepreneurs can take to increase the probability of being able to convert an idea...
-
Scotto Manufacturing is a mature firm in the machine tool component industry. The firms most recent common stock dividend was $2.40 per share. Because of its maturity as well as its stable sales and...
-
10.Carp Co has announced that it will pay an annual dividend equal to 55% of earnings. Its earnings per share is $0.80, and it has ten million shares in issue. The return on equity of Carp Co is 20%...
-
Create and test an HTML document that has six short paragraphs of text that describe various aspects of the state in which you live. You must define three different paragraph styles, p1, p2, and p3....
-
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...
-
What are the components of a CAFR?
-
1. Competitive priorities are something all companies must have in order to maintain and acquire new customers as new competitors come into the market. To what extent are fast food chains such as...
-
A car is traveling at 80 ft/sec when the brake is applied, providing a constant deceleration of 20 ft/sec for 3 seconds. How far did the car travel during the 3- second period?
-
Complete the following assignment by conducting independent research. Responses should be well thought out analysis and supported by the chapter reading. Research either online or via paper...
-
3. A 5 kg cantilever is supported by a pin connection at O and is connected to a hydraulic thrust at A as shown in Fig. Q3. A load of 50kg is hung at the end of the cantilever. Calculate with free...
-
Explain the following two fundamental ethical principles of professional accounting, using an appropriate example of how each can be breached: i.professional competence and due care ii.professional...
-
Checking Inverses In each of Problems 1-2, verify by multiplication that the given pair of matrices are inverses of one another. 1. 2. 3 2 5 3 [2-4].[-1/4 1/21
-
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).
-
The following information is available for Crane Marine Supply Company: Sales revenue $691,000 Sales returns and allowances 23,000 Cost of goods sold 421,000 Operating expenses Interest expense...
-
Explain the concept of collective bargaining in the context of labor relations. How does collective bargaining contribute to shaping the relationship between employees and employers, and what are its...
-
On January 1, 2021, Eagle Company borrows $19,000 cash by signing a four-year, 8% installment note. The note requires four equal payments of $5,737, consisting of accrued interest and principal on...
Study smarter with the SolutionInn App