Question: -- Create the Products table Create table Products ( Product_Code varchar(10), Product_Desc varchar(100), Product_QOH INT, -- Product Quantity On Hand Product_MIN INT, -- Minimum Quantity

-- Create the Products table
Create table Products
(
Product_Code varchar(10),
Product_Desc varchar(100),
Product_QOH INT, -- Product Quantity On Hand
Product_MIN INT, -- Minimum Quantity of the product
Product_ListPrice FLOAT,
Product_MinOrder INT, -- this is the minimum quantity for restocking an order
Product_ReOrder BIT -- this indicates whether the product needs to re-ordered from the vendor (1 = Yes, 0 = No)
)
-- Insert few records
INSERT INTO Products
VALUES (1, 'Power Supplies', 8, 5, 35.00, 25, 0),
(2, 'Hard Disks', 7, 5, 120.00, 50, 0)
-- display the Products using the SELECT statement
SELECT * from Products
 -- Create the Products tableCreate table Products ( Product_Code varchar(10), Product_Desc

Automating business procedures and automatically maintaining data integrity and consistericy are critical in modern business environment. One of the most critical business procedures/s properinventory management. For example, you want to make sure that your current inventory has enough product availability that can support your product sales. Another example is to ensure that your product order is written to the supplier whenever the products inventory count drops belowa certain number Run the attached script "Products. txt" in your Adventureworks database then create 1 Trgger that address the following business logic: Automatically evaluate the Products Quality On Hand value, if the value of the products qually on Hard is below the minimum quantity of that product, then update the Product Reorder value to 1 which means Yes to order more from the supplier Submit a Word document (with screenshots) that captures thie following 1. The successful creation of the Products table: 2. Data from the Products table. Hint Run a seLECT stoternent 3. The successful creation and testing of the trigger Part 2: Create an Audit log Trigger. Triggers can be used to capture and iog data ctarges in tables. Vour manage wants to be notified each time a price changes for product(s), the report/table should show the old and new price the product(s), the date of the hange. ond the product ID. Hint: Create a new table named it aud log and create a trigger to lusert the requlted date into chis table: Submit a Word document with screen shots that captures the succerstuts

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!