Create table Student
(
ssn numeric primary key,
name char(50),
address varchar(100),
major char(10)
);
create view CS_Student as
select ssn, name, address from student where major = 'CS';
create a trigger on this view. If a tuple is inserted into the view, then insert it into the base table. If a tuple is deleted from the view, then delete it from the base table.
Create table Student( ssn number primary key, name char(50), address varchar(100), major char(10));
As the command to create view CS_student is given in question, i i creating trigger now
For insert command-
Create trigger tri_ins
Instead of insert on CS_student
Declare
Begin
Insert into Student values (:new.ssn, :new.name, :new.address, :new.major)
End;
For detele command-
Create trigger tri_del
Instead of delete on CS_student
Begin
Delete from student
End;
Get Answers For Free
Most questions answered within 1 hours.