Consider the following schema representing a list of students: (a) Briefly answer the following questions: • What is the type of the attribute “ names” ?  • What is the type of the attribute “ ids” ? ...

Consider the following schema representing a list of students:







(a) Briefly answer the following questions:


• What is the type of the attribute “names”?


• What is the type of the attribute “ids”?


• What is the type of the attribute “list”?



(b) Consider the following partially written schema that intends adding a new student to the list (the predicate part is not written yet). The schema should add a student to the student list and report success if the student is not in the list. If the student is already in the list then the list does not change and the result is set to already_exists.


REPORT: = success | already_exists






You are required to complete the following tasks:


• Explain the meaning of Δ at the beginning of ΔStudentList.


• Explain, why the attributes “id?”and “name?”have question marks at the end?


• Explain, why the attribute “result!” has the exclamation sign at the end?


• Write the predicate part of AddStudent schema.







[1 + 1 + 1 + 1 + 1 + 1 + 4 = 10 Marks]




[



Note: You can use the required notations from the following set of Notations:



Δ ,? , !,


,



,  ′ ,



,


,



,

",  $



]






May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here