Slide 6.5: Data compression
Slide 6.7: Reclaiming space dynamically
Home

Record Modifications

File Structures:     An Object-Oriented Approach with C++ |0201874016|94.80|360|
 Learning WML   &   WMLScript |1565929470|17.48|12|
      XML in a Nutshell,     2nd Edition|0596002920|39.95|39|
  Java and XSLT |0596001436|26.37|890|
WAP Servlets:   Developing Dynamic Web Content With Java and WML|047139307|32.99|4|
   WAP Development with WML and WMLScript|0672319462|18.99|56|
Advances in Security and Payment Methods for Mobile Commerce|1591403456|89.95|182|
Assume that you want to replace the value 4 of the quantity field of the record “WAP Servlets” by a value 10. The question is how you write a 2-byte-long data to a 1-byte-long field without causing too much trouble. In general, file modifications can take any one of three forms: Record Deletion and Storage Compaction
When a record is deleted, we want to reuse the space. A simple way for us to recognize records as deleted is to place a special mark in each deleted record, e.g., we might place an asterisk as the first field in a deleted record.
File Structures:     An Object-Oriented Approach with C++ |0201874016|94.80|360|
*|earning WML   &   WMLScript |1565929470|17.48|12|
*|    XML in a Nutshell,     2nd Edition|0596002920|39.95|39|
  Java and XSLT |0596001436|26.37|890|
*|P Servlets:   Developing Dynamic Web Content With Java and WML|047139307|32.99|4|
*| WAP Development with WML and WMLScript|0672319462|18.99|56|
Advances in Security and Payment Methods for Mobile Commerce|1591403456|89.95|182|
Storage compaction makes files smaller by looking for places in a file where there is no data at all and recovering this space. The simplest way to do this is through a file copy program that skips over deleted records.
File Structures:     An Object-Oriented Approach with C++ |0201874016|94.80|360|
  Java and XSLT |0596001436|26.37|890|
Advances in Security and Payment Methods for Mobile Commerce|1591403456|89.95|182|
The reclamation of space from the deleted records happens all at once. The decision about how often to run the storage compaction program can be based on either the number of deleted records or the calendar.