Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Table 1 shows THREE (3) relational tables Exam, Student and Mark with sample data entered EXAM STUDENT examID module E010 Software Eng E030 Website Desi
Table 1 shows THREE (3) relational tables Exam, Student and Mark with sample data entered EXAM STUDENT examID module E010 Software Eng E030 Website Desi V115 Multimedia z111 Multimedia studID Name A1323 Kim A1345 John A1325 Terry A1322 Smith MARK examID V115 result 54 times Attempted 2 82 studiD A1323 A1323 A1325 A1322 A1322 occurred 10-JAN-2013 11-JAN-2013 20-JAN-2013 15-MAC-2013 20-MAC-2013 Z111 Z111 E010 V115 2 1 63 64 3 47 1 table 1: relational databases exam, student, mark The tables Exam and Student represent data about college exams and students sitting for the examination. The students' results and number of attempts (times Attempted) are recorded in table Mark by using the examID column from Exam table and the studID column from Student table. Both ID columns have unique values. A student has only the latest result recorded for each exam. a) Write an SQL command to create the Exam, Student and Mark tables. Include the primary keys and foreign keys apparent in the tables specified above. (20 marks) b) Write a SQL command to display the names of students who have a result less than 65. (8 marks) c) Write a SQL command to increase the results by 3 for exam with id 'V115'. (6 marks) d) Write a SQL command to display the student's name, the total number of attempts, and the results for all students obtained greater than 50. (16 marks)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started