

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Exam; Class: DATABASE SYSTEMS; Subject: Computer Science; University: University of Alabama - Huntsville; Term: Fall 2004;
Typology: Exams
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Name:
CS 487 Test 2 October 21, 2004
Student SID: int major: int email : text name : text
Exam EID: int QID : int Question SID: int QID : int Answer : text Grade : int
Grade SID: int Eid : int Grade : int
{ s.name q.grade |Student(s) ∧ Question(q) ∧ Exam(e) ∧ e.id = 2 ∧ e.qid = q.qid ∧ q.sid = s.sid ∧ ((∀r)(not(Question(r)) ∨ q.qid 6 = r.qid ∨ q.grade ≥ r.grade ∨ ((∀t)not(Student(t)) ∨ t.major 6 = s.major))) }
What does the above query do?
Write the same query in SQL.
Assume that there are four questions on test 2. Could the division operator be used to identify students who correctly answered questions 1, 2, and 4 on test 2? If so, demonstrate, else describe why not?
Name:
CS 487 Test 2 October 21, 2004
What can you infer about the structure of the ER model based upon the tables? Describe the rules that are applicable. Sketch the ER diagram.
From your derived ER model add a superclass to student, voter, and another entity worker that is a subclass of voter. Describe what changes would need to be made to the tables.
Explain which is more important referential integrity constraints or entity integrity constraints.