Question: Question 2 Suppose we have a database for Grade 1 1 and 1 2 students of the Esplanade Secondary School. The layout of the records
Question
Suppose we have a database for Grade and students of the Esplanade Secondary
School. The layout of the records in this database is as follows:
studentSurname FirstName, Gender,Grade, Listofsubjects
The first entry in the list of subjects represents the subject the student takes as first language
and the second entry the subject the student takes as second language. The other entries
represent the other subjects the student takes.
a Write Prolog clauses for the following: Given a Surname and FirstName, return
the list of subjects this student takes, eg
studentsubs Surname FirstName, L should return the list of the subjects
student FirstName Surname takes. Do this for the gender and the grade of the
student as well.
b Build your own database using some entries reflecting the records of students. Use the
Prolog clauses you defined in a to run queries to ask the following questions:
Who takes Portuguese as second language?
Who takes more than subjects?
Is there a student with the surname Brown in Grade
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
