
The management of KimTay Pet Supplies (a supplier of pet supplies, food, and accessories located in Cody, Wyoming) has determined that the company’s recent growth no longer makes it feasible to maintain customer, invoice, and inventory data using its manual systems. In addition, KimTay Pet Supplies wants to build an Internet presence. With the data stored in a database, management will be able to ensure that the data is up-to-date and more accurate than in the current manual systems. In addition, managers will be able to obtain answers to their questions concerning the data in the database easily and quickly, with the option of producing a variety of useful reports.
Task 1: List the item ID as ITEM_ID and description as ITEM_DESC for all items. The descriptions should appear in uppercase letters.
Task 2: List the customer ID and first and last names for all customers located in the city of Cody. Your query should ignore case. For example, a customer with the city Cody should be included, as should customers whose city is CODY, cody, cOdY, and so on.
Task 3: List the customer ID, first and last names, and balance for all customers. The balance should be rounded to the nearest dollar.
Task 4: KimTay Pet Supplies is running a promotion that is valid for up to 20 days after an order is placed. List the INVOICE_NUM, CUST_ID, FIRST_NAME, LAST_NAME, INVOICE_DATE, and the promotion date for each invoice as PROMOTION_DATE. The promotion date is 20 days after the INVOICE_DATE was placed.
Task 5: Create the GET_CREDIT_LIMIT procedure to obtain the full name and credit limit of the customer whose ID currently is stored in I_CUST_ID. Place these values in the variables I_CUSTOMER_NAME and I_CREDIT_LIMIT, respectively. When the procedure is called it should output the contents of I_CUSTOMER_NAME and I_CREDIT_LIMIT.
Task 6: Create the GET_INVOICE_DATE procedure to obtain the customer ID, first and last names of the customer, and the invoice date for the invoice whose number currently is stored in I_INVOICE_NUM. Place these values in the variables I_CUST_ID, I_CUST_NAME, and I_INVOICE_DATE respectively. When the procedure is called it should output the contents of I_CUST_ID, I_CUST_NAME, and I_INVOICE_DATE.
Task 7: Create the ADD_INVOICE procedure to add rows to the INVOICE table.
Task 8: Create the UPDATE_INVOICE procedure to change the date of the invoice whose number is stored in I_INVOICE_NUM to the date currently found in I_INVOICE_DATE.
Task 9: Create the DELETE_INVOICE procedure to delete the invoice whose number is stored in I_INVOICE_NUM.
Task 10: Create the ADD_COMMISSION_TRIG trigger to add the customer’s balance multiplied by the sales rep’s commission rate to the commission for the corresponding sales rep when adding a new customer.
Task 11: Create the UPD_COMMISSION_TRIG trigger to add the difference between the new balance and the old balance multiplied by the sales rep’s commission rate to the commission for the corresponding sales rep when updating a customer.
Task 12: Create the DEL_COMMISSION_TRIG trigger to subtract the balance multiplied by the sales rep’s commission rate from the commission for the corresponding sales rep when deleting a customer.


Trending nowThis is a popular solution!
Step by stepSolved in 3 steps

- Explain the concept of database sharding and its role in achieving horizontal scalability. Provide an example of how sharding can be implemented in a distributed database system.arrow_forwardExplain the concept of database sharding and how it helps in distributing data across multiple servers for scalability.arrow_forwardNEED ERD DIAGRAM OF THIS SCENARIOarrow_forward
- DATABASE MANAGEMENT ABC Walk-in Clinic is located in a large metropolitan city in Canada. The clinic staff consists of ten doctors, six nurses, five office secretaries, two administrative assistants and one manager. First time Patients have to visit the clinic personally and fill a registration form that contains their personal and health related information. An office secretary would then enter that information in the computer based information system. Patients may become a permanent patient (at any time) for one of the doctors at the clinic by filling up necessary forms (they are called enrolled patients) or they may choose to come walk-in for every visit. (They usually called walk-in patients) Enrolled Patients may book their appointments online or by calling, the office and one of the secretaries would then book their appointment with their doctor on a particular day/time. Any booked appointment may be cancelled up to 24 hours in advance after which the clinic charges a…arrow_forwardExplain why a cloud database's total cost of ownership may be lower than that of a traditional corporate database.arrow_forwardExplain the term "Data Lake" and how it differs from a traditional database.arrow_forward
- DATABASE SYSTEMS AllTaste Restaurant is a restaurant that is famous for its taste, so it has a lot of customers. All the flavors are here, serving typical archipelago food that has spread in several cities with various mainstay menus. However, even though it already has many branches and a large number of order transactions every day, AllTaste Restaurant does not yet have an application and database to manage transactions and data. Order recording and sales reports are still done manually. AllTaste Restaurant owners know that information technology can support their business, so they plan to build applications to serve food orders both offline and online. In the database design stage, it is known as bottom-up, top-down, and inside-out approaches. Explain the three approaches! In your opinion, what approach is used for database system development at AllTaste Restaurant? Explain why you chose this approach! What techniques do you use to collect information (fact-finding technique)?…arrow_forwardOutline some specific measures that a company might take to ensure the quality and completeness of its client database before putting it into a data warehouse. What criteria would you use to determine whether the data is accurate enough?arrow_forwardExplain the concept of database indexing in-depth, including various types of indexes and their impact on query optimization. Provide examples of scenarios where specific types of indexes are advantageous.arrow_forward
- 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





