Click to follow our Afritutor YouTube Channel, subscribe and click notifications and get updates on new learning videos
<=Back
The following relational schema is obtained from a database used by a lecturer to manage scores in tests for different units.
Student(sid: integer, sname: string)
Unit(uid: integer, uname: string)
Test(sid: integer, uid: integer, cat: integer, endterm: integer)
Write the SQL code that would:
(i) Create the Test table having relevant fields: (2 marks)
(ii) Modify the Test table by adding the foreign key constraints and another constraint that would limit the scores entered in cat and endterm columns to be less than or equal to 100. (3 marks)
(iii) Display the column named sname as 'STUDENT NAME' and column uname as 'UNIT NAME' for each student whose uid equals 100. (3 marks)
 Viewed: 102 times For Better experience and learning,for video answers, after video ends playing, click next question in the questions list!!!
Share in: