Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Throughout this part, all the questions are by default based on the relation instance provided below, which stores information of international students in a university.
Throughout this part, all the questions are by default based on the relation instance provided below, which stores information of international students in a university. collegeID departID stuNo firstName lastName country age passportNo ENG CSE 14234 Jean Kim KOR 26 CDE4561 SCI MATH 15234 Mandi Smith UK 22 ABC3542 SCI PHY 13234 John Smith CAN 24 EFG7869 MED NEUR 14234 Lei Li CHN 23 PE56790 ENG MECH 15234 Ming Li CHN 23 ASE1567 BUS FIN 24657 Jean Cham FRE 23 RWA1564 5. [2 pts] Provide a SQL statement for inserting a new record to the relation for a student named John Doe from UK who is enrolled in ENG college CSE department with student number 24597 and passport number SER5162. 6. [2 pts] Provide a SQL statement that remove all records for international student from SCI' college. 7. [2 pts] Provide a SQL statement that updates the age of John Smith to 25. 8. [2 pts] Provide a SQL statement that drop attribute country of the relation. 9. [2 pts] Suppose we specify (collegeID, departID) is a foreign key referring to another relation called Departments and set its referential action as ON DELETE CASCADE. What will happen when we try to remove the record with primary key (ENG, CSE) in the Departments relation
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