Page 1 of 1

Problem 3 (10 points) A database holds data about courses in an undergrad- uate CSE program, prerequisites, and records

Posted: Mon Jun 06, 2022 11:30 am
by answerhappygod
Problem 3 10 Points A Database Holds Data About Courses In An Undergrad Uate Cse Program Prerequisites And Records 1
Problem 3 10 Points A Database Holds Data About Courses In An Undergrad Uate Cse Program Prerequisites And Records 1 (43.19 KiB) Viewed 32 times
Problem 3 (10 points) A database holds data about courses in an undergrad- uate CSE program, prerequisites, and records for each student. The tables are the following: Course C-id Record S-id C-id Prereq C-id P-id In relation Prereq, P-id provides a prerequisite for C-id (assume this is acyclic). Relation Record provides, for each student S-id, the courses C-id he/she has already taken. Assume that Record [C-id] Course[C-id], Prereq[C- id] Course [C-id] and Prereq[P-id] Course [C-id]. Consider the following query: "For each student, find the set of courses whose prerequisites they have already taken" Express this query in the following languages: (i) CALC (ii) relational algebra (iii) nr-Datalog (iv) inflationary Datalog, and (v) semi-positive Datalog", assuming also given a successor relation succ on course ids, as well as constants min and max providing the minimum, resp. maximum course id.