Question: 2. SQL (Data Definition Language (DDL) Part). The follow schema and an instance for the Students relation are given. The primary keys are underlined. Students

 2. SQL (Data Definition Language (DDL) Part). The follow schema and

2. SQL (Data Definition Language (DDL) Part). The follow schema and an instance for the Students relation are given. The primary keys are underlined. Students (sid: integer, sname: string, major: string) Takes (sid: integer, cid: string, grade: string) Courses (cid: string, title: string) 50000 David CS 50001 Jones CS 50002 Smith Math 50003 Smith CS 50004 Madayan CS (a) Write a SQL query to find the student IDs for all students in CS program. (b) Write a SQL statement to insert a new record with values (50005, 'Mike', 'CS') to the Students table. (c) Write a SQL statement to delete the records of those students who major in Math. (d) [5 points] If the student whose sid is 50000 and name is David has double majors in both CS and Math. Can we insert a new record with values (50000, David, 'Math) to the original Students table? Explain why

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!