Database Assignment Write down your answers in word document with file name highlighting your name, student number, and class. E.g “95002”+”_”+ “03 class”+”_”+”name”, like, “95002_03_Mike.doc”
Number 1(20%) Use one SQL statement to get the list of all the student names, whose every registered course has a score higher than 85. name course score Mike DataBase 81 Jane DataBase 86 Jane Math 90 Tonny DataBase 83 Tonny Math 100
Number 2 (20%) Assume the student table has the following rows. Serial Number Sno Sname Cno Cname Score 1 2005001 Mike 0001 Math 99 2 2005002 John 0001 Math 89 3 2005001 Mike 0001 Math 99 Use one SQL statement to delete the records whose attributes are redundant except for Serial number.
Number 3(30%) Assume a database has the following tables. Teacher(Tno, Tname) describes the information concerning teachers Student(Sno,Sname,Sage,Ssex) stores the information about students Course(Cno,Cname,Tno) is the course table SC(Sno,Cno,score) has the scores 1. Use one SQL statement to get the list of student names, who at least registers one common course with student with Sno “95005” 2. Use one SQL statement to get the complete list of students, who registers only one course. Print their student numbers and names and order the list by student number.
3. Use one SQL statement to get the list of courses, each of which is registered by every student.