Subject | Re: [IBO] Re: IB_SQL Metadata-extract issues false warning for DbKey_Length |
---|---|
Author | Helen Borrie |
Post date | 2003-07-03T01:15:47Z |
At 03:57 PM 2/07/2003 +0000, you wrote:
metadata-extract object expected - they don't necessarily indicate anything
wrong, provided the beholder understands the metadata.
understand. AFAIU, that's the purpose of warnings.
extend the component's features for use as an analysis tool, albeit without
in any way enhancing the extraction of metadata (the component's current
purpose).
But it's highly debatable whether a component designed to extract metadata
has a role to teach you things about the engine internals. And that's what
the RDB$DB_KEY is. It isn't surfaced in the language. It's a "trick" that
a group of knowledgeable IBO developers (Claudio, followed by Jason,
followed by Geoff) have surfaced for use in certain contexts - for example,
to raise a flag when you are investigating a problem with a view....?
dbkeys. Principally, dbkeys are part of the engine's internal housekeeping
mechanism to manage the cardinality of sets. Under a particular set of
conditions - where KeyLinks can't be determined from either the query
specification or the metadata - IBO datasets pick up on this mechanism to
impose a unique identifier on an output set. On the IBO side, they are not
even the hex number groups returned in the XSQLDA - they are munged into a
string. They cannot be used to search tables on the database. You should
never treat them as a bona fide SQL column for DML purposes, because they
have no validity beyond the moment your transaction started.
software. We've been using views and selectable stored procedures with IBO
for years.
cheers,
Helen
>No way ?Yes, I thought about that after I posted on it.
>It could check RDB$VIEW_RELATIONS.
>
>By the way, it would have to do it recursively, because
>the resulting *relation*-names are not necessarily tables but might
>be views themselves.
> > I can't see why this should be a problem - a warning isn't anActually, the warning is correct. All the warnings do is say what the
>error - and
>The problem is that this warning is false and therefore very
>misleading.
metadata-extract object expected - they don't necessarily indicate anything
wrong, provided the beholder understands the metadata.
>At least, this warning does not read "I have no real idea about howI think it actually prompted you to investigate something you didn't
>big your dbkey should be and I have no way to caclulate it but I
>warn you that I would prefer 8 over your 152"
>Indstead it reads "DBKey_Length should be 8 but is 152 instead".
>I understand this warning as "There is something wrong in your
>database. Your db-key length is 19 times too big. That might work
>for you at the moment but you should look after it soon."
understand. AFAIU, that's the purpose of warnings.
>Of course, NOW that I know how to judge it, it is no problem anyThe view issue looks like an area where enhancements could be made to
>longer.
>I posted that message just as a proposal for improvements:
>To save other people the mess I had.
extend the component's features for use as an analysis tool, albeit without
in any way enhancing the extraction of metadata (the component's current
purpose).
But it's highly debatable whether a component designed to extract metadata
has a role to teach you things about the engine internals. And that's what
the RDB$DB_KEY is. It isn't surfaced in the language. It's a "trick" that
a group of knowledgeable IBO developers (Claudio, followed by Jason,
followed by Geoff) have surfaced for use in certain contexts - for example,
to raise a flag when you are investigating a problem with a view....?
>Additionally there is a slight chance that Jason has overlooked thisNo, the data access components don't make heavy use of
>(rare?) constellation not only in the metadata-extract part of
>ib_sql but in the ibobjects-access components as well (I don't know
>much about the inner workings of ib-objects but I guess that he is
>making heavy use of dbkeys
dbkeys. Principally, dbkeys are part of the engine's internal housekeeping
mechanism to manage the cardinality of sets. Under a particular set of
conditions - where KeyLinks can't be determined from either the query
specification or the metadata - IBO datasets pick up on this mechanism to
impose a unique identifier on an output set. On the IBO side, they are not
even the hex number groups returned in the XSQLDA - they are munged into a
string. They cannot be used to search tables on the database. You should
never treat them as a bona fide SQL column for DML purposes, because they
have no validity beyond the moment your transaction started.
>; so for example allocating a 8-byteErm, I don't think you need to worry about that. IBO is not new
>buffer because he expects the dbkey to be of such size could be
>fatal if the key is 32 bytes size instead.)
software. We've been using views and selectable stored procedures with IBO
for years.
cheers,
Helen