Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribedimage text in transcribed

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. college D departID stuNo ENG CSE 14234 SCI MATH 15234 SCI PHY 13234 MED NEUR 14234 ENG MECH 15234 BUS FIN 24657 firstName Jean Mandi John Lei Ming Jean lastName country age passportNo Kim KOR 26 CDE4561 Smith UK 22 ABC3542 Smith CAN 24 EFG7869 Li CHN 23 PE56790 Li CHN 23 ASE1567 Cham FRE 23 RWA 1564 1. [5 pts] What is the schema for this relation? Please include value domain for each attribute as well. You may choose your own relation name, and the value domain in your answer must be compatible with the instance given above. 2. [5 pts] Name five different super keys for the given relation. 3. [6 pts) Name three candidate keys with two attributes in the given relation. 4. [4 pts] Consider a general dataset with the same schema as you answered in the first question (NOT the instance provided above). Choose a reasonable three-attribute primary key and briefly explain why it makes sense. 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Systems Analysis And Synthesis Bridging Computer Science And Information Technology

Authors: Barry Dwyer

1st Edition

0128054492, 9780128054499

More Books

Students also viewed these Databases questions

Question

What incentives and resources encourage diversification?

Answered: 1 week ago