(MYSQL)CREATING VIEWS WITH CHECK OPTION
It is possible to perform referential integrity constraintsthrough the use of a view so that database constraints can beenforced. The following view DISPLAYS employees who work in ThemePark FR1001 using the WITH CHECK OPTION clause. This clause ensuresthat INSERTs and UPDATEs cannot be performed on any rows that theview has not selected.
CREATE VIEW EMPFR AS
SELECT *
FROM EMPLOYEE
WHERE PARK_CODE = ‘FR1001’
WITH CHECK OPTION;
So for example if employee ‘Emma Caulderdale’ was to leave thepark and move to park ‘UK3452’, we would want to update herinformation with the following query:
UPDATE EMPFR
SET PARK_CODE = ‘UK3452’
PayPal Gateway not configured
PayPal Gateway not configured