next up previous contents
Next: Commandsswitches, scripts and Up: Basics of data management Previous: Basic data types

Naming of data items

 

The basic idea is to store all data items in the Name space, which can be easily accessed by the commands. In addition to the use of simple names, the Name space can be divided into parts using directories, which are analogic to directories used with file systems. Also, frames can be used to build groups of data fields, if their length is identical.

Directories

A directory is seen as any other data structure in the Name space. Analogically to file systems, each directory (excluding the root) has a root entry called `.' and a link to parent directory called `..'. The separator in the names between the levels of directories is `/' and the root of the whole directory tree is called `/'. Thus, a truly distinguishable path can be defined by collecting all subdirectory references and preceding it with `/', for instance `/lev1/lev2/'.

Note that operations do not automatically create new subdirectories for resulting data structures. That is, a directory must be created before it can be used to store new named entries. However, you can refer to data structures in different directories by using absolute or relative paths. Current directory can be changed with the cd command.

Please note, that the directory structure of NDA is not the same as the one in the host computer. In NDA all data items are only stored in the main (or virtual) memory of the computer, and file system files have to be loaded into the Name space. Also the results are lost, if they are not saved into a file before exiting the NDA.

Frames

Fields can be stored directly in directories or within frames. At the directory level they can be referred to as any other entries, but at the frame level fields can only be referred to through the frames. The same field name can be used in several frames residing within the same directory. Otherwise, names within each subdirectory or each single frame must be unambiguos.

Items inside frames are always referred to with <framename>.<itemname> and, thus, they cannot be seen directly in any directory. The separator between the name of the frame and its items is always `.'. If a frame contains other frames, which can further include data items, fields can be accessed via the whole name, for instance, `frm1.frm2.item1'.

Rules of naming

Names should start with an alphabetical character a - z, A - Z and may, at least, contain alphanumeric characters. Names are case sensitive. Some special characters, such as `#', `$', ` tex2html_wrap_inline7109 ', `.', `/', `(', `)', `{', `}', `[', `]', `"' and `'', may not be used, and characters like `:', `;', `,', `_', `@', `+', `-', `*', `=', `<', `>' and `^' should not be used in order to avoid confusion.


next up previous contents
Next: Commandsswitches, scripts and Up: Basics of data management Previous: Basic data types

Anssi Lensu
Thu May 17 15:00:44 EET DST 2001