The diagram illustrates the relationship between two tables in a database. The student ID in…