Details of courses taken by students in a particular college are maintained in two related database tables
Question:
Details of courses taken by students in a particular college are maintained in two related database tables called ‘STUDENT’ and ‘COURSE’. The fields in the two tables are as shown below:
COURSE: CourseCode, CourseName (for the Course Code and Course Name
respectively)
STUDENT: RegNo, IdNo, Name, Address, CourseCode (for the student’s registration number, ID number, name, address and the code of the course being taken by the student respectively).
Tables Relationships
CourseCode |
|
|
COURSE |
|
|
STUDENT |
|
Required: Write appropriate Oracle statements/SQL statements to do the following:
Create the ‘STUDENT’ table (assuming that the ‘COURSE’ table exists).
Marks)
Add a constraint that makes the ‘IdNo’ to be a unique field in the ‘STUDENT’ table. (2 Marks)
To produce a listing of the names and registration numbers of the students who take ‘BSc IT’ as their course name. (2 Marks)
To delete a record in the ‘STUDENT’ table for a student by the name ‘Liz
Mwangi’. (2 Marks)
What is the difference between the ‘char’ and ‘varchar’ data types.
Marks)
Using a well labeled diagram, illustrate the communication between a client and server from the time a socket is created to when the connection is terminated.
| (7 Marks) |
With an aid of a simple program, explain the fork() system call. (3 Marks)
Briefly discuss any two (2) reasons that have led to the popularity of RPCs. (5 Marks)