Question
If some tuples are deleted from STUDENT relation, the tuples in ENROLLMENT, that contain the deleted StdID number will be deleted. Also the system will
- If some tuples are deleted from STUDENT relation, the tuples in ENROLLMENT, that contain the deleted StdID number will be deleted. Also the system will update the StdID number in ENROLLMENT when an update is done in StdID in the Student relation.
Hint: this constraint should be defined by modifying the constraint using ALTER TABLE statement.
b) If the student's proficiency is less than 90 then the student should pay (i.e., payment value is: yes) otherwise the student will not pay (i.e., payment value is: no).
Hint: this constraint should be defined by modifying the constraint using ALTER TABLE statement.
DB:
create table Student( StdID int primary key, Name varchar(20), Proficiency int, Payment varchar(3), DeptID varchar(10) );
create table Department( DeptID varchar(10) primary key, DeptName varchar(50), );
create table Enrollment( StdID int, CrsID varchar(20), Grade int, primary key(StdID,CrsID) );
create table Course( CrsID varchar(20) primary key, CrsName varchar(50), ); ------------------------------------- insert into Student values (1,'John',75,'yes','EE'), (2,'Kathy',92,'no','HIST'), (3,'Chris',72,'yes','HIST'), (4,'John',98,'no','EE') ------------------------------------ insert into Department values ('EE','Electrical Engineering'), ('HIST','History'), ('CLIS','Information Studies') ------------------------------------ insert into Enrollment values (1,'lbsc690',90), (1,'ee750',95), (2,'lbsc690',80), (2,'hist405',60), (3,'hist405',75), (4,'ee600',70) ----------------------------------- insert into Course values ('lbsc690','Information Technology'), ('ee750','Communication'), ('hist405','American History')
Step 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