reset password
Author Message
xytian
Posts: 70
Posted 12:24 Oct 29, 2013 |

I don't have a textbook and found the problems on internet. Please correct me if they are not the right ones. Thank you.

--------------------------------------------------------------------------------------------

2. (60pt) Write triggers to enforce the following data constraints in the University database (university-create.sql, university-drop.sql).
•Exercise 5.6 (b), (c), (d), (e) in the textbook.

b) Only math majors can take the course titled  'Topology'.
c) Students cannot take the course 'Calculus 2' without having received a passing grade in 'Calculus 1'.
d) A student can take no more than 10 courses in any year, and no more than 5 courses in any one department per year.
e) All of the courses taught by a professor are offered by the same department.

cydneyauman
Posts: 12
Posted 16:28 Oct 29, 2013 |

I have a PDF version of the TextBook and here is Question 5.6 from that version.

5.6 Write assertions for the following integrity constraints, using the tables of Figure 1-1.

a) A professor always teaches the same one course. (That is, the FD Prof ---> CourseId holds.)
b) Only math majors can take the course titled „Topology‟.
c) Students cannot take the course „Calculus 2‟ without having received a passing grade in „Calculus 1‟.
d) A student can take no more than 10 courses in any year, and no more than 5 courses in any one department per year.
e) All of the courses taught by a professor are offered by the same department.

 

Last edited by cydneyauman at 16:29 Oct 29, 2013.
xytian
Posts: 70
Posted 18:25 Oct 29, 2013 |

Thanks. 

Last edited by xytian at 03:15 Nov 01, 2013.