SSC Meta-Data System

. - -

Part 5 CMD Functions

A library of functions is available for use by programmers and in queries, and thus for use in aggregations, reports and exports of data to other programs. The library is organised into various modules corresponding to the purpose of the routines.

CMD Access

This set of functions returns single values extracted from the Meta database. They are intended to be used by the end-user in queries and reports.

M_Scale_Name returns the name of the Scale linked to a Field name.

M_Scale_Label returns the label for a Field.

M_Scale_Desc returns the description for a Field.

M_Scale_Attribute returns the value of any attribute (selected by name) for a Scale.

M_Label returns the label for a code from a Field

M_Desc returns the description for a code from a Field

M_Attribute returns the value of any attribute (selected by name) for a code from a Field.

M_ConvertNull converts between Nulls and the linked code for the Field.

M_Recode applies a (named) recode to a code, returning a value for the destination Scale.

M_Lookup performs the equivalent of a singleton select operation on any table or query in the meta-data.

These routines can also be used by the programmer to extract descriptive information for display on data entry forms. The recode system can be used to implement translation tables.

CMD Management

A linked set of Forms is provided for the entry and editing of the meta-data, together with reports for documenting the defined scales and recodes. This management would normally be done by the database administrator. In some situations it is useful for the programmer to be able to edit information directly from code, and this module provides appropriate routines.

M_Add_Code inserts a new code record into the meta-data, or updates an existing one, for a named Scale.

CMD Forms

This module contains routines which help the programmer to link forms in the host application to information in the Meta database. The module also provides access to the CMD forms stored in the Meta library.

M_OpenForm will open a named form stored in the Meta Library

M_List_Row_Source links controls on a form to the code lists in the meta-data.

M_Control_Help uses the meta-data to return Help information for the current control.

M_Find_Code_Button allows the user to select a code for the current control by searching through the code descriptions stored in the meta-data. This is particularly useful with long code lists, such as the names of organisations.

CMD Reports

A function is provided for running any report directly from the library, though this is usually done by a user through the forms mentioned above. These reports are for documenting the content of the Meta database.

M_OpenReport will open a named report stored in the Meta Library.

Summary

Although this paper is intended to be about meta-data, much of it could be read as a straight forward description of a standard RDBMS application. Indeed, we have tried to exploit the ordinariness of the data in the Meta database, to enhance management of the meta-data and to improve the operation of the host application.

However, the whole system is fundamentally dependent on the fact that any use of the meta-data in the host database requires a link through the Name of a field, and this Name is not data. We can write SQL to link the host and meta information, but only by repeating the field names as strings.

Thus, proper support for meta-data requires functionality not present in any implementation of SQL known to us. We have not been able to overcome this problem, but have worked round it, and have attempted to identify useful structures for meta-data and useful functionality for the meta-data in the host application.

There is clearly a lot of scope for additions to both the structure and functionality of meta-data beyond what we have built for this particular application, but our feeling is that the structure is strong enough to permit that.


Back to - - -

Page last updated 18 June, 2003.