Subject Re: [IB-Architect] Identifier naming woes
Author Ann W. Harrison
At 10:48 AM 5/24/2001 -0700, Jason Wharton wrote:
>In my opinion, the IB6 delimited identifiers were a waste of effort since
>they only allowed up to 32 characters and that they didn't do something more
>intelligent to handle spaces.

I agree with Jason. However, delimited identifiers are now part of
SQL and are important to application developers who work with more
than one database. Claudio and I have been corresponding about
problems with changing fields names. The two problems are not
unrelated.

Jim and I have argued over this for years. He uses field and table
names as the primary identifiers of fields and tables. That makes
sense, in a general way. When a table or field is used to define
or constrain another table or field, its name is stored in the BLR
that implements the definition or constraint. To the best of my
knowledge, the vast majority of those dependencies are not tracked.

BLR appears in the following system fields:


RDB$FIELD RDB$RELATION
NAME NAME
=============================== ===============================

RDB$VIEW_BLR RDB$RELATIONS
RDB$COMPUTED_BLR RDB$FIELDS
RDB$DEFAULT_VALUE RDB$FIELDS
RDB$DEFAULT_VALUE RDB$RELATION_FIELDS
RDB$TRIGGER_BLR RDB$TRIGGERS
RDB$PROCEDURE_BLR RDB$PROCEDURES
RDB$VALIDATION_BLR RDB$FIELDS
RDB$MISSING_VALUE RDB$FIELDS
RDB$EXPRESSION_BLR RDB$INDICES


The first 6 should be familiar.

RDB$VALIDATION_BLR holds simple expressions that constrain the
values of a field. It may be used for SQL constraints - I really
haven't checked.

RDB$MISSING_VALUE is a GDML construct that we might want to revisit
- it's the value that is accepted (input and output) as a NULL.

RDB$$EXPRESSION_BLR is part of the incomplete implementation of
expression indexes.


My point is that to change the real name (primary key) of a
column or field is going to require a lot more bookkeeping than
we currently do, and quite a lot of miscellaneous fix-up after
a name changes. Many database programmers use artificial primary
keys for exactly that reason. Do you think we might find a
solution in that direction?



Regards,

Ann
www.ibphoenix.com
We have answers.