(back to Open Document For Databases)
If an OASIS Open Document Database file is to contain not only the information how to access another database, but also the actual data, then a ZIP package might not be able to cover all intended use cases:
file-based databases usually require O(1) write access to arbitrary
locations in the underlying file for
- implementing efficient transactions
- providing the expected user experience: Unlike other applications, if the user changes a small piece of data in a database, e.g. enters a new record in a table, she expects those changes to be reflected in the file immediately, without "saving" the "document"
- implementing simple multi-user access, which is not only a feature for database servers, but also for desktop database systems.
- more ...
This is impossible with a file format which requires complete copying of a stream, out of / into the package file. Though ZIP does require such copying only in the case of growing streams, even for non-growing streams the effort for changing a single byte in a stream is still linear in the stream size, and not constant, since a checksum needs to be calaculated for the stream. Finally it boils down to ZIP potentially requiring O(n)-access for even the simplest write operations, which disqualifies it for all of the above use cases.
Consequently, the above features can only be reached with either one of the following:
- The actual data is not embedded in the file
- A porprietary package format is used, which fulfills the requirement of constant write time.
- Multi-user access and the accompanying features are not implemented at all.
- This leaves us with the following options for the file format standardization
- Agree on a different format.
- This is most probably not an option at all for OASIS.
- Don't make the package format a part of the file format.
- This would render the standardization effectively useless, since document interchangeability could not be reached then.
- Define the OASIS Open Document Database format only for databases which do not contain actual data.
- This implies that as soon as an application addresses some of the features above, it cannot use the OASIS Open Document file format anymore, but again needs to switch to an proprietary format.