Design


The design documents for MOPS are included below.  The design documents consist of three main documents: the Data Diagram, which is a pictorial representation of the database; the Database Schema, which contains a description of all the database files, and items withing the files; and the Data Functions, which describes the processing for each function.  The Functions also contain a cross-reference of how each function accesses the database.

Please note that the documentation below is NOT maintained.  These documents were used to provide the analysis for MOPS>  For current processing, see the User Guide.

The MOPS Data Diagram: each box represents a ‘thing’ in the real world. For example, Areas, Stations and Locomotives. They are shown linked together – each Area can have lots of Stations; and each Station can have lots of Locomotives at that Station. It doesn’t work the other way around – a Locomotive can’t be at lots of Stations at the same time; and a Station can’t be in lots of Areas.  This view of ‘what owns what’ is implied by the direction of the arrows.

MOPS Database Schema; there is a File Description for each box on the Data Diagram. The file is broken down into ‘attributes’ or fields. For example, a Station has an id, a short name and a long name. The size of the attribute is also given – that’s the maximum length that MOPS will allow for that field. There’s a column that says whether the user will provide the key or whether it will be generated automatically: for example, a locomotive number will be given by the user; whereas a user won’t care about a flash message number. Finally, there’s a column called foreign key: a Station, for example, has a foreign key of an Area: this means that the Station ‘belongs’ to the Area and it uses this link to establish that connection.

Finally, the MOPS Functions describe what’s going on. Access shows the level of user security that there will be on the command; and then there’s a fuller description of the function.  This list also shows the data tables that are being accessed by the function, and what the function is doing to that data table.