Database Construction and Maintenance
Two databases need to be maintained; a student database and a staff database. Since login names are to be permanently allocated to both staff and students, it makes sense to establish the login name as part of the central university databases. However, within the time frame allocated to this project (two months over the
Christmas period) this was not possible. Therefore, I have had to maintain separate databases using data
down-loaded from the central databases. The databases are stored on the HTTP server.
Student Database
The data down-loaded from the student records system consists of fixed-length records, one for each unit
that a student was enrolled in. I have written a TCL script to transform this data into a new data file,
consisting on one variable-length record for each student, with login name and initial password allocated. Each record consists of the following fields:
- Student ID number.
- Family name.
- Preferred name.
- Other name.
- Login name.
- Initial password.
- Enrolment Type
- Unit code 1, Unit code 2, ...., Unit code N
Login names are built using a combination of:
- A prefix "st".
- The year the login name was created, in this case "95".
- A hexadecimal number, starting at "1111" and incrementing.
Hence, the first allocated login name was "st951111".
Initial passwords are allocated using a combination of student name and a seed derived from the current
time.
Since the database contains over 20,000 records, to perform searches using linear methods would have made
the query process too slow. Therefore, indexes with fixed length records have been built; one for student ID
number and the other for login name. These indexes are sorted so they can be accessed using a binary
search algorithm. This approach reduces the maximum number of disk reads per query to 16.
Since enrolments vary over time, especially at the beginning of the year when students are changing units
often, there is a need to perform frequent downloads from the student records database. The new data
needs to be matched against the existing data and any changes accommodated. Possible changes are:
- A student has withdrawn from a course. The entry is retained in the database since the login name is
meant to be a permanent allocation. However, a Remove User message is appended to a file called
studchg.data which is emailed to all systems on a regular basis.
- A student has changed the units they are enrolled in. The entry is updated with the new unit codes. In
addition Remove Group and Add Group messages are appended to the studchg.data file.
- New students have been enrolled.
A TCL script has been written to perform this operation.
Staff Database
The staff data file has the following structure:
- Staff ID.
- First name.
- Middle name.
- Family name.
- Login name.
- Initial password.
- Current status (whether the staff member is currently employed or not).
TCL scipts to handle updates of this data file have are currently being developed.
Return to Implementation page...