Database Systems: Design, Implementation, & Management
12th Edition
ISBN: 9781305627482
Author: Carlos Coronel, Steven Morris
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 8, Problem 69C
Update the DETAILRENTAL table to set the values in DETAIL_RETURNDATE to include a time component. Make each entry match the values shown in the following table.
TABLE P8.53 UPDATES FOR THE DETAILRENTAL TABLE
RENT_NUM | VID_NUM | DETAIL_RETURNDATE |
1001 | 34342 | 02-MAR-18 10:00am |
1001 | 61353 | 03-MAR-18 11:30am |
1002 | 59237 | 04-MAR-18 03:30pm |
1003 | 54325 | 09-MAR-18 04:00pm |
1003 | 61369 | 09-MAR-18 04:00pm |
1003 | 61388 | 09-MAR-18 04:00pm |
1004 | 44392 | 07-MAR-18 09:00am |
1004 | 34367 | 07-MAR-18 09:00am |
1004 | 34341 | 07-MAR-18 09:00am |
1005 | 34342 | 05-MAR-18 12:30pm |
1005 | 44397 | 05-MAR-18 12:30pm |
1006 | 34366 | 04-MAR-18 10:15pm |
1006 | 61367 | |
1007 | 34368 | |
1008 | 34369 | 05-MAR-18 09:30pm |
1009 | 54324 | |
1001 | 34366 | 02-MAR-18 10:00am |
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
Question: (MySQL Syntax)
Write a single UPDATE statement to change the due date for all books borrowed on same day as the borrowing patron's sign-up. These due dates should be changed to exactly 30 days after patron sign-up.
Here are the tables:
CREATE TABLE book(isbn VARCHAR(100) PRIMARY KEY,title VARCHAR(100) NOT NULL,author VARCHAR(100) NOT NULL,pub_date DATE);
CREATE TABLE patron(id INT PRIMARY KEY,first_name VARCHAR(100) NOT NULL,last_name VARCHAR(100) NOT NULL,sign_up DATE NOT NULL);
CREATE TABLE borrow(patron INT NOT NULL,book VARCHAR(100) NOT NULL,check_out_date DATE NOT NULL,due_date DATE NOT NULL,PRIMARY KEY(patron, book, check_out_date),FOREIGN KEY (patron) REFERENCES patron(id),FOREIGN KEY (book) REFERENCES book(isbn));
CREATE TABLE late_notice(patron INT NOT NULL,book VARCHAR(100) NOT NULL,check_out_date DATE NOT NULL,notice_date DATE,FOREIGN KEY (patron, book, check_out_date) REFERENCES borrow(patron, book, check_out_date));
Insert the following records into their corresponding tables, using the MySQL CLI. Take a screenshot of a Select * command being successfully executed on each table (6 total).
Student
studentNumber
SchoolNumber
firstname
lastName
birthDate
2411
45
Harry
Potter
2006-09-15
1217
45
Ron
Weasley
2005-08-17
1093
45
Hermione
Granger
2006-11-24
2600
45
Neville
Longbottom
2007-11-01
2258
54
Topanga
Lawrence
2008-03-05
2895
54
Cory
Mathews
2007-02-17
1601
54
Eric
Mathews
2005-08-22
2725
54
Shawn
Hunter
2008-05-31
2056
119
Taylor
Kitsch
2009-08-08
2168
119
Zach
Gilford
2005-08-02
1803
119
Tyra
Collette
2007-08-02
2213
119
Jason
Street
2006-01-17
2932
345
Abed
Nadir
2007-04-15
2492
345
Jeff
Winger
2008-08-10
1440
345
Britta
Perry
2006-05-21
2036
345
Annie
Edison
2006-05-25
2732
93
Zack…
Change the OCCUPIED column in the LARGE_PROPERTY table to N for OWNER NUM KO104.
Expected Results
OFFICE_NUM
ADDRESS
BDRMS
FLOORS
MONTHLY_RENT
OWNER_NUM
OCCUPIED
1
105 North Illinois Rd.
NULL
1
1782.00
KO104
N
2
594 Leatherwood Dr.
5
2
2871.00
KO104
N
ANSWER SOMEONE GAVE ME
UPDATE LARGE_PROPERTY SET OCCUPIED = 'N' WHERE OWNER_NUM = KO104;
ERROR 1054 (42S22) at line 1: Unknown column 'KO104' in 'where clause'
Chapter 8 Solutions
Database Systems: Design, Implementation, & Management
Ch. 8 - What is a cross join? Give an example of its...Ch. 8 - What three join types are included in the outer...Ch. 8 - Using tables named T1 and T2, write a query...Ch. 8 - Prob. 4RQCh. 8 - Prob. 5RQCh. 8 - Prob. 6RQCh. 8 - Prob. 7RQCh. 8 - What does it mean to say that SQL operators are...Ch. 8 - Prob. 9RQCh. 8 - Prob. 10RQ
Ch. 8 - Prob. 11RQCh. 8 - Prob. 12RQCh. 8 - Given the employee information in Question 11,...Ch. 8 - Prob. 14RQCh. 8 - Prob. 15RQCh. 8 - Prob. 16RQCh. 8 - What Oracle function should you use to calculate...Ch. 8 - Prob. 18RQCh. 8 - What string function should you use to list the...Ch. 8 - Prob. 20RQCh. 8 - Prob. 21RQCh. 8 - Prob. 22RQCh. 8 - Prob. 23RQCh. 8 - Prob. 24RQCh. 8 - Prob. 1PCh. 8 - Insert the data into the tables you created in...Ch. 8 - Prob. 3PCh. 8 - Prob. 4PCh. 8 - Prob. 5PCh. 8 - Prob. 6PCh. 8 - Prob. 7PCh. 8 - Prob. 8PCh. 8 - Prob. 9PCh. 8 - Modify the CUSTOMER table to include two new...Ch. 8 - Assuming that you completed Problem 10, write the...Ch. 8 - Assuming that the CUSTOMER table contains a...Ch. 8 - Write the query that lists the average age of your...Ch. 8 - Write the trigger to update the CUST_BALANCE in...Ch. 8 - Prob. 15PCh. 8 - Prob. 16PCh. 8 - Write a trigger to update the customer balance...Ch. 8 - Write a procedure to delete an invoice, giving the...Ch. 8 - Prob. 19PCh. 8 - Prob. 20PCh. 8 - Prob. 21PCh. 8 - Prob. 22PCh. 8 - Write a single SQL command to increase all price...Ch. 8 - Prob. 24PCh. 8 - Prob. 25PCh. 8 - Prob. 26PCh. 8 - Prob. 27PCh. 8 - Create a trigger named trg_line_total to write the...Ch. 8 - Create a trigger named trg_line_prod that...Ch. 8 - Create a stored procedure named prc_inv_amounts to...Ch. 8 - Create a procedure named prc_cus_balance_update...Ch. 8 - Modify the MODEL table to add the attribute and...Ch. 8 - Prob. 33PCh. 8 - Modify the CHARTER table to add the attributes...Ch. 8 - Write the sequence of commands required to update...Ch. 8 - Write the sequence of commands required to update...Ch. 8 - Write the command required to update the...Ch. 8 - Write the command required to update the...Ch. 8 - Write the command required to update the...Ch. 8 - Prob. 40PCh. 8 - Create a trigger named trg_char_hours that...Ch. 8 - Create a trigger named trg_pic_hours that...Ch. 8 - Create a trigger named trg_cust_balance that...Ch. 8 - Prob. 44PCh. 8 - Prob. 45PCh. 8 - Prob. 46PCh. 8 - Prob. 47PCh. 8 - Prob. 48PCh. 8 - Prob. 49PCh. 8 - Prob. 50PCh. 8 - Prob. 51PCh. 8 - Prob. 52PCh. 8 - Prob. 53PCh. 8 - Prob. 54PCh. 8 - Prob. 55PCh. 8 - Prob. 56PCh. 8 - Prob. 57PCh. 8 - Prob. 58PCh. 8 - Prob. 59PCh. 8 - Prob. 61PCh. 8 - Prob. 62PCh. 8 - Prob. 63PCh. 8 - Prob. 64PCh. 8 - Prob. 65PCh. 8 - Prob. 66PCh. 8 - Prob. 67PCh. 8 - Alter the DETAILRENTAL table to include a derived...Ch. 8 - Update the DETAILRENTAL table to set the values in...Ch. 8 - Alter the VIDEO table to include an attribute...Ch. 8 - Update the VID_STATUS attribute of the VIDEO table...Ch. 8 - Alter the PRICE table to include an attribute...Ch. 8 - Prob. 73CCh. 8 - Prob. 76C
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
- Add a new row in the ORDERS table with the following data: Order# = 1023 and Customer# = 1009. Describe the error raised and what caused the error.arrow_forwardUsing MySQL, create a table named CUST_MYSQL with the same fields as in Problem 16, except, use the AUTO_INCREMENT feature for the CUST_NUM field.arrow_forwardUsing the STUDENT table structure shown, do the following: Attribute Name Sample Value Sample Value Sample Value Sample Value Sample Value INV_NUM 211347 211347 211347 211348 211349 PROD_NUM AA-E3422QW QD-300932X RU-995748G AA-E3422QW GH-778345P SALE_DATE 15-Jan-2018 15-Jan-2018 15-Jan-2018 15-Jan-2018 16-Jan-2018 PROD_LABEL Rotary sander 0.25-in. drill bit Band saw Rotary sander Power drill VEND_CODE 211 211 309 211 157 VEND_NAME NeverFail, Inc. NeverFail, Inc. BeGood, Inc. NeverFail, Inc. ToughGo, Inc. QUANT_SOLD 1 8 1 2 1 PROD_PRICE $49.95 $3.45 $39.99 $49.95 $87.75 A. Write the relational schema, draw its dependency diagram and identify all dependencies, including all partial and transitive dependencies. You can assume that the table does not contain repeating groups and that any invoice number may reference more than one product. (Hint: This table…arrow_forward
- Below are some rows of the table INVOICE COD PROV_COD DATE TYPE LOC TOTAL 2910 192 2022-03-11 90 TX 1928 9301 384 2022-05-03 90 NY 2800 Overdue invoices are those whose date plus TYPE days have passed. Which of the following shows all invoices with overdue dates? a. SELECT * FROM INVOICE WHERE CURDATE() - DATE > TYPE b. SELECT * FROM INVOICE WHERE CURDATE()-TYPE >DATE c. SELECT * FROM INVOICE WHERE DATE+TYPE < CURDATE() d. SELECT * FROM INVOICE WHERE DATE+TYPE > CURDATE()arrow_forwardProblem 1. Using the INVOICE table structure shown in table below do the following: INVOICE Attribute Name Sample Value Sample Value Sample Value Sample Value Sample Value INV_NUM 211347 211347 211347 211348 211349 PROD_NUM AA-E3422QW QD-300932X RU-995748G AA-E3422QW GH-778345P SALE_DATE 15-Jan-2016 15-Jan-2016 15-Jan-2016 15-Jan-2016 16-Jan-2016 PROD_LABEL Rotary sander 0.25-in. drill bit Band saw Rotary sander Power drill VEND_CODE 211 211 309 211 157 VEND_NAME NeverFail, Inc. NeverFail, Inc. BeGood, Inc. NeverFail, Inc. ToughGo, Inc. QUANT_SOLD 1 8 1 2 1 PROD_PRICE $49.95 $3.45 $39.99 $49.95 $87.75 Write the relational schema, draw its dependency diagram, and identify all dependencies, including all partial and transitive dependencies. You can assume that the table does not contain repeating groups and that an invoice number references more than one…arrow_forwardAdd two columns to the EMPLOYEES table. One column, named EmpDate, contains thedate of employment for each employee, and its default value should be the system date. Thesecond column, named EndDate, contains employees’ date of termination. When I put this formal it says, line 2 has invalid identifier! Can you help me what I need to fix from line 2? alter table EMPLOYEES2add column EmpDate date = getdate(),add column EndDate;arrow_forward
- Problem 45 IN MYSQL Create a trigger named trg_pic_hours that automatically updates the PILOT table when a new CREW row is added and the CREW table uses a Pilot CREW_JOB entry. Use the CHARTER table’s CHAR_HOURS_FLOWN to update the PILOT table’s PIL_PIC_HRS only when the CREW table uses a Pilot CREW_JOB entry.arrow_forwardFor reading order as a functional test for summarization, fill in the rightmost two columns of the table below. Which Summarizer is the best of the 5 shown, and why? Document Set Document Order Weighted Distance to Original Ranked Order Original ABCDEFGHIJ N/A N/A Summarizer 1 ABFDECHIGJ Summarizer 2 ABCIEHJDGF Summarizer 3 ABDCFEHIGJ Summarizer 4 BACEDGFIHJ Summarizer 5 ADCFEBIGHJarrow_forwardAdd the provided information to a new record in the REP table. SELECT * FROM REP Expected Results REP_ID FIRST_NAME LAST_NAME ADDRESS CITY STATE POSTAL CELL_PHONE COMMISSION RATE 35 Fred Kiser 427 Billings Dr. Cody WY 82414 307-555-6309 0.00 0.05arrow_forward
- Import the “world.sql” database to phpMyAdmin, you should be able to view it’s four tables. 1) From the countrylanguage table, extract/generate two columns: Language and COUNT(*), rank the frequency of languages in decreasing order, the COUNT(*) column should indicate the number of appearance for each different language. Provide the code and the first screenshot for the first 25 rows of the generated table.arrow_forwardFor each filing segment, indicate in the table whether a cross-reference is needed. Then scroll down to the blank rows at the bottom of the table and fill in the necessary cross-references, in order, starting with the first blank row of the table. For each cross-reference, in the far left column of the table, fill in the original filing segment number followed by X. (For example, a cross-reference for filing segment 1. Would be labeled 1X). Then, fill in the filing segment and key units. Then , for each cross-reference, fill in the cross-reference note (“SEE…” or “SEE ALSO…”) in the column on the far right of the table. See the example filing segment and scroll down to see it’s corresponding cross-reference example.arrow_forwardUsing SQL: Write a script that uses the XML document shown below to update the contact information in the Vendors table. <ContactUpdates> <Contact VendorID="4"> <LastName>McCrystle</LastName> <FirstName>Timothy</FirstName> </Contact> <Contact VendorID="10"> <LastName>Flynn</LastName> <FirstName>Erin</FirstName> </Contact> </ContactUpdates> 2. Write a script that returns a result set that contains all of the data stored in the XML document in exercise 2. I only need this part, first part only for referencearrow_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 LearningNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
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
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
dml in sql with examples; Author: Education 4u;https://www.youtube.com/watch?v=WvOseanUdk4;License: Standard YouTube License, CC-BY