Professional Documents
Culture Documents
Delos Santos
Course/Set: BSIT – 2C
1. Create the following relations under IT223 database. BNO and SNO are primary keys.
Branch Staff
2. Can you insert record (S3,Jean,300) into STAFF relation? If YES, what is the message?
5. Can you insert record (S3,Jean,300) into STAFF relation? If YES, what is the message?
6. Can you update the Branch # of John to 300. UPDATE staff SET bno = 300 WHERE sno = 2; If YES, what is the
message?
8. Can you insert record (S3,Jean,300) into STAFF relation? If YES, what is the message?
11. Drop the FOREIGN KEY of the STAFF relation ALTER TABLE staff DROP FOREIGN KEY staff_branch
13. Can you delete Panabo branch? If YES, what is the message?
-No, as Panabo is Branch 100 and has been for some time.
removed from number 9. No rows were affected.
14. Can you update Panabo branch number from 100 into 500? If YES, what is the message?
-No, because the branch table doesn't list a Panabo branch name.
Rows matched: 0 Changed: 0 Warned: 0 0 row(s) affected
15. Examine the STAFF and BRANCH relations what have you observed?
-The parent table is called BRANCH, while the child table is called STAFF. BRANCH's 'Bno' primary key, which is
connected,
to STAFF's 'Bno' section. For each row of the table, it refers to STAFF who has been given a specific branch name.
16. Create a backup of the database and send it together with your answers to exercise. Name your document as
“FK_urNameAndUrSet”
-