Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps
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
- Do this in MySQL please: Create a stored procedure named prc_inv_amounts to update the INV_SUBTOTAL, INV_TAX, and INV_TOTAL. The procedure takes the invoice number as a parameter. The INV_SUBTOTAL is the sum of the LINE_TOTAL amounts for the invoice, the INV_TAX is the product of the INV_SUBTOTAL and the tax rate (8 percent), and the INV_TOTAL is the sum of the INV_SUBTOTAL and the INV_TAX.arrow_forwardTask 3: The Car Maintenance team wants to insert and store the following maintenance types to the MAINTENANCE_TYPES table: ID: 1; Description: Tire Change; Price: 50 ID: 2; Description; Oil Change; Price: 45 ID: 3; Description; Full Cleaning; Price: 100 ID: 4; Description; Gas Pump Change; Price: 145 Add the four maintenance types to the MAINTENANCE_TYPES table.arrow_forwardWrite a stored procedure called sp_apply_discount() that will apply percent discount to books in a subject. The stored procedure takes in 2 parameters, percentDiscount (DECIMAL(8,2)) and subject (VARCHAR(120)). Using these parameters, the stored procedure computes the discount for the book cost and stores it in the FINAL_PRICE field. For example, the following stored procedure call: call sp_apply_discount(0.15, 'Database');would compute 15% percent discount from the book cost in the Database subject category and store it in the FINAL_PRICE column as depicted in this image:arrow_forward
- Create a stored procedure that will return the number of customers in a given state. The parameter for your stored procedure should accept the state abbreviation ('UT') and return the results of a query that returns the number of customers in that state.arrow_forwardThe Movie table has the following columns: ID - positive integer Title - variable-length string Genre - variable-length string RatingCode - variable-length string Year - integer Write ALTER statements to make the following modifications to the Movie table: Add a Producer column with VARCHAR data type (max 50 chars). Remove the Genre column. Change the Year column's name to ReleaseYear, and change the data type to SMALLINT.arrow_forwardDatabase: CUSTOMER (CustomerID, LastName, FIrstName, Phone, EmailAddress) PURCHASE (InvoiceNumber, InvoiceDate, PreTaxAmount, CustomerID) PURCHASE_ITEM (InvoiceNumber, InvoiceLineNumber, Item Number, RetailPrice) ITEM (ItemNumber, ItemDesciption, Cost, ArtistLastName, ArtistFirstName) Write an SQL statement to show which cutomers bought which items, and include any items that have not been sold. Include CUSTOMER.LastName, CUSTOMER.FirstName, IvoiceNumber, InvoiceDate, ItemNumber, ItemDescription, ArtistLastName, and ArtistFirstName,. Use a join using JOIN ON syntax, and sort the results by ArtistLastName and ArtistFirstName in ascending order. Note that in Microsoft Access this require multiple queries. From Database Concepts 9th Ed. (Kroenke)arrow_forward
- Richardson Ski Racing (RSR) sells equipment needed for downhill ski racing. One of RSR's products is fencing used on downhill courses. The fence product comes in 150-foot rolls and sells for $215 per roll. However, RSR offers quantity discounts. The following table shows the price per roll depending on order size: Quantity Ordered To Price per Roll From 1 70 $215 71 140 $195 141 280 $175 281 and up $155 Click on the datafile logo to reference the data. DATA file (a) Use the VLOOKUP function with the preceding pricing table to determine the total revenue from these orders. (b) Use the COUNTIF function to determine the number of orders in each price bin. From Number of To Price per Roll 70 $215 !!! 140 $195 280 $175 and up $155 1 71 141 281 Orders 172arrow_forwardThis kind of code gives me errors i have more info below. My codeDELIMITER //CREATE PROCEDURE GET_INVOICE_DATE (in I_INVOICE_NUM CHAR(5))DECLARE I_CUST_ID CHAR(5),DECLARE I_CUST_NAME VARCHAR(41),DECLARE I_INVOICE_DATE DATE BEGIN SELECT c.CUST_ID, CONCAT(c.FIRST_NAME, ' ', c.LAST_NAME), i.INVOICE_DATE INTO I_CUST_ID, I_CUST_NAME, I_INVOICE_DATE FROM INVOICES i INNER JOIN CUSTOMER c ON i.CUST_ID = c.CUST_ID WHERE i.INVOICE_NUM = I_INVOICE_NUM; END // Delimiter ; Helpfull info Task #6 – same process as Task #5• Procedure name is GET_INVOICE_DATE with I_INVOICE_NUM in parentheses with 5 characters• There should be 3 declare statements for I_CUST_ID CHAR(5); I_CUST_NAME VARCHAR(41); andI_INVOICE_DATE DATE is datatype• SELECT statement should include the CUSTOMER.CUST_ID, CONCAT for first_name andlast_name AS customer_name, invoice_date• INTO the 3 “I” fields in the declare statement• From should include the CUSTOMER and INVOICES tables• Where clause to join CUSTOMER.CUST_ID =…arrow_forwardcalculate_trip_time( iata_src: str, iata_dst: str, flight_walk: List[str], flights: Flight Dir float: def ) -> """ Return a float corresponding to the amount of time required to travel from the source airport to the destination airport to the destination airport, as outlined by the flight_walk. The start time of the trip should be considered zero. In other words, assuming we start the trip at 12:00am, this function should return the time it takes for the trip to finish, including all the waiting times before, and between the flights. If there is no path available, return -1.0 >>> calculate_trip_time("AA1", "AA2", ["AA1", "AA2"], TEST_FLIGHTS_DIR_FOUR_ 2.0 "AA7", ["AA7", "AA1"], TEST_FLIGHTS_DIR_FOUR_ "AA7", ["AA1", "AA7"], TEST_FLIGHTS_DIR_FOUR_ "AA1", ["AA1"], TEST_FLIGHTS_DIR_FOUR_CITIES) "AA2", ["AA4", "AA1", "AA2"], TEST_FLIGHTS_DI "AA3", ["AA1", "AA2", "AA3"], TEST_FLIGHTS_DI >>> calculate_trip_time("AA1", "AA4", ["AA1", "AA4"], TEST_FLIGHTS_DIR_FOUR_ 2.0 || || || >>>…arrow_forward
- The following statements are executed by the given order. create table book (book_id number primary key, book_name varchar2(32) not null, book_isbn varchar2(13) not null); insert into book values (123, 'My first book', 1234); What is the outcome ? The table BOOK is created and a row is inserted. The table BOOK is created and a row NOT is inserted. The table BOOK NOT is created and a row is inserted. The table BOOK NOT is created and a row is NOTinserted.arrow_forwardhttps://www.w3schools.com/sql/trysql.asp?filename=trysql_select_allarrow_forwardDatabase: https://www.w3schools.com/sql/trysql.asp?filename=trysql_select_allarrow_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