Subject | Re: [Firebird-Architect] for discussion Transient Data Set |
---|---|
Author | Ann W. Harrison |
Post date | 2005-01-11T15:38:23Z |
Dmitry Yemanov wrote:
scope of SQL modules. We don't (yet) implement SQL modules so local
temporary tables are irrelevant and inapplicable to Firebird.
SQL session that created it, unless it is explicitly dropped earlier.
temporary table.
temporary tables. The name space is restricted to the SQL session, the
data goes away when the session exits. Unfortunately, the standard
defines different semantics for local temporary tables, specifically
that they are restricted to a SQL module. Grafting non-standard
semantics on standard language is bad design and restricts our ability
to implement the standard in the future.
The advantages of the proposed syntax over the syntax of the standard
include 1) The declaration and modification of transient data sets are
DML, so we don't get into the DML/DDL mire. 2) for the same reason,
transient data sets can be used in procedures. 3) a tds can be used to
redefine itself - through projection, union, join etc.
Regards,
Ann
>Materialized data.
> First question, whether it defines a query or a data set?
>1) Local temporary tables are defined in the SQL standard to have the
> If this is an actual data set, then how does it differ from LTTs?
scope of SQL modules. We don't (yet) implement SQL modules so local
temporary tables are irrelevant and inapplicable to Firebird.
>It is a real data set that is automatically destroyed at the end of the
> So we have a result assigned to some "table variable" which can be
> referenced later? Sounds like a real data set.
SQL session that created it, unless it is explicitly dropped earlier.
>Or DROP TABLE for a real table. Or DROP TEMPORARY TABLE for a global
>>A transient data set is destroyed when the session ends or with the drop
>>transient data set statement: DROP TRANSIENT DATA SET <name>
>
> Equal to DROP TABLE for a LTT.
temporary table.
>The semantics are very much like the semantics _we_ wanted for local
>
> The major question then. Where are the data (both rows and index b-tree)
>
> stored? Are blobs supported? And again, what is the actual difference
> between your proposal and already discussed LTTs (considering the
> suggested CREATE AS SELECT extention)?
temporary tables. The name space is restricted to the SQL session, the
data goes away when the session exits. Unfortunately, the standard
defines different semantics for local temporary tables, specifically
that they are restricted to a SQL module. Grafting non-standard
semantics on standard language is bad design and restricts our ability
to implement the standard in the future.
The advantages of the proposed syntax over the syntax of the standard
include 1) The declaration and modification of transient data sets are
DML, so we don't get into the DML/DDL mire. 2) for the same reason,
transient data sets can be used in procedures. 3) a tds can be used to
redefine itself - through projection, union, join etc.
Regards,
Ann