Relational Model- Practice Problem3
Relational Model- Practice Problem3
Consider the following relational database state. Primary keys (PKs) are underlined and foreign keys (FKs) are in italic font.
Assume referential integrity constraint(RIC) on FKs (Sites.ownerID and Entries.siteID) are ON DELETE CASCADE and ON UPDATE
SET NULL.
Users Sites Entries
userID popularity name siteID siteName ownerID viewCount entryID siteID rating createdDate tag
23 4 Isbah 3 FAN 22 200 1 3 5 2018-05-11 BP
31 1 Izaan 5 W3Schools 13 400 2 3 10 2018-08-11 Views
13 4 Tahreem 6 Online DB 22 300 3 5 15 2018-05-11
22 5 Khadija 8 SQL Guru 23 250 4 8 10 2018-07-11
5 6 19 2018-05-11 FR
6 8 4 2018-05-17 Views
Q. Apply following operations on the above database. State if the operation would be carried out successfully or not. Explain
your answer briefly. In case of successful operation indicate the changes that will be made to the above database and in case of
Reject state the error that occurred. Please note that all operations are independent.