The eSchool Data Dictionary |
The Dictionary is accessed from the System menu item, as shown in Figure 5-77.
Figure 5-77: The eSchool Dictionary form is available from the System menu item.
Figure 5-78: The first page of the Dictionary form, showing a number of data files
The initial files display shows only the data files eSchool users may wish to edit. As a Pocket eSchool user, there are only four files -- the Person, Student, Teacher, and Schedref -- that are of particular interest. These are the files which contain data items that you can add or edit and are downloaded to the handhelds. Only certain stock data items are downloaded from the other files. eSchool contains many other files which are generally hidden from users. They are accessed with the aid of a hidden menu, as shown below in Figure 5-86. The eSchool Dictionary form has pages whose tabs contain Security. These are used by the eSchool system manager user to control various kinds of data access. As a Pocket eSchool user, you have no security limitations. For that reason, the security pages are not used.
The items in the files can be viewed by first selecting, as the Person file was selected in Figure 5-78 and clicking on the Items page tab. Figure 5-79 shows the Items page for the Person file.
Figure 5-79: The Items page of the Dictionary form
The items page lists most of the data items present in the person file. However, there are many data items, such as primary keys, foreign keys, and other systems items, which are not listed here. They are "hidden" from users so that their specifications cannot be inadvertently altered. Changing the specifications could introduce mysterious misbehavior into the program or, worse, make it not run at all. All the data items are available with the help of the hidden menu, as shown below in Figure 5-86. "Hidden" data items can be made visible by defining a read-only version of the data item. Figure 5-79 shows an example where the primary key for the person file, person.personid, is made visible and, therefore, becomes downloadable, or be put on a data form, by exposing its value through the use of a function. Notice that the Record Key data item is an integer whose value is defined by the function calc(person.personid). The calc function is a wrapper which returns the value that it is given. In the case here, the function always returns the present value of person.personid, the primary key value.
Figure 5-80: Showing the System data item Last Name which may not be edited by users
Some data items, such as Last Name, shown in Figure 5-80, are systems items which users can see but cannot edit. Notice that the Delete button, as well as various text boxes, are grayed out in order to indicate that this is not an editable data item.
Figure 5-81: A data item that is editable and deletable
The Ethnic Code data item was added with the use of the script data dictionary directive, as shown in Figure 5-18. Any data items which are added with script directives can be edited or deleted, both in the script file and from the Dictionary form. Notice that the various data boxes show the data item's name, caption, type, and data width. eSchool can handle 18 different data types. However, of these, only the character, integer, number, date, logical and memo are of practical use for downloads to handhelds. The remainder of the data types are useful for eSchool users.
While using most of these dictionary entries is intuitive, there is one data type, named List, which requires some explanation. A list is just a look-up table whose values are defined elsewhere. Figure 5-82 shows the Gender dictionary entry.
Figure 5-82: Gender is an example of a List data type.
Notice that the data type is List and that the List dropdown box contains the entry Gender. The Gender in the list box refers to a gender lookup table. Figure 5-83 shows another example of such a data item, the Category which uses a list named Persontype.
Figure 5-83: The data item Category uses a look-up list, named Persontype
Most of eSchool's lookup table lists are shown in the Lists page of the Dictionary. Figure 5-84 shows the Lists page with the Person Type list selected. The list entries can be edited from this form. However, please note that the script processor makes automatic entries into various lists whenever it finds that a data entry, which uses the list, is not in the list. To find out what the import processor did, you must come to the list entry and examine the item list.
Figure 5-84: The List page, showing the values of the Person Type list
Figure 5-85: The List Information page shows some of the specifications for this list
The List Information page shows the list's size parameters. Lists can have a short code part, as shown in Figure 5-84, and an optional description part, which is used in some of the other lists.
The dictionary form has some hidden menu items which are available for data diagnostics. They are designed to be used with the help of EADS staff. Figure 5-86 shows the hidden menu which is displayed when the mouse cursor is placed to the right of the Files caption and a right mouse click is done.
Figure 5-86: The Hidden Menu, showing some Diagnostic options
The Show all files menu item, when selected, causes the Files list box to be populated with all the eSchool files. All Files' data items can then be viewed on the Items page. When the Show all items menu item is chosen, then all items, including internal system items, are shown on the Items page. The Browse options can be used to examine the data in the data files. All FoxPro files (tables) look like spreadsheets when they are viewed from here. Figure 5-87 shows a browse of the top part of the person file. Here, in Figure 5-87, the records are sorted in lastname firstname order.
Figure 5-87: The Browse window, showing part of the Person table
If you want to browse the person table in primary key order, or by some other key order, for that matter, you can turn to eSchool's Diagnostic form. You can access this form by selecting the Diagnositc menu item from the System menu item, shown in Figure 5-77. Once the Diagnostic form has been launched and your desired table has been selected, click on the Set Sort button, as shown in Figure 5-88. The primary key for this table, personid, has the letter "P" after the key name in order to indicate that it is the primary key. After the desired key has been selected, and Browse has been selected in the Tasks list box, click on the Do It button in order to initiate the browse on the person table, sorted by the selected key.
Figure 5-88: The Diagnostic form where the Person file can be browses by any of its keys