Beebug
1st August 1986
Author: Geoff Bains
Publisher: Minerva
Machine: BBC Model B
Published in Beebug Volume 5 Number 4
System Delta is much more than just a database. In fact, it offers everything you need to build your own highly customised database system. How much of a landmark is this in the availability of serious database software for the Beeb? Geoff Bains reports
System Delta (Minerva)
System Delta is much more than just a database. In fact it offers everything you need to build your own highly customised database system. How much of a landmark is this in the availability of serious database software for the Beeb? Geoff Bains reports.
There are many database management programs around for the BBC micro. However, for an application requiring anything more than a simple card index, writing your own package is the only real answer. System Delta allows even the novice programmer to do just that.
System Delta comes on a 16K ROM - providing over 158 * commands - a full Card Index example program and a manual. The commands look after all the difficult aspects of writing your own database software - file handling, setting up, editing, and searching records.
A program written with System Delta commands can cope with databases of 8160 records, each of 8000 characters. Each record can contain up to 255 fields and each field 200 characters. The whole side of a disc is the only limitation in overall size of a file. Most importantly, System Delta can cope with five files at once so truly relational databases can be set up and interrogated.
System Delta is meant for a mode 7 display. Large records are viewed or edited by scrolling them in four directions. This is all automatic and requires very little programming from the user. The command *SDscroll, for example, will display a specified record and initiate the scrolling display.
To produce a simple browse facility on an existing file (called 'DATA') complete with full scrolling across each card using the cursor keys, selection of the next or previous card using the 'N' and 'P' keys and 'F' to finish, this is all you need:
10 MODE7:*SDRESET
20 *SDOPEN DATA
30 *SDGREC 1
40 REPEAT:*SDSCROLL
50 IF G%=ASC"N" THEN *SDDIR 1
60 IF G%=ASC"P" THEN *SDDIR @
70 IF G%<>ASC"F" THEN *SDNEXT
80 UNTIL G%=ASC"F":*SDCLOSE
A short program like this does not take long to write, nor does it take up much of the Beeb's valuable memory. However, the effect is truly professional.
The System Delta commands are divided into three groups. The first consists of named commands (all prefixed with 'SD'). These handle the file orientated aspects of programming. *SDopen, for example, will open a file. *SDedfield will edit a field.
The second group of commands are just numbered (again prefixed with 'SD'). These cover many useful features to help with creating a user interface to the file-handling operations. For example, *SD06 issues a 'Press a key' prompt, flushes the keyboard buffer and returns the ASCII code of the next key pressed in G%. SD47 executes a command.
The final group of commands are all *FX163,16 commands - ranging from FX163,16,0 to FX163,16,61. Acorn has specially allotted *FX163,16 to Minerva.
These commands are the really low level commands that won't be required much by most users. They cover such features as converting an area of memory to upper case ASCII, and flushing the keyboard.
Most of the System Delta commands require parameters to specify the record, field, or whatever the command is to act on. Although the System Delta commands are all * commands they use Basic variables. Indeed, many System Delta commands return values into Basic resident (integer) variables for use by the programmer.
However, even this can be configured to your own preferences. If you are particularly fond of using, say, G% for some purpose of your own then the last key pressed can be redirected from G% to the variable key% simply by issuing the command *SDvar 3,key%.
The only aspect of System Delta that disappoints is the manual. The standard manual accompanying System Delta is mainly concerned with using the Card Index program. To create your own software (and this is really the whole idea) you'll need to fork out another £20 for the reference manual that explains all the commands. Even that leaves much to be desired. It is produced entirely from dot matrix printout which makes it very tiring to read.
This manual is extremely detailed - it goes right down to the level of the format of the data file - and there is not much you don't know about System Delta after wading through it. However, wade you must. It is clear that the manual was written by someone at Minerva very knowledgeable about the package with little thought for the struggling beginner. This is a shame as System Delta does enable a comparative programming beginner to produce excellent quality software, if only he can get to grips with Minerva's software.
All of which leads to the Card Index program supplied with the System Delta package. This is an application program written entirely in Basic using the System Delta commands. It does not exploit the full capabilities of System Delta - it only uses one file at a time - but it does show the kind of speed, quality and professionalism that can be achieved.
The Card Index is menu-driven with a series of interconnected menus, each controlling a different aspect of the database management - creating a file, editing, browsing, searching, etc.
The record card format is created using the ROM's built-in scrolling editor. Once the fields have been specified, their position and length is determined simply by moving around the card and typing in as many '0's as are needed. Entering the data is also easy. Each card can be 'filled in' either from scratch, entering the contents of each field, or using a default card that is altered as required.
There is an excellent editing system for entering data. This allows full editing of a line as it is typed in. Fields on the card can even be assigned values dependent on other fields, even from other records. The age of each person in a personnel file could, for example, be displayed on each card with only the date of birth entered.
Once some records are entered into the file it can be browsed through or specific records displayed. The real power of the Card Index program comes when you want to search a file. Up to eight subsets of a file are created using equations to specify the rules of the selection. These equations can select records according to single or multiple criteria from the whole file, another subset, or from a combination of either. The access of the file is very fast. Minerva claims that any record in any length of file can be found in under three seconds.
The subset can then be printed out, either in full or just the fields that you require. The format of the printout can be different from that used for the record cards, indeed several printout formats can be used selectively.
The power of System Delta is clearly shown by this program. Indeed, Minerva is using System Delta to write its own specialized packages for sale. A full blown video rental control package has been written and an accounts package is underway. However, a glance through the Card Index listing reveals that it is not a package for the squeamish. Using System Delta is hard work but it is ultimately worth the trouble. System Delta has brought forward the art of database handling on the Beeb by a gigantic leap.