Computer Science Homework Help
AU WK 5 Online Food Ordering Database Discussion
Part 1
View Limitations |
Prior to beginning this discussion, read Chapter 8: Advanced SQL from the course text and review the MySQL Views presentation. For this discussion, you will list some of the view limitations and discuss how you can pass parameters to a view. Please make sure to provide practical examples to support your answer.
Part 2
Online Food Ordering Database – Task 5 |
Prior to beginning work on this assignment, review Chapter 8: Advanced SQL from the course text and the Using Triggers presentation. This week you will develop the fourth task for the Online Food Ordering Database Project due this week.
For this assignment, you will continue to use PHPMyAdmin to
- Add a new table to your database. The table should be called tbl_employee_audit and should contain two fields (id, audit_data).
- Add “for insert”and “delete triggers” to the “tbl_employee” table.
The insert trigger is triggered when a new employee is added to the “tbl_employee” table. The trigger then takes the employee_id as a parameter and adds the following data as a new record to the tbl_employee_audit.
id |
audit_data |
1 |
New employee with ID = 1221 was added on Sep 21, 2016 |
The delete trigger is triggered when a row in the “tbl_employee” table is deleted. The trigger then takes employee_id as a parameter and adds the following data as a new record to the tbl_employee_audit.
id |
audit_data |
6 |
Employee with ID = 1221 was deleted on Sep 25, 2016 |
In your initial post,
- Attach a screen shot of the SQL query used to create the tbl_employee_audit, updated ER diagram, and SQL queries you used to generate the “for insert” and “for delete” triggers.
- Attach all the SQL queries you created for this assignment.
- Provide a short description of the use and different type of triggers in MySQL.