COMPLETE USING SQL SERVER/ SQL SYNTAX/SSMS

PROVIDE QUERIES AND SCREENSHOT AFTER QUERY IS EXECUTED

COMPLETE ALL QUESTIONS

Assignment Points: 40 1. Using the TAL database create a sequence number starting with 10000000 with a max value of 1000000000 and will increase by 5, use the nocache option. I 2. Create a trigger on the orderline table that will update the onhand qty of the item table based on an order line item being inserted, updated or deleted. When the order line is created then the onhand qty in the item table will be decremented by the number ordered. When the orderline table is updated then the onhand qty of the item will be incremented or decremented based on the number ordered. When the orderline is deleted then increment the onhand qty in the item table Create 2 audit tables based on the orderline and item table. Entries for these 2 tables will be added to when the orderline and item table are inserted updated and deleted (Triggers will do this) 3. 4. Using the Tal database create 2 indexes for each table, one to help provide performance and the other to enforce uniqueness. ORDERS ORDER DATE CUSTOMER NUM ORDER NUM ORDER LINE 51608 ORDER NUM 10/12/2015 126 ITEM NUM NUM ORDERED QUOTED PRICE 51608 51610 10/12/2015 334 CD33 $86.99 $10.95 5 51610 51613 10/13/2015 386 KL78 25 51610 10/13/2015 260 51614 TR40 $13.99 10 51613 51617 10/15/2015 586 DLS1 $104.95 5 51614 FD11 51619 10/15/2015 126 1 $124.95 51617 51617 10/15/2015 586 10/16/2015 796 NL89 $115.99 $116.95 $121.95 $29.95 51623 4 TW35 51625 3 51619 FD11 2 51623 DR67 51623 FH24 $36.95 12 51623 $13.10 $45.79 KD34 10 51625 MT03 ITEM ITEM NUM DESCRIPTION ON HAND CATEGORY STOREHOUSE PRICE AH74 Patience $22.99 9 GME 3 Skittles BR23 21 GME $29.99 2 Wood Block Set (48 plece) CD33 36 TOY $89.49 1 Classic Railway Set DL51 $107.95 12 TOY Giant Star Brain Teaser DR67 $31.95 24 PZL Mancala $50.00 DW23 40 GME 3 $124.95 Rocking Horse 8 TOY 3 FD11 $38.95 Puzzle Gift Set 65 PZL FH24 $75.00 3 Cribbage Set 56 GME KA12 $14.95 2 60 PZL Pentominoes Brain Teaser KD34 $10.95 110 GME 1 Pick Up Sticks KL78 $45.79 1 45 PZL Zauberkasten Brain Teaser MT03 $119.75 3 32 TOY Wood Block Set (62 piece) NL89 $13.99 2 75 GME Tie Tac Toe TR40 $118.95 2 30 TOY Fire Engine TW35

"Get 15% discount on your first 3 orders with us"
Use the following coupon
"FIRST15"

Order Now