Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
thumb_up100%
The Stock of the book needs to be updated correspondingly after a customer has made an order, or a customer has cancelled an order. It can be accomplished by using trigger. You are asked to implement a trigger which needs to take following into consideration:
a. The trigger needs to be fired after a new row has been inserted into table Orders, or after a row has been deleted from table Orders which indicates an order has been cancelled
b. Each order may contain multiple books in ORDERTITEMS table
You also need to write SQL statement or/and PL/SQL code to demonstrate that the implemented trigger accomplishes the business logic
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 with 1 images
Knowledge Booster
Similar questions
- Part 2: Sorting the WorkOrders via dates Another error that will still be showing is that there is not Comparable/compareTo() method setup on the WorkOrder class file. That is something you need to fix and code. Implement the use of the Comparable interface and add the compareTo() method to the WorkOrder class. The compareTo() method will take a little work here. We are going to compare via the date of the work order. The dates of the WorkOrder are saved in a MM-DD-YYYY format. There is a dash '-' in between each part of the date. You will need to split both the current object's date and the date sent through the compareTo() parameters. You will have three things to compare against. You first need to check the year. If the years are the same value then you need to go another step to check the months, otherwise you compare them with less than or greater than and return the corresponding value. If you have to check the months it would be the same for years. If the months are the same you…arrow_forwardYou are given a list of projects and a list of dependencies (which is a list of pairs ofprojects, where the second project is dependent on the first project). All of a project's dependencies must be built before the project is. Find a build order that will allow the projects to be built. If there is no valid build order, return an error.EXAMPLEInput:projects: a, b, c, d, e, fdependencies: (a, d), (f, b), (b, d), (f, a), (d, c)Output: f, e, a, b, d, carrow_forwardYou are given a list of projects and a list of dependencies (which is a list of pairs ofprojects, where the second project is dependent on the first project). All of a project's dependenciesmust be built before the project is. Find a build order that will allow the projects to be built. If thereis no valid build order, return an error.EXAMPLEInput:projects: a, b, c, d, e, fdependencies: (a, d), (f, b), (b, d), (f, a), (d, c)Output: f, e, a, b, d, carrow_forward
- In Checkpoint B, the game will be playable as a two-player game, albeit the competition will be a computer player who makes moves randomly. Implement these functions from the template following the description (specification) in their docstring: shuffle() replace_deck() deal_initial_hands() play_hand() should be extended to support 'random' mode The main function to drive the game has been provided. In 'interactive' mode, play_hand() should behave the same way as in Part A In 'random' mode, the computer selects actions randomly. Compared to 'interactive' mode: Every call to input() for the player should be replaced with a random choice Extra printed feedback for the player should be omitted For testing, we have hard-coded the seed 26 for the random source Hint: you can use random.randint(x, y) to select a number between x and y, inclusive. In particular, "flipping a coin" would be accomplished via random.randint(0, 1) Sample input/output When the inputs are: yes 1 no yes 9 The…arrow_forwardIn C++,arrow_forwardPlease create a driver class (java) that contains only a main method which should: Create a new CustomerList obiect Prompt the user to enter a file name Call the getCustomer List method with the file name that the user entered While (true) { Prompt user to enter command; if (command is "a") { Prompt user for customerNumber firstName lastName balance; Create a customerRecord and store it in the database; } else if (command is "f") { Prompt the user to enter a customer number and then displays the corresponding record on the screen; } else if (command is "g") { Prompt the user to enter a file name to save the latest update; Save the information in the database to the file specified by the user; Terminate program; } else { Display error message: } }arrow_forward
- I already have the code for the assignment below, but there is some errors in the code. Please help me fix them. The assignment: Make a telephone lookup program. Read a data set of 1,000 names and telephone numbers from a file that contains the numbers in random order. Handle lookups by name and also reverse lookups by phone number. Use a binary search for both lookups. This assignment needs a resource class and a driver class. The resource class and the driver class will be in two separate files. The resource class will contain all of the methods and the driver class only needs to call the methods. The driver class needs to have only 5 lines of code. The code needs to be written in Java. Please help me with exactly what I asked for help. The code: PhoneLookup.java import java.io.FileReader;import java.io.IOException;import java.util.Scanner; public class PhoneLookup{ public static void main(String[] args) throws IOException { Scanner in = new Scanner(System.in);…arrow_forwardNeed help making a java file that combines both linearSearch and binarySearch •Both search methods must use the Comparable<T> interface and the compareTo() method.•Your program must be able to handle different data types, i.e., use generics.•For binarySearch, if you decide to use a midpoint computation formula that is different fromthe textbook, explain that formula briefly as a comment within your code. //code from textbook //linearSearch public static <T> boolean linearSearch(T[] data, int min, int max, T target) { int index = min; boolean found = false; while (!found && index <= max) { found = data [index].equals(target); index++; } return found; } //binarySearch public static <T extends Comparable<T>> boolean binarySearch(T[] data, int min, int max, T target) { boolean found = false; int midpoint = (min + max)/2; if (data[midpoint].compareTo(target)==0)…arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY
Computer Networking: A Top-Down Approach (7th Edi...
Computer Engineering
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:PEARSON
Computer Organization and Design MIPS Edition, Fi...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:9781337569330
Author:Jill West, Tamara Dean, Jean Andrews
Publisher:Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education
Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY