Subject Re: [IB-Architect] SQL Statement Dependance Mapping
Author Ann Harrison
At 01:25 PM 6/30/00 -0400, Dalton Calford wrote:
>Could we get the long and the short of it please?

It is, in fact, long. InterBase's system tables are active - the
design intent was not to have a ddl at all. Tables are created
with an insert into rdb$relations, domains with an insert into
rdb$fields, columns with an insert into rdb$relation_fields. Of
course, it's not entirely that simple - there's a lot going on
behind those inserts - but that's the interface.

Then we discovered exactly how hard it is to get all the pieces
right. Tables and fields are easy enough, but when you get to
the bits that have to be stored as BLR (e.g. views, constraints,
triggers, procedures) - not that easy.

>What SQL objects can we safely create and or modify by simply using DML
>statements against the system tables?

Anything, as long as you never make a mistake, and as long as
you have a lex/par/gen that turns SQL into BLR. A compile in
the middle helps if you want to generate good BLR.

>There are system triggers that don't have the source code included, is
>it possible for that source (as it is more of macro format vs C source)
>to be released before the rest of the Interbase code?

Let me grunge around and see if I can find it. One warning -
it's buggy.

>Is there a simple reference guide to BLR (maybe the bnf or ebnf of the
>blr parser?)

A simple reference isn't going to help. It's a gestalt
sort of thing - either you get all of it or you don't
get it at all.

Ann