Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
thumb_up100%
Database system concept 7th
based on Exercise problems 3.9, 3.10, 3.16, and 3.17) Consider the relational database of Figure 3.19, where the primary keys are underlined. Given an expression in SQL for each of the following queries.
- Find the ID of each employee who does not work for “First Bank Corporation”. SQL Query:
- Find the ID, name, and city of residence of each employee who works for “First Bank Corporation” and earns more than $10,000. SQL Query:
- Find the ID of each employee who earns more than every employee of “Small Bank Corporation”. SQL Query:
- Assume that companies may be located in several cities. Find the name of each company that is located in every city in which “Small Bank Corporation” is located. Your query should run on. SQL Query:
- Find the name of the company that has the most employees (or companies, if there is a tie). SQL Query:
- Find the name of each company whose employees earn a higher salary on average, than the average salary at “First Bank Corporation”. SQL Query:
- Modify the database so that the employee whose ID is ‘12345’ now lives in a city called “Newtown”. SQL Query:
- Find ID and name of employee who lives in the same city as the location of the company for which the employee works. SQL Query:
- Find ID and name of each employee who earns more than the average salary of all employees of her or his company. SQL Query:
- Find the company that has the smallest payroll (sum of all salary in a company). SQL Query:
-
Given all employees of “First Bank Corporation” a 10 percent raise. SQL Query:
-
Delete all tuples in the works relation for employees of “Small Bank Corporation”. SQL Query:
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps
Knowledge Booster
Similar questions
- (FROM DATABASE SYSTEMS, 13TH ED.) Problem 15. Use a query to compute the total of all purchases, the number of purchases, and the average purchase amount made by each customer. Your output values must match those shown in Figure P7.15. Sort the results by customer code.arrow_forward(b) Consider the schema of Customer table and write SQL statements for the following queries. cid sname address age occupation salary Payment mode gender 123 sam xacoas 31 manager 60000 cash 124 david flaca 38 administrator 45000 credit i. Write the SQL code to list details of clients in descending order of the salary. ii. Write the SQL code to show details of clients whosere salary is greater than Rs 45000 and age is between 35 and 45.arrow_forwardSimplify the following query (WHERE clause), expressed in SQL, on the example database above: SELECT ENAME, PNAME FROM EMP, ASG, PROJ WHERE (DUR > 12 OR RESP = "Analyst") AND EMP.ENO = ASG.ENO AND (TITLE = "Elect. Eng." OR ASG.PNO < "P3") AND (DUR > 12 OR RESP NOT= "Analyst") AND ASG.PNO = PROJ.PNOarrow_forward
- All parts of this question use the following database schema: Flights(flno, from, to, distance) Aircraft(aid, aname, cruisingrange) Certified(eid, aid) Employees(eid, ename, salary) c) For each cruisingrange held by at least 3 aircraft, give the lowest salary of employees certified to fly one of those aircraft. Express in SQL only:arrow_forwardBased on the table provided, answer the following questions in relational algebra.arrow_forwardWe have a relational database that contains the table ‘Staff’. The table ‘Staff’ consist of columns ‘Name’, ‘Department’ and ‘Date of Joining’. What query would you use to extract the Names and Department of all staff in the table? a. SELECT * FROM Staff b. a) SELECT Name, Department FROM Staff c. SELECT Name, Department IN Staff d. SELECT * IN Staffarrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY
Computer Networking: A Top-Down Approach (7th Edi...
Computer Engineering
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:PEARSON
Computer Organization and Design MIPS Edition, Fi...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:9781337569330
Author:Jill West, Tamara Dean, Jean Andrews
Publisher:Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education
Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY