Download presentation
Presentation is loading. Please wait.
Published byAusten Williamson Modified over 5 years ago
1
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”
2
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
3
Number 2 (20%) Assume the student table has the following rows. Serial Number Sno Sname Cno Cname Score 1 Mike 0001 Math 99 2 John 0001 Math 89 3 Mike Math 99 Use one SQL statement to delete the records whose attributes are redundant except for Serial number.
4
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.
5
3. Use one SQL statement to get the list of courses, each of which is registered by every student.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.