June 2001
Intermediate to advanced
688 pages
19h 18m
English
The DB→sync function is the standard interface for flushing all modified records from the database cache to disk.
It is important to understand that flushing cached information to disk only minimizes the window of opportunity for corrupted data; it does not eliminate the possibility.
Although unlikely, it is possible for database corruption to happen if a system or application crash occurs while writing data to the database. To ensure that database corruption never occurs, applications must do either of the following:
Use transactions and logging with automatic recovery.
Use logging and application-specific recovery.
Edit a copy of the database, and use system operations (for example, the POSIX rename system call) to ...