Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

2. Competence management.

Answered: 1 week ago

Question

What were your most important educational experiences?

Answered: 1 week ago

Question

How was your life influenced by those events?

Answered: 1 week ago

Question

Which of these influenced your life most dramatically?

Answered: 1 week ago