联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> Database作业Database作业

日期:2019-11-24 07:45

BSIM3017 - Database Systems

Individual Assignment – Part 2


Data Schema and SQL Queries for an Online Course Management System


Assignment weight:30 out of a total of 100 marks for the whole course

Submission Deadlines: Part 1: 15 marksDeadline: 8th November, 2019 (Database Design)

Part 2: 15 marksDeadline: 22nd November, 2019 (SQL)



The following data schema is given for students to develop their database queries in SQL to meet the specified information needs.  All the ID fields are assumed to be unique in the entire course management system.


Data Schema (with primary key attributes being underlined and boldfaced)


// userType to indicate whether the user is an administrator, a student, or a teacher

User(userID, username password, email, , userType)

Course(courseID, courseTitle)


// course rooms that users can access; note that users include all sorts of users such as teachers

// and administrators

Enroll(userID, courseID)

// Teacher’s userID is recorded when a piece of learning material is uploaded to a particular course room

// so that update right to the material can be confined to the concerned teacher.  The materialID is

// assumed to be unique in the whole course management system. For simplicity, materials are assumed

// to be presented in text no larger than 64KB.

Material(materialID, materialText, teacherUserID, courseID)


// Teacher’s userID is recorded when an assignment is uploaded to a particular course room so that

// update right to the assignment can be confined to the concerned teacher.  For simplicity, assignments

// are assumed to be presented in text no larger than 64KB.

Assignment(assignmentID, assignmentType, assignmentText, submissionDeadline, teacherUserID, courseID)


// For ease of processing, groups are still created for individual assignments.  In such cases, each group is

// composed of one member only.

GroupMember(groupID, userID)


// For each assignment, one or more groups are created.  

Group(groupID, assignmentID)


// Each submission is associated with an assignment and submitted by a student group member.  Once a

// submission is made, any change to the submission is restricted to that group member.  If a submission

// is removed, any group member can upload a new submission.

Submission(submissionID, assignmentID, groupID, submissionDate, userID)


// Each submission is composed of one or more files.  Note that there is no need to bother about the

// files.

SubmittedFile(fileID, filePath, filename, submissionID)


SQL Queries


Students are required to implement SQL queries to address four given information needs below.  Besides students also need to develop two other database queries based on the given data schema.  Each of those queries is required to use no less than THREE database tables. Before listing any proposed SQL query for addressing each information need, students need to display the sample data used to test those queries.  In each query, the test results are to be included in the report.


1.Find the two teachers who have access to most number of course rooms.  Should there be a tie break, choose the ones with smaller user IDs.  List the user ID, email, and the number of course rooms that s/he can access for the two teachers.


2.Find the courses that assess student performance purely by examination, i.e. students are not given any assignment to work on.  List the course title in the output.


3.Find the students who should have submitted their work for the assignment with assignmentID equal to “3024” but they actually had not.  In other words, those students did not hand in their assignments.  List those students’ user ID and email in the output.


4.For each course, list the assignment ID, and number of students failed to submit that assignment.  The output should include course title, assignment ID, and number of non-submission(s).


Submission Requirement:

Each student must submit his/her SQL queries in a report (in MS Word or PDF format) AND the testing database in MYSQL (i.e., the database exported from MySQL in SQL format) for the above mentioned tasks to the corresponding assignment area on Moodle on or before 22 November, 2019 (Friday).   Submission of physical copy of the report is NOT required. Late submission will be penalized according to the Faculty guidelines.


Assessment Criteria:

?Correctness of query (12 marks)

?Ease of understanding (3 marks)

?conciseness of query

?clarity of query and report



** End **


版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp