Question

You're building a database that tracks inventory & sales at the company you work for. Every...

You're building a database that tracks inventory & sales at the company you work for.

Every time a row is INSERTed into the OrderLines table, you need a process to be invoked that checks the inventory table to make sure the particular Product is in stock.if the product is out of stock, the Quantity on the row should be changed to 0 indicating there were non in stock for the Product.

You have chosen not to put this logic into a stored procedure because there is risk that rows may be inserted by not calling the stored procedure.

what type of object should you create?

A. A Trigger

B.a view

C. an index

d. a user-defined function.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:trigger

The SQLtrigger are database objcts that are executed whenever an eventoccurs. Thus a SQLtrigger can be made to do required tasks whenever an insert staatement is executed.

Add a comment
Know the answer?
Add Answer to:
You're building a database that tracks inventory & sales at the company you work for. Every...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 3. Write a script that adds rows to the database that you created in exercise 2....

    3. Write a script that adds rows to the database that you created in exercise 2. Add two rows to the Users and Products tables. Add three rows to the Downloads table: one row for user 1 and product 2; one row for user 2 and product 1; and one row for user 2 and product 2. Use the SYSDATE function to insert the current date into the download_date column. Use the sequences created in the previous exercise to get...

  • - - Requirements Building upon your project 1 and project 2, the park will be a Star Wars themed ...

    - - Requirements Building upon your project 1 and project 2, the park will be a Star Wars themed park. You must design additional parts of the database and create the following SQL Script. Step 1: Create table audits via triggers The system must log any insertion, deletion, or updates to the following tables Employee table (project 1) Job table (project 1) ProjectMain table (Project 2) ActivityMain table (Project 2) . . For each one of the table above, you...

  • You will develop an E-Commerce database used to maintain customers, products and sales information. You are...

    You will develop an E-Commerce database used to maintain customers, products and sales information. You are required to 1) gather and analyze requirements 2) design logical structure of the database 3) create stored procedures to develop the tables and insert the data 4) write SQL statements for data extraction and reporting. Throughout the course of this semester you have analyzed the requirements for an eCommerce database, designed and developed your database. As a class we have gone through the process...

  • The Program (Java) You will create a pet database program with the following operations incrementally as...

    The Program (Java) You will create a pet database program with the following operations incrementally as describe in the Milestones section. You are not required to save the pet data into a file. You must use appropriate design and make use of Object-Oriented Design. See milestones. • Add pets o Let the user add as many pets as they want. A pet is entered as a single line consisting of a name and an integer which represents the age of...

  • For this course project, you will use various database management and programming techniques to design and...

    For this course project, you will use various database management and programming techniques to design and develop an online sales and distribution system for a fictitious organization. There are two phases—you will complete the first phase this week and the second phase in W5 Assignment 2. Rationale The focus of the project is to develop your database programming skills. This project will help you get a fair idea of the sales and distribution system in any organization that has a...

  • Rationale The focus of the project is to develop your database programming skills. This project will...

    Rationale The focus of the project is to develop your database programming skills. This project will help you get a fair idea of the sales and distribution system in any organization that has a chain of Carrying and Forwarding Agents (CFAs) or super stockists and stockists. You will be able to implement database programming concepts of ADO.NET in VB.NET and ASP.NET to create a real-life, web-based database application. (VB stands for Visual Basic.) Scenario Smooth Pen, Inc., a pen manufacturing...

  • !!!!!!!Java!!!!! When you are confident that your methods work properly and that you can generate random...

    !!!!!!!Java!!!!! When you are confident that your methods work properly and that you can generate random text with my generateText method, you can move on to the second step. Create a third class called Generator within the cs1410 package. Make class. This class should have a main method that provides a user interface for random text generation. Your interface should work as follows: Main should bring up an input dialog with which the user can enter the desired analysis level...

  • 1. Consider a grocery supermarket planning to computerize their inventory management. The items on shelves will...

    1. Consider a grocery supermarket planning to computerize their inventory management. The items on shelves will be marked with Radio Frequency Identification (RFID) tags and a set of RFID reader-devices will be installed for monitoring the movements of the tagged items. Each tag carries a 96-bit EPC (Electronic Product Code) with a Global Trade Identification number, which is an international standard. The RFID readers are installed on each shelf on the sales floor. The RFID system consists of two types...

  • Create SQL statements based on the given tables: Code to create the tables: CREATE DATABASE LAB...

    Create SQL statements based on the given tables: Code to create the tables: CREATE DATABASE LAB4DB; USE LAB4DB; CREATE TABLE CUSTOMER ( CUS_CODE int primary key, CUS_LNAME varchar(15), CUS_FNAME varchar(15), CUS_INITIAL varchar(1), CUS_AREACODE varchar(3), CUS_PHONE varchar(8), CUS_BALANCE float(8) ); INSERT INTO CUSTOMER VALUES('10010','Ramas','Alfred','A','615','844-2573','0'); INSERT INTO CUSTOMER VALUES('10011','Dunne','Leona','K','713','894-1238','0'); INSERT INTO CUSTOMER VALUES('10012','Smith','Kathy','W','615','894-2285','345.86'); INSERT INTO CUSTOMER VALUES('10013','Olowski','Paul','F','615','894-2180','536.75'); INSERT INTO CUSTOMER VALUES('10014','Orlando','Myron','','615','222-1672','0'); INSERT INTO CUSTOMER VALUES('10015','O''Brian','Amy','B','713','442-3381','0'); INSERT INTO CUSTOMER VALUES('10016','Brown','James','G','615','297-1228','221.19'); INSERT INTO CUSTOMER VALUES('10017','Williams','George','','615','290-2556','768.93'); INSERT INTO CUSTOMER VALUES('10018','Farriss','Anne','G','713','382-7185','216.55'); INSERT INTO CUSTOMER VALUES('10019','Smith','Olette','K','615','297-3809','0'); /*...

  • please use Java!! We are storing the inventory for our fruit stand in a hash table....

    please use Java!! We are storing the inventory for our fruit stand in a hash table. The attached file shows all the possible key/fruit combinations that can be inserted into your hash table. These are the real price lookup values for the corresponding fruit. Problem Description In this programming assignment, you will implement a hash table class fruitHash. Your hash table must include the following methods: 1) hashFunction(key) This method takes a key as an argument and returns the address...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT