Consider the following relational model: COURSE(coursenr, coursename, profnr) profnr is a foreign key referring to profnr
Question:
Consider the following relational model:
COURSE(coursenr, coursename, profnr) – profnr is a foreign key referring to profnr in PROFESSOR
PROFESSOR(profnr, profname)
PRE-REQUISITE(coursenr, pre-req-coursenr) – coursenr is a foreign key referring to coursenr in COURSE; pre-req-coursenr is a foreign key referring to coursenr in COURSE
The PRE-REQUISITE relation essentially models a recursive N:M relationship type for COURSE, since a course can have multiple prerequisite courses and a course can be a prerequisite for multiple other courses.
Write a recursive SQL query to list all prerequisite courses for the course “Principles of Database Management”.
Step by Step Answer:
Principles Of Database Management The Practical Guide To Storing Managing And Analyzing Big And Small Data
ISBN: 9781107186125
1st Edition
Authors: Wilfried Lemahieu, Seppe Vanden Broucke, Bart Baesens