a. Write a SQL query that would enable the user 'ww10_StaffMember' to view all of the...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
a. Write a SQL query that would enable the user 'ww10_StaffMember' to view all of the data in the ww10_student table. 1b. (1 query) Assuming the SQL query from #5 has executed, write a SQL query that would remove the granted permission for 'ww10 StaffMember' to view all of the data in the ww10_student table. 1c. (1 trigger) Using the database tables provided on the next page, create a trigger that will fire when an update to the ww10_tutor table takes place and the status of a tutor is changed to 'Dropped' or 'Temp Stop'. The trigger will update the ww10_match_history table by setting the end date of all records for the associated tutor to be the current date. a. Hint: To set the end date in a query, use the GETDATE() function, such as: SET EndDate = GETDATE() ww10 tutor (tutor id, tutor_cert_date, tutor_status) Data Type Column Name Allow Nulls 8 tutor_id int tutor_cert_date date tutor_status varchar(50) tutor_id tutor_cert_date tutor_status 1 100 2020-01-05 Active 2 101 2020-01-05 Temp Stop 3 102 2020-01-05 Dropped 103 2020-05-22 Active 104 2020-05-22 Active 6 105 2020-05-22 Temp Stop 7 106 2020-05-22 Active ww8_student (student_id, student_group, student_read_score) Column Name Data Type Allow Nulls 8 student_id int student_group int student_read_score numeric(2, 1) student_id student_group student_read_score 1 3000 3 2.3 2 3001 2 5.6 3002 3 1.3 3003 1 3.3 3004 2.7 6 3005 4 4.8 7 3006 3 7.8 8 3007 4 1.5 a. Write a SQL query that would enable the user 'ww10_StaffMember' to view all of the data in the ww10_student table. 1b. (1 query) Assuming the SQL query from #5 has executed, write a SQL query that would remove the granted permission for 'ww10 StaffMember' to view all of the data in the ww10_student table. 1c. (1 trigger) Using the database tables provided on the next page, create a trigger that will fire when an update to the ww10_tutor table takes place and the status of a tutor is changed to 'Dropped' or 'Temp Stop'. The trigger will update the ww10_match_history table by setting the end date of all records for the associated tutor to be the current date. a. Hint: To set the end date in a query, use the GETDATE() function, such as: SET EndDate = GETDATE() ww10 tutor (tutor id, tutor_cert_date, tutor_status) Data Type Column Name Allow Nulls 8 tutor_id int tutor_cert_date date tutor_status varchar(50) tutor_id tutor_cert_date tutor_status 1 100 2020-01-05 Active 2 101 2020-01-05 Temp Stop 3 102 2020-01-05 Dropped 103 2020-05-22 Active 104 2020-05-22 Active 6 105 2020-05-22 Temp Stop 7 106 2020-05-22 Active ww8_student (student_id, student_group, student_read_score) Column Name Data Type Allow Nulls 8 student_id int student_group int student_read_score numeric(2, 1) student_id student_group student_read_score 1 3000 3 2.3 2 3001 2 5.6 3002 3 1.3 3003 1 3.3 3004 2.7 6 3005 4 4.8 7 3006 3 7.8 8 3007 4 1.5
Expert Answer:
Answer rating: 100% (QA)
1 You cant provide schema for WW10StaffMember table so you can ... View the full answer
Related Book For
Database Systems A Practical Approach to Design Implementation and Management
ISBN: 978-0132943260
6th Edition Global
Authors: Thomas Connolly, Carolyn Begg
Posted Date:
Students also viewed these finance questions
-
Complete the audit log provided on the next page for each of the seven remaining confirmations. Consider whether each confirmation provides sufficient, appropriate audit evidence, whether sufficient...
-
Create a trigger named trg_char_hours that will automatically update the AIRCRAFT table when a new CHARTER row is added. Use the CHARTER tables CHAR_HOURS_FLOWN to update the AIRCRAFT tables AC_TTAF,...
-
Create a trigger named trg_pic_hours that will automatically update the PILOT table when a new CREW row is added and the CREW table uses a pilot CREW_JOB entry. Use the CHARTER tables...
-
Two billiard balls of equal mass undergo a perfectly elastic head-on collision. If one balls initial speed was 2.00m/s, and the others was 3.00m/s in the opposite direction, what will be their speeds...
-
Can a system have a higher second-law efficiency than the first-law efficiency during a process? Give examples.
-
Briefly describe each of the following strategies that trade current income for capital gains income. a. Growth stocks b. Deep-discount bonds c. Income property depreciation
-
Refer to the Arctic Springs Filtration Department Data Set. At Arctic Springs, water is added at the beginning of the filtration process. Conversion costs are incurred evenly throughout the process,...
-
Last month when Harrison Creations, Inc., sold 40,000 units, total sales were $300,000, total variable expenses were $240,000, and total fixed expenses were $45,000. Required: 1. What is the companys...
-
33. The dimensions of Resistance is (1) LMT-A-] (2) [L-2M- T A] (3) [L M- T A] (4) [L MT A]
-
As the manager of Margarita Mexican Restaurant, you must deal with a variety of business transactions. Provide an explanation for the following transactions: a. Debit Equipment and credit Cash. b....
-
Mayday Corporation reported balances in the following accounts for the current year: Beginning Ending $1,200 $3,100 1,300 Inventories Accounts payable 2,900 Cost of goods sold was $8,000. In the...
-
Solve for w where u = (1, 0, -1, 1) and v = (2, 1, 3, 0). w + 4v = -2u W =
-
Suppose that Amy has the following value function: v(w) = w.3/4 when w > 0 = -2(-w) 3/4 when w < 0 where x is the realized outcome relative to the reference point. Assume that the my's reference...
-
Would you make any changes to the Federal tax policy related to this area of the IRC ? If so , what would you change and why? How would these changes help rectify the disparate outcomes by race?
-
What happened to the overhead allocation numbers? Why aren't they included?
-
Who is Tesla's auditor? Did Tesla's receive a "clean" (unmodified) audit opinion? How many critical audit matters were discussed in Tesla's audit report?
-
To assess the financial viability of property buyers, you have to obtain a testimony from the client and your principal stating that you have done the following:-. - Conducting an assessment of a...
-
Assume you are the accountant for Catalina Industries. John Catalina, the owner of the company, is in a hurry to receive the financial statements for the year ended December 31, 20X1, and asks you...
-
Analyze the RDBMSs that you are currently using. What types of relational languages does the system provide? For each of the languages provided, what are the equivalent operations for the eight...
-
Discuss the general characteristics of advanced database applications.
-
Using the Hotel schema given at the start of the Exercises at the end of Chapter 4, determine whether the following queries are semantically correct: (a) SELECT r.type, r.price FROM Room r, Hotel h...
-
The Boundary Waters Canoe Area Wilderness (BWCA) located in northeastern Minnesota has 1 million acres of wilderness, 1,000 waterways, and 1,500 miles of canoe routes. While some youth, for example...
-
A public recreation area is under planning. The initial cost of the area is \(\$ 1,800,000\), and it will have maintenance costs of \(\$ 200,000 /\) year. It is estimated that 90,000 persons will...
-
Suppose Lincoln Park Zoo decided to charge admission just for the newly renovated area described in Problem 11. Suppose the price is set at the average perceived benefit per visit, reasoning that the...
Study smarter with the SolutionInn App