EUG PD


Shadow RAM Database

 
Published in EUG #48

Instructions

If your copy of the Shadow RAM Database is provided on a HeadFirst PD compilation disk, select the Load Shadow RAM Database from the menu.

The Shadow RAM Database is a memory-based database for the Electron and Master RAM Board. The Master RAM Board has, at any time, 12-24k of free memory which cannot be used as program space. It is this memory that is utilised by the Shadow RAM Database, providing 24k of storage space - more than enough for most databases.

The Shadow RAM Database is easy to use and proves to be an effective database when used with either disk or tape systems. Indeed, on disk, it is far superior to some disk-based databases, as the disk only had to be used for loading and saving complete databases.

The Shadow RAM Database allows up to 20 fields per record, each containing up to 25 character. The number of records allowed is dependent on the size of each, and is calculated by the program. The following database functions are included in the Shadow RAM Database:

      Add record
      Edit record
      List record(s)
      Delete single record
      Delete all records
      Search for string

Also included on the function-kry driven menu are options for creating, loading and saving files. An interface to the Operating System is provided by the ability to enter star commands.

In this guide, we shall take each option in turn and explain its use.

Create Database (f0)
When you first load the Shadow RAM Database, it will be necessary to select this option.

The screen will clear and you will be asked to enter the title of the database (this is not the filename). Then you will be asked to enter the number of fields per record (this is the number of items in the record e.g. name, address, etc). For each of the fields you will be asked to provide a name and the maximum length in characters (this includes spaces).

After a short delay, the maximum number of records available will appear and the program will return to the main menu.

You will notice that the main menu now includes details of the current database - title, maximum number of records and number of records used.

Load Database (f1)
If there is a database already in memory when you select this option or Create Database, the program will ask whether you want to save the database before loading/creating a new one.

You will be asked to enter the filename (the name the database is stored on disk/tape) and the program will then load it check that it is actually a database file.

The program will then return to the main menu.

Add Record (f2)
As long as there is space left in the database, you will be prompted to enter the contents of each field for the next free record in the database. After entering the last item of data, there will be a short pause before you are asked whether you wish to return to the main menu or enter another record. Press M or N accordingly.

Edit Record (f3)
You will first of all be asked the record number you wish to edit (this is displayed at the top of the record when it is shown on the screen using List or Search). You will then be told the contents of each field in turn and asked to validate those contents. If you press N for a field, you will be asked to enter the correct contents. These will replace the old ones in the record.

The program will then return to the main menu.

List Records (f4)
You will be asked the record number of the first and last records you wish to see. If these are the sam you will see only one record. The program will then show each record in turn. As the record is displayed, if there are more than eight fields it will not all be shown at once. Press SHIFT to scroll the record within its witndow on the screen or SPACE to continue to the next record.

If Y was entered at the "Print?" prompt, the record will be printed.

Search Database (f5)
You will be shown a list of the fields in the database together with the numbers assigned to them. Press SHIFT to scroll through the list. Enter the number of the field you wish to search, and then the string you wish to search for, e.g. a surname or town. Every record containing that string in that field will be listed and if Y was entered at the "Print?" prompt it will also be printed. SHIFT and SPACE work as with the List Records option.

Delete Record (f6)
This option deletes one record from the file. You must first of all enter the record number. This record will be displayed and you must confirm that this is the record to be deleted. There will be a short pause while the record is deleted then the program will return to the main menu.

Delete All Records (f7)
This option wipes all records from the file - you must therefore confirm that this is your intention before wiping. The program will return to the main menu.

Save Database (f8)
This option saves the database under the name it was loaded in under. If the database was created rather than loaded, you will be asked to enter the filename. The database will then be saved and you will return to the main menu. Note that the database saved is still held in memory.

Star Command (f9)
This option allows you to enter star commands e.g. *. or *DELETE. Press just RETURN to end.

Gareth Boden, EUG #48

HeadFirst PD