Question 1
Consider the tables Students, Departments and Courses_Taken as shown below:
| SID | name | dept_ID |
|---|---|---|
| 001 | Harry | C001 |
| 002 | Louis | C002 |
| 003 | Liam | C003 |
| 004 | Niall | C001 |
| 005 | Zayn | C003 |
| 006 | Luke | C004 |
| 007 | Ashton | C002 |
| 008 | Bradley | C005 |
| 009 | Connor | C006 |
| 010 | Alex | C005 |
Table 1: Students
| dept_ID | dept_name |
|---|---|
| C001 | Comp. Sci. |
| C002 | Maths |
| C003 | History |
| C004 | Geography |
| C005 | Music |
| C006 | Biology |
Table 2: Departments
| SID | course_name |
|---|---|
| 001 | DBMS |
| 002 | Calculus |
| 003 | Modern History |
| 001 | Operating Systems |
| 002 | Algebra |
| 004 | DBMS |
| 005 | Modern History |
| 006 | Oceanography |
| 007 | Algebra |
| 006 | Climatology |
| 008 | Classical |
| 009 | Zoology |
| 010 | Post Rock |
Table 3: Courses_Taken
Consider to be the foreign key in table Students that references in table Departments with on-delete cascade and be the foreign key in table Courses_Taken that references in table Students with on-delete cascade. If tuples (C001, Comp. Sci.) and (C002, Maths) are deleted from table Departments then how many tuples will be deleted from table Courses_Taken?