DATABASE SYSTEM CONCEPTS (LOOSELEAF)
7th Edition
ISBN: 9781260515046
Author: SILBERSCHATZ
Publisher: MCG
expand_more
expand_more
format_list_bulleted
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Consider the employee database of Figure 3.19, where the primary keys areunderlined. Give an expression in SQL for each of the following queries.a. Find ID and name of each employee who lives in the same city as thelocation of the company for which the employee works.b. Find ID and name of each employee who lives in the same city and on thesame street as does her or his manager.c. Find ID and name of each employee who earns more than the averagesalary of all employees of her or his company.d. Find the company that has the smallest payroll.
Consider the given bank database. Compose SQL Queries for each of below scenarios.
branch(branch_name,branch_city,assets)
customer(customer_name,customer_address,customer_city)
loan(loan_number,branch_name,amount)
borrower(customer_name,loan_number)
account(account_number,branch_number,balance)
depositer(customer_name,account_number)
a. Find the names of all branches located in “Chicago”.
b. Find the names of all borrowers who have a loan in branch “Downtown”.
c. Find all loan numbers with a loan value greater than $10,000.
d. Find the names of all depositors who have an account with a value greater than $6,000.
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.
Chapter 3 Solutions
DATABASE SYSTEM CONCEPTS (LOOSELEAF)
Ch. 3 - Prob. 1PECh. 3 - Prob. 2PECh. 3 - Prob. 3PECh. 3 -
Suppose that we have a relation marks(ID, score)...Ch. 3 - Suppose that we have a relation marks(ID, score)...Ch. 3 -
The SQL like operator is case sensitive (in most...Ch. 3 - Prob. 7PECh. 3 - Prob. 8PECh. 3 - Prob. 9PECh. 3 - Prob. 10PE
Ch. 3 - Prob. 11ECh. 3 - Prob. 12ECh. 3 - Prob. 13ECh. 3 -
Consider the insurance database of Figure 3.17,...Ch. 3 - Prob. 15ECh. 3 - Prob. 16ECh. 3 - Prob. 17ECh. 3 - Prob. 18ECh. 3 -
List two reasons why null values might be...Ch. 3 - Prob. 20ECh. 3 - Prob. 21ECh. 3 - Prob. 22ECh. 3 - Prob. 23ECh. 3 - Prob. 24ECh. 3 - Prob. 25ECh. 3 - Prob. 26ECh. 3 - Using the university schema, write an SQL query to...Ch. 3 - Prob. 28ECh. 3 - Prob. 29ECh. 3 - Prob. 30ECh. 3 - Prob. 31ECh. 3 - Prob. 32ECh. 3 - Prob. 33ECh. 3 - Prob. 34ECh. 3 - Prob. 35E
Knowledge Booster
Similar questions
- 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.arrow_forwardConsider the insurance database of Figure 3.17, where the primary keys areunderlined. Construct the following SQL queries for this relational database. Find the number of accidents involving a car belonging to a person named “John Smith”.arrow_forwardConsider the relational database of Figure 3.19, where the primary keys areunderlined. Give an expression in SQL for each of the following queries. Find the ID of each employee who earns more than every employee of “Small Bank Corporation”.arrow_forward
- Consider the relational database of Figure 3.19, where the primary keys areunderlined. Give an expression in SQL for each of the following queries. Find the ID, name, and city of residence of each employee who works for “First Bank Corporation”.arrow_forwardConsider the relational database of Figure 3.19, where the primary keys areunderlined. Give an expression in SQL for each of the following queries. Find the ID of each employee who does not work for “First Bank Corporation”.arrow_forwardConsider the relational database of Figure 3.19, where the primary keys areunderlined. Give an expression in SQL for each of the following queries. Find the name of the company that has the most employees (or companies, in the case where there is a tie for the most).arrow_forward
- Consider the relational database of Figure 3.19, where the primary keys areunderlined. Give an expression in SQL for each of the following queries.Find the ID, name, and city of residence of each employee who works for “First Bank Corporation” and earns more than $10000.arrow_forwardConsider the insurance database of Figure 3.17, where the primary keys areunderlined. Construct the following SQL queries for this relational database.a. Find the total number of people who owned cars that were involved inaccidents in 2017. b. Delete all year-2010 cars belonging to the person whose ID is '12345'.arrow_forwardQ1) Consider the employees database , where the primary keys are underlined. Give an expression in SQL for each of the following queries. Employee(ID. name, age, address, salary, departmet, position,ministry_name) Ministry(ministry_name, address,No_of _employee, No_of_dept., category) 1- Find all employees who live in baghdad and work in ministery of foreign affairs And older than all the employees who work in the consuls department. 2- Find the name of employees who work as a counselor in ministries that have more than 5 departments . 3- Insert a new employee (o the database.arrow_forward
- Consider the employee database of Figure 3.19, where the primary keys areunderlined. Give an expression in SQL for each of the following queries. Find the company that has the smallest payroll.arrow_forwardConsider the insurance database of Figure 3.17, where the primary keys areunderlined. Construct the following SQL queries for this relational database. Delete all year-2010 cars belonging to the person whose ID is '12345'.arrow_forwardConsider the bank database of Figure 3.18, where the primary keys are underlined. Construct the following SQL queries for this relational database. Find the ID of each customer who lives on the same street and in the same city as customer '12345'.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education