《数据库课件教案.ppt》由会员分享,可在线阅读,更多相关《数据库课件教案.ppt(5页珍藏版)》请在得力文库 - 分享文档赚钱的网站上搜索。
1、Database Assignment,Write down your answers in word document with file namehighlighting 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
2、 a score higher than 85.name course score Mike DataBase 81Jane DataBase 86JaneMath 90TonnyDataBase 83Tonny Math 100,Number 2 (20%)Assume the student table has the following rows.Serial Number Sno Sname Cno Cname Score1 2005001Mike0001Math992 2005002John0001Math893 2005001Mike 0001Math99Use one SQL s
3、tatement 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 teachersStudent(Sno,Sname,Sage,Ssex) stores the information about studentsCourse(Cno,Cname,Tno) is
4、the course tableSC(Sno,Cno,score) has the scores1. 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.,