QUESTION SOALAN
MARKS/MARKAH
1. Consider the following schema in a university database:
student (matricNo, studentName, address, major)
course (courseNo, courseName, credit)
i) Create a new table called "Result" with the following structure:
resultID (Auto-increment, Primary Key)
matricNo (Foreign Key referencing student.matricNo)
courseNo (Foreign Key referencing course.courseNo)
Grade (VARCHAR(2))
ii) Insert a new result record for a student named "Harith" in the "Database" course with a grade of "A".
iii) Retrieve the names of students along with their enrolled courses and grades. Sort the result in alphabetical order based on the student names.
iv) Retrieve the names of students who are not enrolled in any course.
v) Update the grade of the student named "Fathin" in the "Networking" course to "B+" (assume this record exists in the related table).
(Total Marks: 20)