Question
Question 1 Include your two original tables in your report. You cannot use WINEMAKER and WINE. Choose any 2 of the following subtasks from (b),
Question 1
Include your two original tables in your report. You cannot use WINEMAKER and WINE.
Choose any 2 of the following subtasks from (b), (c), (d) and (e).
Find, read, cite and reference several sources about your 2 chosen subtasks.
Use your tables to assist you in answering your 2 subtasks. For example, you might like to show the contents of your tables after attempting to delete/update a record.
a) create two original tables, i.e., the table names, column names and row data must be created by yourself. Your two tables shall be linked by a foreign key and contain several columns and rows. For example, the following two tables are linked by the foreign key WINEMAKER_ID in the WINE table.
(b) ON DELETE RESTRICT
i. When deleting a record from a parent table, in your own words, briefly describe the consequences of specifying ON DELETE RESTRICT on a foreign key in a child table. For example, describe what happens when trying to delete the record containing Penfolds, or the one containing Barrabool Hills.
ii. When deleting a record from a parent table, in your own words, briefly describe the consequences of not specifying ON DELETE RESTRICT.
(c) ON DELETE CASCADE
i. When deleting a record from a parent table, in your own words, briefly describe the consequences of specifying ON DELETE CASCADE on a foreign key in a child table. For example, describe what happens when trying to delete the record containing Penfolds, or the one containing Barrabool Hills.
ii. When deleting a record from a parent table, in your own words, briefly describe the consequences of not specifying ON DELETE CASCADE.
(d) ON UPDATE RESTRICT
i. When updating the primary key of a record in a parent table, in your own words, briefly describe the consequences of specifying ON UPDATE RESTRICT on a foreign key in a child table. For example, describe what happens when trying to update the primary key of the record containing Penfolds, or the one containing Barrabool Hills.
ii. When updating the primary key of a record in a parent table, in your own words, briefly describe the consequences of not specifying ON UPDATE RESTRICT.
(e) ON UPDATE CASCADE
i. When updating the primary key of a record in a parent table, in your own words, briefly describe the consequences of specifying ON UPDATE CASCADE on a foreign key in a child table. For example, describe what happens when trying to update the primary key of the record containing Penfolds, or the one containing Barrabool Hills.
ii. When updating the primary key of a record in a parent table, in your own words, briefly describe the consequences of not specifying ON UPDATE CASCADE.
WINEMAKER WINE IDNAME 1 Penfolds 2 Jacob's Creek 3 Wolf Blass 4 Brown Brothers 5 Barrabool Hills ID NAME VINTAGE PRICE WINEMAKER ID 101 Grange 102Grange 103 Reserve Shiraz 104Grey Label Shiraz 105 Patricia Shiraz 106 Ten Acres Shiraz 107 Double Barrel Shiraz 108 Platinum Label Shiraz 2010 2006 2013 2012 2009 2012 2012 2006 750 700 10 35 50 25 15 170 1 4 4Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started