EBK CONCEPTS OF DATABASE MANAGEMENT
8th Edition
ISBN: 8220100706004
Author: Last
Publisher: Cengage Learning US
expand_more
expand_more
format_list_bulleted
Question
Chapter 2, Problem 3TDERA
To determine
To provide the order number, order date, customer number and customer name for each order using relational algebra.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Using the data in the ASSIGNMENT table, write the SQL code that will yield the total number of hours worked for each employee and the total charges stemming from those hours worked, sorted by employee number. The results of running that query are shown in Figure P7.6.FIGURE P7.6 TOTAL HOURS AND CHARGES BY EMPLOYEE
This is the problem: (from Database Systems Book, 13th ed)
Write a query to display the author last name, first name, book title, and replacement cost for each book. Sort the results by book number and then author ID
(Figure P7.92). (25 rows)
Using the EMPLOYEE, JOB, and PROJECT tables in the Ch07_ConstructCo database, write the SQL code that will join the JOB, EMPLOYEE, and PROJECT tables using common attributes. Display the attributes shown in the results presented in Figure P7.2, sorted by project value.
Chapter 2 Solutions
EBK CONCEPTS OF DATABASE MANAGEMENT
Ch. 2 - Prob. 1RQCh. 2 - Prob. 2RQCh. 2 - Prob. 3RQCh. 2 - Prob. 4RQCh. 2 - Prob. 5RQCh. 2 - Prob. 6RQCh. 2 - Prob. 7RQCh. 2 - Prob. 8RQCh. 2 - Prob. 9RQCh. 2 - Prob. 10RQ
Ch. 2 - Prob. 11RQCh. 2 - Prob. 12RQCh. 2 - Prob. 13RQCh. 2 - Prob. 14RQCh. 2 - Prob. 15RQCh. 2 - Prob. 16RQCh. 2 - Prob. 17RQCh. 2 - Prob. 18RQCh. 2 - Prob. 19RQCh. 2 - Prob. 20RQCh. 2 - Prob. 21RQCh. 2 - Prob. 22RQCh. 2 - Prob. 23RQCh. 2 - Prob. 24RQCh. 2 - Prob. 25RQCh. 2 - Prob. 26RQCh. 2 - Prob. 27RQCh. 2 - Prob. 28RQCh. 2 - Prob. 29RQCh. 2 - Prob. 30RQCh. 2 - Prob. 1TDEQBECh. 2 - Prob. 2TDEQBECh. 2 - Prob. 3TDEQBECh. 2 - Prob. 4TDEQBECh. 2 - Prob. 5TDEQBECh. 2 - Prob. 6TDEQBECh. 2 - Prob. 7TDEQBECh. 2 - Prob. 8TDEQBECh. 2 - Prob. 9TDEQBECh. 2 - Prob. 10TDEQBECh. 2 - Prob. 11TDEQBECh. 2 - Prob. 12TDEQBECh. 2 - Prob. 13TDEQBECh. 2 - Prob. 14TDEQBECh. 2 - Prob. 15TDEQBECh. 2 - Prob. 16TDEQBECh. 2 - Prob. 17TDEQBECh. 2 - Prob. 18TDEQBECh. 2 - Prob. 1TDERACh. 2 - Prob. 2TDERACh. 2 - Prob. 3TDERACh. 2 - Prob. 4TDERACh. 2 - Prob. 5TDERACh. 2 - Prob. 6TDERACh. 2 - Prob. 7TDERACh. 2 - Prob. 1CATCCh. 2 - Prob. 2CATCCh. 2 - Prob. 3CATCCh. 2 - Prob. 4CATCCh. 2 - Prob. 5CATCCh. 2 - Prob. 6CATCCh. 2 - Prob. 7CATCCh. 2 - Prob. 8CATCCh. 2 - Prob. 9CATCCh. 2 - Prob. 10CATCCh. 2 - Prob. 11CATCCh. 2 - Prob. 12CATCCh. 2 - Prob. 13CATCCh. 2 - Prob. 14CATCCh. 2 - Prob. 15CATCCh. 2 - Prob. 16CATCCh. 2 - Prob. 17CATCCh. 2 - Prob. 18CATCCh. 2 - Prob. 1SCGCCh. 2 - Prob. 2SCGCCh. 2 - Prob. 3SCGCCh. 2 - Prob. 4SCGCCh. 2 - Prob. 5SCGCCh. 2 - Prob. 6SCGCCh. 2 - Prob. 7SCGCCh. 2 - Prob. 8SCGCCh. 2 - Prob. 9SCGCCh. 2 - Prob. 10SCGCCh. 2 - Prob. 11SCGCCh. 2 - Prob. 12SCGCCh. 2 - Prob. 13SCGCCh. 2 - Prob. 14SCGCCh. 2 - Prob. 15SCGCCh. 2 - Prob. 16SCGCCh. 2 - Prob. 17SCGCCh. 2 - Prob. 18SCGCCh. 2 - Prob. 19SCGCCh. 2 - Prob. 20SCGCCh. 2 - Prob. 21SCGC
Knowledge Booster
Similar questions
- Using the university schema, write an SQL query to find the names and IDs of those instructors who teach every course taught in his or her department (i.e., every course that appears in the course relation with the instructor’s department name). Order result by name.arrow_forwardCreate both the tables Branch and Supervisor with appropriate attribute names, primary key, foreign key and data type. Insert the above records into Branch and Supervisor tables. Display all the records from Branch and Supervisor (Separately) Display all the details of Name, City and Salary. Display the total salary for every city in the supervisor table. Write a PL/SQL program to display BName from the Branch table for D5. Write a PL/SQL program to display all the details of Supervisor who is getting more than 1250 salary using cursor. Update city as ‘Suhar’ for Supervisor named Jack. Write a Procedure to receive a Supervisor SId as Input and display all the related values of that Supervisor. (Also write the calling program.) Delete all the branch details of operations.arrow_forwardUse the Pine Valley Furniture (PVF) database for this question. Write a SQL query to display the customer ID and total number of orders placed for those customers who placed more than one order.arrow_forward
- Write SQL Queries for following set of tables:EMPLOYEE (EmpNo, Name, DoB, Address, Gender, Salary, DNumber)DEPARTMENT (DNumber, Dname, ManagerEmpNo, MnagerStartDate).i) Display the Age of ‘male’ employees.ii) Display all employees in Department named ‘Marketing’.iii) Display the name of highest salary paid ‘female’ employee.iv) Which employee is oldest manger in company?v) Display the name of department of the employee ‘SMITH’..arrow_forwardPlease convert following figure into a relational schera, In cuch table, the primery key and foreign keys (arrows) must be identified. BANK BRANCHES BANK BRANCH Code Name Addr Addr Branch no ACCTS LOANS Acct no Balance Loan no Amount ACCOUNT Type LOAN Type M AC LC Ssn Name Phone CUSTOMER Addrarrow_forwardUsing the data in the ASSIGNMENT table, write the SQL code that will yield the total number of hours worked for each employee and the total charges stemming from those hours worked, sorted by employee number. The results of running that query are shown in Figure P7.6. EMP_NUM 101 103 104 105 108 113 115 117 EMP_LNAME News Arbough Ramoras Johnson Washington Joenbrood Bawangl Williamson SumOfASSIGN HOURS 3.1 19.7 11.9 12.5 8.3 3.8 12.5 18.8 SumOfASSIGN_CHARGE 387.50 1664.65 1218.70 1382.50 840.15 192.85 1276.75 649.54arrow_forward
- Considering Vaccination Database, write queries to: Display the Subject CNIC, Name, Contact, Dose1 Center, and Dose2 Center as shown below: CNIC Name Contact Dose1 Center Dose2 Center 22401-6645321-1 Nasir 3409991112 Lachi Kohat 2 14301-6045321-5 Shahab 3409991112 kohat 3 Dara The subjects who have been vaccinated different types in Dose1 and Dose2. For instance, subjects who were vaccinated ‘Sinovac’ in the first dose, while Pfizer in the second dose.How many Viles of each type have been consumed so far. How many subjects are vaccinated from expired viles. Suggest the name of Incharge for the best performance award based on the highest number of subjects vaccinated on a single dayarrow_forwardUsing the university schema, write an SQL query to find the names and IDs ofthose instructors who teach every course taught in his or her department (i.e.,every course that appears in the course relation with the instructor’s department name). Order result by namearrow_forwardWrite a query using the Production.Product table that lists a count of the products in each product line. Only show those product lines that have a count of products 100 or above. Show the Product line with the largest number of products first. This is for an SQL Database.arrow_forward
- Using the relations in the appendix, write the following queries in SQL:i. Display a list of all instructors, showing each instructor’s ID and the number of sections taught. Your query should use an outer join, and should not use sub-queries.ii. Write the same query as in part a, but using a scalar subquery and not using outer join.iii. Display the list of all course sections offered in spring 2018, along with the ID and name of each instructor teaching the section. If a section has more than one instructor, that section should appear as many times in the result as it has instructors. If a section does not have any instructor, it should still appear in the result with the instructor name set to “—”.iv. Display the list of all departments, with the total number of instructors in each department, without using sub-queries. Make sure to show departments that have no instructors, and list those departments with an instructor count of zero.arrow_forwardUse SQL and TAL Distributors database to complete the following questions:List the customer number and name for all customers located in the city of Grove. Your query should ignore case. For example, a customer with the city Grove should be included as should customers whose city is GROVE, grove, GrOvE, and so on.arrow_forwardConsider Following Tables.Student ( regNo, sName, sCity, sCGPA, sAge)Course ( cCode, cName, credit_hours)Enrollment (regNo, cCode, semester, Grade)Write SQL queries for the following statements.NOTE: you must use “JOINS” query only.i. Display names of all those students who have “A” grades.ii. Display list of all students by name and course name they have enrolled.iii. Display data of all those students who have enrolled at least 10 courses.iv. Display all those students who have not enrolled any course yet.v. Display grade of ‘Ali’ in course ‘CS101’.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- A Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology Ptr
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr