Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Relational Schema Client(clientNo, forename, surname, gender, address, telNo, pr

ID: 3686845 • Letter: R

Question

Relational Schema

Client(clientNo, forename, surname, gender, address, telNo, proLicenceNo)

Instructor(instructorID, forename, surname, gender, address, telNo, licenceNo,carNo)

Car(carNo, regNo, model)

Lesson(clientNo,onDate,atTime,instructorID)

Test(clientNo,onDate,atTime,instructorID,centreID, status, reason)

Centre(centreID, name, address, telNo)

a )Instructor Jim Adderson switches to the car with registration RF10 AAF. Give the SQL command to make the change.

b) The instructor for the test at 29/04/2016 10:00 has changed to be the instructor with a Mini One. Give the SQL command to make this change.

Explanation / Answer

a)UPDATE Instructor, Car
SET instructor.carNo = car.carNo
WHERE car.regNo= RF10 AAF

b)UPDATE Instructor,Test

SET Instructor.instructorID=Test.instructorID

SET Test.status="MINI ONE"

WHERE TEST.onDATE=29/04/2016 AND Test.atTIME=10:00

b)