community.borland.com

Article #25478: Why update and delete are not allowed on external files

Problem:
I want to export data to an external file.  I notice that  UPDATE and DELETE
are not allowed.  I can only insert.   Why?

Solution:
Note: The information in this document applies to all InterBase versions.


The design goal of external files is to provide a way to import
and export data, but not to provide an alternative place where data
can be kept and maintained.  

The original decision not to support update and delete for external files
was driven by the semantics of the files, not by the absence of transaction
control.  Failing to rollback an insert is just as bad as failing to 
rollback an update, and the multi-user problems are about the same.

The external file mechanism was originally designed around VAX/RMS
(Record Management System).  RMS supported sequential, relative, and
ISAM files.  InterBase implemented full read/write semantics for the
ISAM files because they had a concept of a record that was not position
dependent and because sharing such files with legacy applications made
(a little) sense.  Relative files were insert only (as I recall) 
because we didn't approve of their semantics.  Sequential files were
also insert only because there was no defined way to change data in
the middle or to delete rows. 

For convenience, we chose to handle Unix stream files as if they were
RMS sequential files - a way to import and export data, but not a
normal part of the database.  That's also why they're handled as if
they were record based - fixed length fields rather than delimited
fields.  Since we'd put quite a lot of effort into the data storage 
capabilities of the engine, we weren't overly enthusiastic about 
defining different semantics to handle a lower performance, less 
capable data store (i.e. the file system).  Besides, we were busy 
discovering the various incompatible and not quite  reliable threading 
packages that each vendor was implementing.

By the start of V3, we'd developed an architecture called a bridge,
intended as read-write access to other data stores - Oracle, Dbase,
what-have-you.  That eliminated all residual interest in extending 
the external table mechanisms.  That effort eventually withered in 
favor of BDE.  (I think).

Thus endeth the history lesson.

source : Ann Harrison on the listserv


Last Modified: 26-OCT-00