Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Students have asked these similar questions
Consider the relational database of Figure 3.19, where the primary keys are underlined. Give an expression in SQL for each of the following queries.a. Find the ID, name, and city of residence of each employee who works for “First Bank Corporation”.b. Find the ID, name, and city of residence of each employee who works for “First Bank Corporation” and earns more than $10000.c. Find the ID of each employee who does not work for “First Bank Corporation”.d. Find the ID of each employee who earns more than every employee of“Small Bank Corporation”.e. Assume that companies may be located in several cities. Find the nameof each company that is located in every city in which “Small Bank Corporation” is located.f. Find the name of the company that has the most employees (or companies, in the case where there is a tie for the most).g. Find the name of each company whose employees earn a higher salary, on average, than the average salary at “First Bank Corporation”.
Consider the insurance database of Figure 3.17, where the primary keys areunderlined. Construct the following SQL queries for this relational database.a. Find the number of accidents involving a car belonging to a person named“John Smith”.b. Update the damage amount for the car with license plate “AABB2000”in the accident with report number “AR2197” to $3000.
Consider the library database of Figure 3.20.Write the following queries in SQL.a. Find the member number and name of each member who has borrowedat least one book published by “McGraw-Hill”.b. Find the member number and name of each member who has borrowedevery book published by “McGraw-Hill”.c. For each publisher, find the member number and name of each memberwho has borrowed more than five books of that publisher.d. Find the average number of books borrowed per member. Take into accountthat if a member does not borrow any books, then that member doesnot appear in the borrowed relation at all, but that member still counts inthe average.
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
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