Temporary Tables in Firebird - Firebird

Firebird does not currently provide any form of temporary table that is managed as such by the system. It has less need for them than many other DBMSs have. For example, Firebird has the capability to output a virtual table directly from a stored procedure that is written with a specific syntax.

Permanent “Temporary” Tables

A popular model for storing temporary data for applications to access is to define a permanent structure for the data that includes a “session ID” or “batch ID” acquired from a generator or, in Firebird 1.5, the CURRENT _TRANSACTION value. Applications can insert, reprocess, and delete rows in such a table during the course of a task. Remember, Firebird does not put locks on tables in the normal course of events.

According to the conditions and needs of the application, it can itself be responsible for deleting the temporary rows when its session completes, using the session ID for a searched delete. Alternatively, the application could post a row to a housekeeping table signaling “cleanup required” to a later, deferred operation that runs after hours, before a backup.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Firebird Topics