Q1. For the given relations:
Student(Name,student_number,class,major)
Course(course_name, course_number, credit_hour, department)
Section(section_identifier,course_number,semester,year,instructer)
Grade report(student_number, section_identifier, grade)
Prerequisite(course_number, Prerequisite_number)
Specify the given queries in SQL:
a) Retrieve the names of all the senior students majoring in 'COSC' (that is, computer science).
b) Retrieve the names of all the courses taught through professor King in 85 and 86.
c) For each part taught through professor King, retrieve the course number, semester, year and number of students who took the part.
d) Retrieve the name and transcript of each senior student (Class = 5) majoring in COSC. Transcript comprises course name, course number, credit hours, semester, year and grade for each and every course completed by student.
e) Retrieve the names and main departments of all straight A students (students who have a grade of A in all their courses).
f) Retrieve the names and main departments of all students who don’t have any grade of A in any of their courses.
Q2. State whether the given conclusions are true or false:
a) NOT (P(x) OR Q(x)) ⇒ (NOT (P(x)) AND (NOT (Q(x))))
b) NOT (∃ x) (P(x)) ⇒ ∀ x (NOT (P(x)))
c) (∃ x) (P(x)) ⇒ ∀ x (P(x))