The Grades Database is basically a client server model composed of one client and two servers. There are two shells to implement, the GRADESHELL and the CLASSSHELL. Their specifications are as follows:
The GRADESHELL is the initial interface from where a user chooses which database to query from. In this case each class# is associated with a specified server. For example, choosing cs3590 should effectively direct user queries remotely to an associated server running at a particular internet address. Because server locations may be unstable, servers should be kept in a serverfile from which modifications (to the servers internet address) can be made easily. The format of the serverfile may be:
class# course# course.description professor server.inet.idYou will need the internet address when using RPC. It can be obtained from the command line by typing. >grep machine.name /etc/hosts
________________ - TO OBTAIN GRADES INFORMATION - ENTER ONE OF THE FOLLOWING CLASS#'s CLASS# CLASSNAME ------ --------- cs3590 DATABASE THEORY cs3514 ARTIFICIAL INTELLIGENCE - TO GET HELP : USAGE : help - TO LEAVE GRADESHELL : USAGE : quit GRADESHELL> ________________
After a particular connection is established a user should enter the appropriate CLASSSHELL for the server chosen.
GRADESHELL> cs3590 129.108.42.32 SERVER CONNECTION ESTABLISHED 1-TO OBTAIN GRADE : USAGE : grade [ss#](without dashes) 2-TO SEND FILE TO PROFESSOR : USAGE : grade -f [filename] 3-TO SEND ONE LINE MESSAGE TO PROFESSOR : USAGE : grade -m [message] 4-TO OBTAIN CLASS INFORMATION : USAGE : grade -c PROFESSOR FUNCTIONS: 5-TO GET STUDENT GRADES INFORMATION : USAGE : grade -p [lastname] 6-TO ADD A HOMEWORK GRADE FOR ALL STUDENTS: USAGE : grade -w 7-TO ADD A PROJECT GRADE FOR ALL STUDENTS: USAGE : grade -j 8-TO ADD AN EXAM GRADE FOR ALL STUDENTS: USAGE : grade -t 9-TO ADD A STUDENT TO THE DATABASE: USAGE : grade -a [ss#] 10-TO DELETE A STUDENT FROM THE DATABASE: USAGE : grade -d [ss#] 11-TO UPDATE A STUDENT RECORD IN THE DATABASE: USAGE : grade -u [ss#] 12-TO GET HELP : USAGE : grade -? 13-TO QUIT CLASSSHELL : USAGE : quit 14-TO QUIT CLASSSHELL AND GRADESHELL : USAGE : exit ________________
CLASSSHELL allows students to get information about their grades in a particular course through a particular server. Students may also send files and messages to a professor at the server end. Professors use CLASSSHELL to view any students grades, modify, and update a particular gradesfile. Gradesfile consists of a makeshift database which should be provided by all professors at the server end. The student and professor operations (in Example 2) should be supported. They are explained below:
1: basically get your final grade 2: send a file to a professor (assignment file or statement file or whatever text file). 3: sends a short (one line) message to a professor.
NOTE: MESSAGES AND FILES SHOULD HAVE INFORMATION PERTAINING TO SENDER, TIME AND DATE THE FILE WAS SENT.
********* MESSAGE BEGIN ********* SENDER: dmorales Wed Sep 21 19:59:39 1994 This is a test file. May be a homework file. or whatever. ********* MESSAGE END ********* ********* MESSAGE BEGIN ********* SENDER: dmorales Wed Sep 21 20:00:13 1994 hello this is a one line message. ********* MESSAGE END *********
All messages and files should be appended to the end of a messagesfile provided for each professor at the server end.
4: obtains info about the class you are preforming queries on. (sample input) CLASSSHELL> grade -c (sample output) YOU ARE IN CLASS CLASS # : cs3590 COURSE#: 64620 COURSE NAME : DISTRIBUTED DATABASE THEORY PROFESSOR : Dr.Baral
Professor functions should be monitored. Only professors should be able to access professor functions. A list of professors which may access professor functions should be kept in a passwrdfile.
5: Basically outputs students record.
(sample input)
CLASSSHELL> grade -p duck
(sample output)
# of matches = 1
daffy, duck
SS# 777777777
HOMEWORK GRADES
1) .. 2) .. 3) .. 4) ..
homework total = ... homework score = ...
EXAM GRADES
1) .. 2) .. 3) .. 4) .. 5) .. 6) ..
exam total = ... exam score = ...
PROJECT GRADES
1) .. 2) .. 3) ..
project total = ... project score = ...
FINAL EXAM = ...
TOTAL SCORE = ... GRADE = ...
6-14 Self explanatory.
NOTE: DON'T FORGET TO UPDATE COUNTING FIELDS (elements a-d in Figure 1
below) in the gradesfile WHEN UPDATING APPROPRIATE RECORDS.
The professors gradesfile may consist of a makeshift text file but it should have the following fields represented:
Figure 1 a) The number of students taking the course. b) The number of homework grades. c) The number of exam grades. d) The number of project grades. e) An array of exam grades for each student. f) An array of homework grades for each student. g) An array of project grades for each student. h) The number of points scored on the final exam. i) The final grade. j) Weight of homework grade. k) Weight of exam grade. l) Weight of project grade. m) Weight of final grade. n) Student last name and first name. o) Student social security number or ID. ___________________________________________________________________________Although students are always at the client side of the network communication, professors may be servers and/or clients. That is professors may be clients to some other professors or their own server and database. The only reason professors are associated with servers in the specification is because every professor (and only professors) are expected to have a server application running on their own computer at a particular address. A professor could have both a server and a classshell running on his computer (thus accessing and servicing information).
Any questions or comments may be addressed personally, mailed or posted on the cs.database news group.
David Morales dmorales@cs.utep.edu