Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Bartleby Related Questions Icon
Related questions
bartleby
Concept explainers
Question
Transcribed Image Text:Write the following queries in SQL on the relational database schema for COMPANY
database given in CompanySchema.pdf.
1. Find the last name of employees who have salary greater than 30 000.
2. Find the average salary of employees who works on the projects which are located in
"Stafford'.
3. Find the total working hours of each manager.
4. Find the name of the projects on which no employee works.
Transcribed Image Text:EMPLOYEE
Frame Minit Lname Sen Bdate Address Sex Salary Super sen Dno
+444
DEPARTMENT
Dname Dnumber
Mor an Mgr start date
DEPT LOCATIONS
Dnumber Dlocation
PROJECT
Prame Prumber Plocation Dnum
WORKS ON
Ennn Pno Hoir
Hours
DEPENDENT
Esen Dependent name Se Bdate Relationship
Reforential integrity constraints displayed
on the COMFWNY relational database
schema.
One possible database state for the COMPANY relational database schema.
EMPLOYEE
Fname Minit Lname
John
Frankin T
Sex Salary
30000 333445555 5
M 40000 Jo00665555
F 25000 Joe7e54321
43000 J88Ge5556
San
Bdate
Address
Super en Dno
123456789 1965年01月09日 731 Fondren, Hounton, TX M
333445555 1955年12月08日 638 Voas, Houston, TX
Go0087777 1960年01月19日 3321 Castle, Spring. TX
987654321 1941年06月20日 291 Berry, Bellaire, TX
Narayan 666884444 1962年09月15日 975 Fire Oak, Humibile, TX M
B
Smith
Wong
Zelaya
Wallace
5
Alicia
4
Jennifer
F
38000 333445655
25000 333445555
M 25000 007654321
M 55000 NULL
Ramesh
English
453453453 1972年07月31日 5631 Rice, Houston, TX
F
Joyce
Ahmad
A
987987907
1969年03月29日 980 Dallan, Houston, TX
B80G05555 1937年11月10日 450 Stone, Houston, TX
Jabbar
4
James
E
Borg
DEPARTMENT
DEPT LOCATIONS
Dnumber
Mar atart date
Dnumber
Dlocation
Dname
Mar en
Research
333445555
1988年06月22日
Houston
Administration
987654321
1995年01月01日
Stafford
Headquarters
1981年06月19日
Belaire
Sugarland
Houston
WORKS ON
PROJECT
Essn
Pno
Hours
Prame
Pnumber
Plocation
Dnum
123456709
123456700
325
ProductX
Bellaire
ProductY
Productz
75
Sugartand
666884444
3
40.0
3
Houston
5
453453453
20.0
Computeriation
10
Stafford
4
453453450
20.0
Reorganization
20
Houston
333445565
10.0
4
Newbenefite
30
Stafford
333445566
3
10.0
333445565
333445555
10
10.0
DEPENDENT
20
100
Esan
Dependent na
Sex
Bdate
Relationshin
30
30.0
333445555
Alice
1986年04月05日
Daughter
909887777
10
10.0
333445556
Theodore
M
1983年10月25日
Son
987987087
10
35.0
333445555
1958年05月03日
Spouse
Spouse
Joy
007007007
987654321
30
5.0
987654321
Abner
1942年02月28日
30
20.0
123456700
Michael
1988年01月04日
Son
987654321
20
15.0
123450700
Alice
1988年12月30日
Daughter
B88665555
20
NULL
123456789
Ekrabeth
1967年05月05日
Spoune
Expert Solution
Check MarkThis question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
bartleby
Step by stepSolved in 2 steps with 2 images
Knowledge Booster
Background pattern image
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Can you answer this two question as MYSQL statement using database that I uploaded Thank you Answer the following questions based on the above database: Create a view named "Atlanta_Charter_Crew_V" that includes the following "For each charter of aircraft to Atlanta (ATL), print the charter date, charter distance, and the corresponding crew (employee) number, last name, first name, and crew job". Your answer should include both the SQL statement for view creation along with the contents of the view (you get the contents of the view by running the command select * from Atlanta_Charter_Crew_V;). Modify the MODEL table to add the following attribute and insert the values shown in the following table. (Note: use ALTER TABLE and UPDATE commands.) Attribute name Attribute Description Attribute type Attribute Values MOD_TOTAL_ WEIGHT Weight of each model Numeric 12,500 for C-90A 7,300 for PA23-250 19,770 for PA31-350arrow_forwardUsing the Henry Books database, decrease the inventory of book code 6128 at branch 2 by one.arrow_forwardConsider the following schema:instructor(ID, name, dept_name, salary)What is the correct SQL statement to perform a query to find the names of all instructors excluding duplicates?(a) select name from instructor;(b) select unique name from instructor;(c) select name from instructor no duplicates;(d) select distinct name from instructor;arrow_forward
- Assume the e-commercial database shown in the Appendix. Write the following queries in (a) relational algebra and (b) SQL. State your assumptions if the semantics is not clear. 1) Find the names of all students who have not taken any courses. APPENDIX STUDENTS(student id, first_name, last _name, email, major_code, class_year) COURSES(course id, course_name, course_description, credits, department_code) ENROLLMENTS(student id, course id, semester, grade) MAJORS(major code, major_name, department_code) DEPARTMENTS(department code, department_name)arrow_forwardPrepare a MySQL script that creates your database, tables, and inserts a small sampling of madeupdata. Test it out in MySQL before submission For the below diagram write the SQL queriesarrow_forwardUsing the instance of the Airport database, formulate the following queries in the relationalalgebra: 1)List the name and the state of all United States airports. 2)List full details of all airports located outside the United States.Note: You should use the not equal sign in this query. 3)Display the number of all carriers and the average of their revenues. 4)Display the minimum, the average, and the maximum distances of the flights that arescheduled on October 17th, 2017? Example: List all airport names. π name Airport More example provided it attached file.arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Text book imageDatabase System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationText book imageStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONText book imageDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- Text book imageC How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONText book imageDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningText book imageProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education