Computer Science: An Overview (13th Edition) (What's New in Computer Science)
13th Edition
ISBN: 9780134875583
Author: BROOKSHEAR
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 9, Problem 14CRP
Answer Problem 13 using SQL.
PROBLEM 13
13. Using the commands SELECT, PROJECT, and JOIN, write a sequence of instructions to answer each of the following questions about parts and their manufacturers in terms of the following
Part relation
PartName | Weight |
Bolt 2X | 1 |
Bolt 2Z | 1.5 |
Nut V5 | 0.5 |
Manufacturer relation
CompanyName | PartName | Cost |
Company X | Bolt 2Z | .03 |
Company X | Nut V5 | .01 |
Company Y | Bolt 2X | .02 |
Company Y | Nut V5 | .01 |
Company Y | Bolt 2Z | .04 |
Company Z | Nut V5 | .01 |
- a. Which companies make Bolt 2Z?
- b. Obtain a list of the parts made by Company X along with each part’s cost.
- c. Which companies make a part with weight 1?
Expert Solution & Answer
Learn your wayIncludes step-by-step video
schedule05:33
Students have asked these similar questions
Write the appropriate SQL query for each of the following questions:
1) Display details of ALL the clubs running by the college
2) Display the details of the IT club (IT is the name of the club)
https://sqliteonline.com/ : Program link
The first requirement: Using the SQL language, transform the following entity model into tables in the database.
Entity Manger contains:
M-name The name of the manager.
M-ID and manager number.The department entity contains:
D-name The name of the department.
D-ID and department number.Create constraint master key name of the manager when creating the Manger table.Creating the foreign key constraint The name of the manager when creating the Department table.
The second requirement: After creating the tables and specifying the primary and foreign key, do the following:
* Add a column D_loc to the Department table, specifying the type of column.* Remove the column named M_name from the Manger table* Change the name of the department table to Dep
Please::
******* ATTACH A PICTURE OF THE CODES USED AND PICTURE OF THE PROGRAM SCREEN *******
In SQL
This sample database consists of the following tables(see image for tables and there is one more at the bottom in this text):• Customers: stores customer’s data• Products: stores a list of scale model cars• ProductLines: stores a list of product line categories• Orders: stores sales orders placed by customers• OrderDetails: stores sales order line items for each sales order• Payments: stores payments made by customers based on their accounts• Employees: stores all employee information as well as the organization structuresuch as who reports to whom• Offices: stores sales office data
Write SQL code for the following:We want to add a new sale order for the customer (customerNumber = 145) in thedatabase. The steps of adding a sale order are described as follows:(1) Get latest sale order number from “orders” table, and use the next sale ordernumber as the new sale order number(2) Insert a new sale order into “orders” table for the customer (customerNumber =145). For this order, the…
Chapter 9 Solutions
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
Ch. 9.1 - Identify two departments in a manufacturing plant...Ch. 9.1 - Prob. 2QECh. 9.1 - Summarize the roles of the application software...Ch. 9.2 - Prob. 1QECh. 9.2 - Prob. 2QECh. 9.2 - Prob. 4QECh. 9.2 - Prob. 5QECh. 9.2 - Prob. 6QECh. 9.3 - Prob. 1QECh. 9.3 - What is a persistent object?
Ch. 9.3 - Identify some classes as well as some of their...Ch. 9.3 - Prob. 4QECh. 9.4 - Prob. 1QECh. 9.4 - Prob. 2QECh. 9.4 - Prob. 3QECh. 9.4 - Prob. 4QECh. 9.4 - Prob. 5QECh. 9.4 - Prob. 6QECh. 9.5 - Prob. 1QECh. 9.5 - Prob. 2QECh. 9.5 - Prob. 3QECh. 9.5 - Prob. 4QECh. 9.5 - Prob. 5QECh. 9.5 - Prob. 6QECh. 9.5 - Prob. 7QECh. 9.6 - Prob. 1QECh. 9.6 - Give an additional example of a pattern that might...Ch. 9.6 - Prob. 3QECh. 9.6 - How does data mining differ from traditional...Ch. 9.7 - Prob. 1QECh. 9.7 - Prob. 2QECh. 9.7 - Prob. 3QECh. 9.7 - Prob. 4QECh. 9 - Prob. 1CRPCh. 9 - Prob. 2CRPCh. 9 - Prob. 3CRPCh. 9 - Prob. 4CRPCh. 9 - Prob. 5CRPCh. 9 - Prob. 6CRPCh. 9 - Prob. 7CRPCh. 9 - Prob. 8CRPCh. 9 - Prob. 9CRPCh. 9 - Prob. 10CRPCh. 9 - Prob. 11CRPCh. 9 - Prob. 12CRPCh. 9 - Using the commands SELECT, PROJECT, and JOIN,...Ch. 9 - Answer Problem 13 using SQL. PROBLEM 13 13. Using...Ch. 9 - Prob. 15CRPCh. 9 - Prob. 16CRPCh. 9 - Prob. 17CRPCh. 9 - Prob. 18CRPCh. 9 - Prob. 19CRPCh. 9 - Empl Id Name Address SSN Job Id Job Title Skill...Ch. 9 - Empl Id Name Address SSN Job Id Job Title Skill...Ch. 9 - Prob. 22CRPCh. 9 - Prob. 23CRPCh. 9 - Prob. 24CRPCh. 9 - Prob. 25CRPCh. 9 - Write a sequence of instructions (using the...Ch. 9 - Prob. 27CRPCh. 9 - Prob. 28CRPCh. 9 - Prob. 29CRPCh. 9 - Prob. 30CRPCh. 9 - Prob. 31CRPCh. 9 - Prob. 32CRPCh. 9 - Prob. 33CRPCh. 9 - Prob. 34CRPCh. 9 - Prob. 35CRPCh. 9 - Prob. 36CRPCh. 9 - Prob. 37CRPCh. 9 - Prob. 38CRPCh. 9 - Prob. 39CRPCh. 9 - Prob. 40CRPCh. 9 - Prob. 41CRPCh. 9 - Prob. 42CRPCh. 9 - Prob. 43CRPCh. 9 - Prob. 44CRPCh. 9 - Prob. 45CRPCh. 9 - Prob. 46CRPCh. 9 - Prob. 47CRPCh. 9 - Prob. 48CRPCh. 9 - Prob. 49CRPCh. 9 - Prob. 50CRPCh. 9 - Prob. 51CRPCh. 9 - Prob. 52CRPCh. 9 - Prob. 53CRPCh. 9 - Prob. 54CRPCh. 9 - Prob. 55CRPCh. 9 - Prob. 56CRPCh. 9 - Prob. 57CRPCh. 9 - Prob. 58CRPCh. 9 - Prob. 59CRPCh. 9 - Prob. 60CRPCh. 9 - Prob. 61CRPCh. 9 - Prob. 62CRPCh. 9 - Prob. 1SICh. 9 - Prob. 2SICh. 9 - Prob. 3SICh. 9 - Prob. 4SICh. 9 - Prob. 5SICh. 9 - Prob. 6SICh. 9 - Prob. 7SICh. 9 - Prob. 8SICh. 9 - Prob. 9SICh. 9 - Prob. 10SI
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
In some languages you must use a library function to raise a number to a power.
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
For the circuit shown, use the node-voltage method to find v1, v2, and i1.
How much power is delivered to the c...
Electric Circuits. (11th Edition)
What is the disadvantage of having too many features in a language?
Concepts Of Programming Languages
What are the short words that are used in assembly language called?
Starting Out with Python (4th Edition)
Write an application that reads two integers, determines whether the first is a multiple of the second and prin...
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Can a thick saw blade be used as a broach? Why or why not?
Degarmo's Materials And Processes In Manufacturing
Knowledge Booster
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
- Write the SQL code to calculate the ASSIGN_CHARGE values in the ASSIGNMENT table in the Ch07_ConstructCo database. (See Figure P7.1.) Note that ASSIGN_CHARGE is a derived attribute that is calculated by multiplying ASSIGN_CHG_HR by ASSIGN_HOURS.arrow_forwardIn SQL This sample database consists of the following tables(see image for tables and there is one more at the bottom in this text):• Customers: stores customer’s data• Products: stores a list of scale model cars• ProductLines: stores a list of product line categories• Orders: stores sales orders placed by customers• OrderDetails: stores sales order line items for each sales order• Payments: stores payments made by customers based on their accounts• Employees: stores all employee information as well as the organization structuresuch as who reports to whom• Offices: stores sales office data Write SQL code for the following:We want to add a new sale order for the customer (customerNumber = 145) in thedatabase. The steps of adding a sale order are described as follows:(1) Get latest sale order number from “orders” table, and use the next sale ordernumber as the new sale order number(2) Insert a new sale order into “orders” table for the customer (customerNumber =145). For this order, the…arrow_forwardQUESTION 2. Write a PL/SQL PROCEDURE that can list the Top-N customers (id and name) and the amounts spent in a specified year together with their rank. The customer rank can be obtained from the function created in the previous question. The total purchase is calculated for each customer using the quantity and price columns. The total purchased is sorted from the highest to the lowest. The procedure will have two input parameters: year (NUMBER) and TOP_N (NUMBER). Hint: • use ONE EXPLICIT CURSOR (corresponding to one select statement). • Us the topN technique (from clause subquery) and rownum to limit the customers. Expected Output for Top 3 customers in 2018 using: execute topSpenders (2018. 3) 3 Gary Jenkins s422.64 Excellent 45 Fred Fontain $359.21 Excellent 16 Ralph Foster $351.64 Excellent Expected Output for Top 10 customers in 2018 using: begin topSpenders(2018,10 end: 3 Gary Jenkins s422.64 Excellent 45 Fred Fontain $359.21 Excellent 16 Ralph Foster $351.64 Excellent 81…arrow_forward
- Write the appropriate SQL query for each of the following questions: A) Display ALL the activities organized by the IT club B) Display the number of students who are acting in each club.arrow_forwardWrite the appropriate SQL query for each of the following questions: Display the list of students who are involved in the IT club Display the details of all the activities that have taken place in 'Salalah Hall'arrow_forwardWrite the code steps to perform the following within SQL Create a database bearing the name of the department in which you study. This database includes three tables. The first is for teachers. The following columns ( id, address, name, age ) contain a specific column value that cannot be empty in this table The second table is for employees, holds the following columns (, Salary id, address, name, age) the value of a specified column as the primary key of this table. The third and last table is for students and includes the following columns (id, address, name, age) and a specific column value that cannot be empty Fill in the tables with data and do the following:1. Arrange employees in descending order . 2. Find the average ages of the people in all the tables.3. Merging the first table for teachers with the second table for employees. If the number of elements of the combined table is greater than 15 or less than 15, write a message explaining thatarrow_forward
- BOOKS BookID BookName YearOfPublication AuthorID Price Bk1 Databases 2007 A1 1000 Bk2 Programming 2020 A2 500 … …. From the tables given above, write the following in form of relational algebra Selects rows from the table Books where Book Name is ‘History’ and 'price' is 1000 or those books published after 2015arrow_forwardSchema: Frequents(kid, store) Sells(store, candy) Likes(kid, candy) d) Use SQL to list the names of all the candies that are liked by at least one kid, along with the names of the stores that sell them. Sort the result in alphabetical order by candy name.arrow_forward1. The data type for Borrower_name in Borrowers Table is: A. Short text C. Currency B. Long text D. Yes/No Borrowers Field Name Borrower ID Borrower Name Phone num Membership_activation Data Type AutoNumber Short Text Short Text Yes/Noarrow_forward
- Database systems In SQL MurachCollege database. Provide a list of all of the students, the number of courses they are taking, and the number of different instructors they have across all of their courses. The first column should provide the last name of each student (column titled Student Last Name). The second column should provide the number of courses that each student is taking (column titled Number of Courses). The third column should provide the number of different instructors that each student has for all of the courses they are taking (column titled Number of Different Instructors). No other columns should be provided in the result. Organize the result by student last name in alphabetical order.arrow_forwardNeed help writing SQL queries for sample data basearrow_forwardDatebase Design a) Write an SQL query to determine the total number of hours and the total number of lessons Tutor 106 taught in June and July 2018. b) Write an SQL query to list the Read scores of students who were ever taught by tutors whose status is Dropped. c) List all active students in June by name. (Make up names and other data if you are actually building a prototype database.) Include the number of hours students received tutoring and how many lessons they completed.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781305627482Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781285196145Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos CoronelPublisher:Cengage LearningA Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology Ptr
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781285196145
Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:Cengage Learning
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
SQL Basics for Beginners | Learn SQL | SQL Tutorial for Beginners | Edureka; Author: edureka;https://www.youtube.com/watch?v=zbMHLJ0dY4w;License: Standard YouTube License, CC-BY