Database Systems: Design, Implementation, & Management
Database Systems: Design, Implementation, & Management
13th Edition
ISBN: 9781337627900
Author: Carlos Coronel, Steven Morris
Publisher: Cengage Learning
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 8, Problem 53P

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
Blurred answer
Students have asked these similar questions
The data table is off by its numbers, help me fix please
What is the proper way to insert this into my table?    Insert into Vehicle values (0002,01234567890123452,'Chev','Trail-B', to_date(‘2011’,’yyyy’), 49000, 159000, to_date(’10-19-2020’,’mm-dd-yyy’),'10a');   CREATE TABLE Vehicle ( Vehicle_ID VARCHAR2(10), Vehicle_VIN VARCHAR2 (17) Unique, Vehicle_Make VARCHAR2 (20) NOT NULL, Vehicle_Model VARCHAR2 (20) NOT NULL, Vehicle_Year DATE NOT NULL, Vehicle_Purchase_Cost NUMBER (10,2), Vehicle_Mileage NUMBER (7), Vehicle_Mileage_Date DATE, Vehicle_Office VARCHAR2 (3), PRIMARY KEY (Vehicle_ID) );
plz help me fix the following trigger problem is in picture CREATE OR REPLACE TRIGGER MEM_BALANCE AFTER UPDATE ON LATE_FEE FOR EACH ROW BEGIN UPDATE DETAILRENTAL SET LATE_FEE = CASE WHEN LATE_FEE = (DETAIL_DUEDATE – DETAIL_RETURNDATE) * DAILY_LATE_FEE WHEN LATE_FEE = (DETAIL_DUEDATE – DETAIL_RETURNDATE) * DAILY_LATE_FEE IS NULL THEN LATE_FEE := 0 WHEN UPDATED_LATE_FEE:= ORIGINAL_LATE_FEE – LATE_FEE WHEN UPDATED_LATE_FEE:= ORIGINAL_LATE_FEE – LATE_FEE IS NOT NULL THEN MEM_BALANCE:= TOTAL_BALNCE – UPDATED_LATE_FEE ELSE NULL END; the database im trying to put the trigger in CREATE TABLE MEMBERSHIP( MEM_NUM CHAR(3) CONSTRAINT MEMBER_MEM_NUM_PK PRIMARY KEY,MEM_FNAME VARCHAR(30) NOT NULL,MEM_LNAME VARCHAR(30) NOT NULL,MEM_STREET VARCHAR(15),MEM_CITY VARCHAR(10),MEM_STATE CHAR(2),MEM_ZIP CHAR(5),MEM_BALANCE NUMBER (2)); ALTER TABLE MEMBERSHIPMODIFY MEM_STREET VARCHAR(25);CREATE TABLE RENTAL( RENT_NUM CHAR(4) CONSTRAINT RENTAL_RENT_NUM_PK PRIMARY KEY,RENT_DATE DATE,MEM_NUM CHAR(3),CONSTRAINT…

Chapter 8 Solutions

Database Systems: Design, Implementation, & Management

Ch. 8 - Prob. 11RQCh. 8 - Prob. 12RQCh. 8 - Write the SQL code that will create only the table...Ch. 8 - Having created the table structure in Problem 1,...Ch. 8 - Prob. 3PCh. 8 - Write the SQL code that will save the changes made...Ch. 8 - Write the SQL code to change the job code to 501...Ch. 8 - Write the SQL code to delete the row for William...Ch. 8 - Write the SQL code to create a copy of EMP_1,...Ch. 8 - Using the EMP_2 table, write the SQL code that...Ch. 8 - Using the EMP_2 table, write the SQL code to...Ch. 8 - Prob. 10PCh. 8 - Prob. 11PCh. 8 - Prob. 12PCh. 8 - Prob. 13PCh. 8 - Prob. 14PCh. 8 - Prob. 15PCh. 8 - Create the CUSTOMER table structure illustrated in...Ch. 8 - Create the INVOICE table structure illustrated in...Ch. 8 - Prob. 18PCh. 8 - Prob. 19PCh. 8 - Create an Oracle sequence named CUST_NUM_SEQ to...Ch. 8 - Create an Oracle sequence named INV_NUM_SEQ to...Ch. 8 - Prob. 22PCh. 8 - Modify the CUSTOMER table to include the customers...Ch. 8 - Prob. 24PCh. 8 - Prob. 25PCh. 8 - Create a trigger named trg_updatecustbalance to...Ch. 8 - Prob. 27PCh. 8 - Prob. 28PCh. 8 - Write a trigger to update the customer balance...Ch. 8 - Prob. 30PCh. 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. 36PCh. 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. 43PCh. 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 - Write the SQL code to create the table structures...Ch. 8 - The following tables provide a very small portion...Ch. 8 - For Questions 49-63, use the tables that were...Ch. 8 - Prob. 50PCh. 8 - Write a single SQL command to increase all price...Ch. 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. 57PCh. 8 - Prob. 60P
Knowledge Booster
Background pattern image
Computer Science
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
Recommended textbooks for you
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
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
Text book image
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Text book image
Oracle 12c: SQL
Computer Science
ISBN:9781305251038
Author:Joan Casteel
Publisher:Cengage Learning
Text book image
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Text book image
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
dml in sql with examples; Author: Education 4u;https://www.youtube.com/watch?v=WvOseanUdk4;License: Standard YouTube License, CC-BY