Contents | < Browse | Browse >
%% Real programmers don't need Databases -- Or do they? By Ivo Kroone %%
%% (email@example.com) %%
Real programmers don't eat quiche. No they don't, but do they use easy-to-
use environments like those offered by packages? Would they ever bother to
use TeX or do they just write all escape sequences in a binary format for
their printer? And for that matter would they ever bother to use a database
language or do they write their own field-structure and index structure in
C or assembly? In this article I'd like to show the use of the built in
database language in various Amiga databases.
Programming within Superbase, dBMan or for that matter AMOS or AmigaVision
is often regarded as playing. They're not real programming languages and
are therefore for quiche eaters, newbies and suits. Maybe. Where AMOS and
AmigaVision have been made to achieve the same goals as other All Purpose
Symbolic Instruction Codes, a language within a database can safe a lot of
time and effort. If you ever write or want to write applications handling
lots of data and maintaining large files, a database might be a good
solution. Today's databases are mature and can talk to various other
applications via ARexx.
Classical applications for databases are address books, administration
systems, invoicing programs and other boring business applications. Here are
some applications one would not have expected from a database:
-A BBS system
All they do is register users, store messages, keep files and keep up with
who-did-what. Perfect uses for a database. A BBS is the last program to be
written in assembly or C.
-A hypertext program
Commodore is right for choosing an ASCII-compatible format for AmigaGuide,
but big hypertext documents could be stored more efficiently and could
work quicker when using a relational-database.
-A program to register fuel consumption of a car
It needs a file with fuel, distances and dates. An easy and perfect
purpose for a database.
-A fortune cookie generator
Programs to show cookies are always 90% code to select a cookie and
maintain some obscure file format. It could be written within Superbase in
about 5 lines of code.
-An adventure game
Rooms and attributes can be stored in fields. The user and the path the
user followed could be another file. An adventure within a database can be
more complex yet easier to program and because of the possibilities the
maker can offer: more fun for the player.
The Amiga might not be the premier machine for databases, but those
available are of excellent quality. Of course, if everyone uses a pirated
copy the developers simply cannot keep up with the developments in the
general computer market. Especially in this field of the Amiga buying your
software is essential for the future of the Amiga as a platform not only to
play games with.
There are three kinds of databases available for the Amiga:
1. The easy to use personal database
These can store addresses and store the contents of your video tapes and
cassettes. No programming language of macros available. Plain store and
Examples: MiAmigaFile-II (softwood) and Superbase Personal (Oxxi)
2. Professional multi-purpose databases
These can store data in various files and link those files. The system
offers lots of ways to customize so one can have another user browse
trough the data without knowing it is a database program.
Examples: Superbase professional (Oxxi) and dBMan (Vera Soft)
3. Look-up databases
The so-called SQL language is a standard language to look up data. An SQL
database can link files as well but has more than excellent ways to make
the most complex queries.
Example: SQLdb (public domain, can be found on any AmiNet FTP site)
It's the second kind of database which is especially interesting for real
programmers or those who want to be. Using a database like this saves a lot
of work. The developers made an excellent file format, incredibly fast
look up facilities and all the maintenance tools one can wish for. It is
just a waste of time to develop all of this when there is a ready-made
Superbase's language is much like a structured version of Commodore 64's
BASIC V2.0, with some database commands added. One can make all kinds of
looks and conditions. Something all of these build-in-languages will never
do is use standard includes and headers or offer ways to access the
internal memory directly. The only ways to reach the outside world are via
ARexx and a Shell-script. A good use of a database would be writing the
store-and-look up engine of the program. A user-interface could be written in
a standard language but especially with Superbase's FormsEditor it isn't
All advances and disadvantages of using a database for programming:
- No standard includes or headers can be used. Libraries and devices can't
be accessed directly. One has to stay within the database's boundaries.
- Most database programs use an interpreted language. Therefore one always
needs to run the database program simultaneously. dBMan has a compiler.
Oxxi sells runtime versions so a user of you program doesn't have to buy
the entire Superbase package.
+ Fast and well-thought-about file formats. Easy to alter file format
without having to rewrite the main program. Easy to add, modify or delete
+ Excellent methods for looking up data. Not only for plain look up, but
also for wildcards and cross-file-lookup. Smart and fast index files, no
need to design your own file and index system.
+ Excellent methods for arranging data. Databases have build in query
editors with which one can easily define groups, count totals or averages,
sort using multiple indexes, set ranges, filter and format output. Report
generators can be used to define standard forms or screens.
+ MultiUser support. The database handles all problems as to record or file
locking, user access to certain files and user levels (add/modify/delete).
Imagine the work handling network support would be when modifying a
+ For those who start programming: a language within a database is much
easier to learn. Learning languages like assembly, C or E assumes knowledge
of the Amiga system (Intuition), the compiler and that language. With a
database language one only needs to learn the language.
The developers of databases still have a lot of work to do for the Amiga.
With only a handful of professional databases for the Amiga our platform is
way behind. Those databases available are worth while, both the commercial
packages as well as the ones in the public domain. Using a database when
applicable saves time and could make Amiga programs better. Please take a
look at what's available.