Subject Re: [IB-Architect] GDML?
Author Jim Starkey
At 11:46 AM 6/14/00 -0400, Gary Smith wrote:
>
>Where can I read more about GDML? Google shows me nothing more than a
>couple of interbase links.
>

GDML, although still present in QLI and GPRE, was dropped from the
pre-historic, pre-web days. There is probably nothing on-line at
all. We found a backup tape of the full (v2?) doc set in our attic.
Unfortunately, it's in Frame. Ann, in the best spirit of techno-
archaeology, has undertaken to restore parts of the doc set but has
been a tad busy beating her head against the wall lately, so there
is no progress other than the delivery of a shiny new Frame kit.

To give you a flavor, the following is pretty close to a legit
C program using GDML:

main()
{
int length;

ready "yachts.gdb" as dbHandle;
start_transaction;

length = 40;

for x in yachts cross y in owners over builder, model
with x.length = length
printf ("%s %s owned by %s\n", x.builder, x.model, y.owner);
end_for;

store x in yachts
strcpy (x.builder, "hinkley");
strcpy (x.model, "bermuda 40");
x.length = 40;
x.price = 450000; /* way up since 1977 */
end_store
on_error
printf ("golly, that didn't work!\n");
end_error;

commit;
finish;
}

Among the significant differences from SQL:

1. Databases and transactions are explicitly readied/started
and finished/committed.

2. Context variables ("x" and "y") are required.

3. Database field references can be freely intermixed in host
language statements provided they are qualified by the
appropriate context variable.

4. Host language expressions can be free mixed within database
statements.

5. A select list is not required since the precompiler can
easily deduce which fields are referenced. The CROSS
keyword was used rather than a comma to suggest that
something potentially expensive was happening (also reflected
GDML's author's native disposition).

6. No interface variables are required. The preprocessor
generates structured interface messages w/ datatypes
based on database meta-data.

7. GDML is turned into BLR (gook) at preprocessor time, vastly
reducing the runtime statement instantiation overhead.

8. Data is transmitted in structure messages, so field by field
copying of data is not required.

9. Exceptions not caught by "on_error" terminated the program,
so no status code checking was required.

GDML was less sensitive to meta-data changes than SQL, faster, smaller,
simpler, more intuitive code, more robust, more portable, and nearly
extinct. The MetaMax of database languages. Build a better mousetrap
and folks 'll buy a more expensive, harder to use, less effective but
standard compliant mousetrap everytime. Now if only mice were standards
compliant...

The original InterBase (or was it Interbase? Ann?) philosophy
was SQL as per the standard and GDML for innovation. You could
even intermix them line for line in the preprocessor.

Jim Starkey