Instructors |
We need to
know about instructors for authentication purposes. Each
instructor will have a username and password, other objects created in
the database by an instructor will be marked as "owned" by that
individual. Instructors will be able to edit objects they own.
|
Pilots |
These objects have no explicit
owner, and can be modified by anyone in the database. They
contain the particulars of an individual trainee, including their name,
an indication of their currency (perhaps... Instructors might not
necessarily update that attribute, so we might choose to avoid storing
incorrect values by not keeping it), status attributes to indicate
whether the trainee has received an intro, a theory lecture, some
practice, or a sign-off on various stages of training.
|
Comments
|
Comments can
be attached to any object. Each comment has a name and date, an
owner, and whatever text the creator has provided.
|
Ratings
|
Ratings can be attached to
pilots. Each rating has a name, a date, and an owner (presumably
the instructor who has granted the rating). Ratings will include
such items as GFA and FAI badges and certificates, passenger
authorizations, winch driver authorizations, cross-country ratings, AEI
and instructor ratings. The database ensures that a pilot can only have
one instance of each rating.
|
Conversions
|
Conversions can also be attached to
pilots. Each conversion has a name, a date, and a
type (glider). Conversions can be revoked and reinstated by instructors. The database ensures that a pilot can have only one instance of any given type conversion.
|
Types
|
Types are the things which define which conversions are allowed. The menu of types available for type conversions is populated by searching the DB for Type objects.
|
Templates
|
Templates record metadata about the other object types. The code which implements the API for the database doesn't have any built-in knowledge about the structure of any of the other object types, it instead queries the Template object applicable to whatever data it happens to be dealing with. Consequently, new object types can be added by creating new template objects, and many of the semantics of existing object types can be changed by editing the appropriate template. Template objects contain a list of attributes owned by the object class they're describing, some rudimentary type information for each attribute, an indication to distinguish mandatory attributes from optional ones, and an optional reference to a software module which should be executed whenever an object belonging to the described class is updated. Almost all of the software which manipulates objects is consequently able to be made generic, and the database is effectively self-describing.
|