Create a functions that has the customer_id as input

Assignment Help Computer Engineering
Reference no: EM132091605

In this part we will learn how to use functions:

1. Create a functions that has the Customer_id as input and returns a number that represents the total cost of orders for this customer. Notice that you will need to multiply the Order_Qty from table order_details and the Unit_Price from table items to get the total cost of each order.

2. Now use the function: Write a select statement that selects all the customers and the total cost of the orders they have ever made.

3. In this part we create a small procedure:

a. Write a procedure that has as input the customer_id. Then the procedure should delete the corresponding customer from table customers.

B. Notice that customer_id is a foreign key on table orders. Therefore the customer cannot be deleted if he has placed orders. To delete a record from customers you should first delete the corresponding orders and to do that you need to first delete the corresponding order_details.

C. Now execute the procedure to delete customer with id 1. If you have solved part 01 a record will be inserted into Customer_Archives.

D. ROLLBACK; and all these changes will be undone

Reference no: EM132091605

Questions Cloud

Calculates the amount of money a person would earn over : Write a program similar to Part C that calculates the amount of money a person would earn over a period of time if their salary is one penny.
Explain why this is an undirected graph : What is the definition of the indegree of a vertex and what is its meaning in this graph?What does it mean if this graph has a cycle?
Display hello world and then go on to the beginning of new : Display "Hello World!" and then go on to the beginning of the next line When the user type the following paragraph, the same will be displayed on the screen.
Create a date object using the class default constructor : Carla created a class called Date. Jameel has been assigned a program to use the Date class as part of a program to create employee records that include dates.
Create a functions that has the customer_id as input : Create a functions that has the Customer_id as input and returns a number that represents the total cost of orders for this customer.
Create a human readable output file that shows the time : As part of the mission of the CS student you have been commissioned to help clean up some of the data recently collected at Aquarena Springs.
Create a use case diagram that captures the scenario : A key component of electronic payments by government is an External Certification Authority (ECA) certificate, which enables secure payment transactions.
Create a console application project : In this part of the assignment, you are required to create a C# Console Application project. The project name should be A3P1.
Prepare a class diagram for the following group of classes : Concept to UML Prepare a class diagram for the following group of classes. Add at least 10 relationships (associations and generalizations) to the diagram.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd