SSC Meta-Data System |
This database contains the tables which hold the conceptual meta-data, and the queries which are used to manipulate it. The database contains no code used by the CMD processes, only a short module to initialise itself when it is opened directly.
No facility is provided for direct access to the information in these tables. It is certainly possible to write SQL to reference the data directly, but the intention is that the information should always be accessed via the routines and forms in the Meta Library, described below.
The meta-data system itself makes use of the Meta database, to store information about the meaning of the codes used in the structure of the system, for example to distinguish different types of Scale (see section 5.1) and different types of special code (see section 5.2). Scales defined by the CMD component for its own use are distinguished by a special value of the Status code (see section 5.1) for the Scale.
This library contains the functions which can be called from the host application to allow the programmer or user to interact with the meta-data. These functions are arranged into various modules roughly according to purpose. The names of these functions all start with 'M_'. They are summarised in section 6.
Figure 6: Form Meta Data
For the end user there is a set of
access routines which allow information from the CMD tables to be
retrieved anywhere where an expression can be written. In
particular this allows the labels or descriptions of Scales or of Codes to be retrieved in queries and
reports. The access routines can also be useful for the
programmer, providing labels which can be displayed on data entry
forms to confirm coded entries (examples are visible in Figure
3).
The library contains a number of forms which can be opened by the host application to allow the users to manage the meta-data. Form Meta Data (see Figure 6) is a switchboard which contains buttons giving access to the other main forms. These in turn allow for the definition (and browsing) of Scales, Mappings between Scales, and the links from the Field names in the host to the Scale names in the CMD tables. Pictures of these forms appear later with the descriptions of the Tables to which they refer.
The routines and objects in the Library access the tables and queries in the Meta database dynamically at run time. The location of both the Meta and Host databases is not hard-coded, but is evaluated when needed. The host application is required to establish the links to the Library and the appropriate Meta database.
The host application must establish a 'reference' to the Meta Library, so that the routines within the library can be used.
It must also initialise two global variables which provide the Meta system with pointers to the host itself and to the Meta database, and must call the routine SSC_Meta_Initialise to allow the system to do any further internal initialisation.
Once the initialisation has been done the application can call any of the routines in the Meta Library to access the information in the Meta database. Of course, the application builder or the database administrator will need to define the meta-data needed in the application by entering it into the Meta database. This is most easily done by using the forms supplied with the system, starting from the form Meta Data shown.
The application should provide a way for the user to open the central form of the meta-data system (see Figure 6). Generally this will be done with a statement like:
Result = M_OpenForm("Meta Data")
This will give access to all the forms used for browsing and managing the information stored in the Meta database, and to reports based on it.
The user can be provided with pop-up help about any control on a form, based on the Descriptions stored in the Meta database, by calling the function M_Control_Help (see Figure 4). This is best done by associating the call with a toolbar button or a keyboard shortcut.
The application builder can use the codes in the Meta database as the source for list and combo controls on forms. The is most easily achieved by executing the statement:
M_List_Row_Source Me
in the Open event of the appropriate forms.
There are usually a few Scales in a system which have a large number of codes which are difficult to memorise. Examples are the coding of occupations, or the codes for organisations referenced from the application. Finding such codes in a combo box or list is possible but usually not fast. For this situation the CMD system provides a way of allowing the user to search through the code definitions for the appropriate scale, by calling function M_Find_Code_Button, usually via a toolbar button.
Page last updated 18 June, 2003.