Cname jyear mname create view goodstudents sid gpa

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: be insertable, but deletions not supported. 67 67 Example of View 68 Another Example of View From page 88 of textbook: From page 89: Suppose we have a table called Clubs (cname, jyear, mname). (cname, jyear, mname). CREATE VIEW GoodStudents (sid, gpa) AS sid, gpa) SELECT S.sid, S.gpa S.sid, FROM Students S WHERE S.gpa > 3.0; CREATE VIEW ActiveStudents (name, login, club, since) AS SELECT S.sname, S.login, C.cname, C.jyear S.sname, S.login, C.cname, FROM Students S, Clubs C WHERE S.sname = C.mname AND S.gpa > 3; Is this view updatable? Is this view updatable? 69 Deferring Constraint Checking Another Example (continued) CREATE TABLE Chicken (cID INTEGER PRIMARY KEY, eID INTEGER, FOREIGN KEY (eID) REFERENCES Egg (eID)); (eID) (eID)); Instance of ActiveStudents: ActiveStudents: name login 70 club since Dave [email protected] Sailing Smith [email protected] Hiking (eID INTEGER PRIMARY KEY, cID INTEGER, FOREIGN KEY (cID) REFERENCES Chicken (cID)); (cID) (cID)); 1997 Rowing CREATE TABLE Egg 1996 Smith [email protected] Smith [email protected] H...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online