Next | Lightweight Databases | 20 |
We'll see many different methods for searching and maintaining flat files
They all have tradeoffs
Some support quick searches
Some support quick modifications
There's always a tradeoff
Copy the file
Add record S Delete record S Modify record S
Here S is the size of the file
This means that it takes about twice as long to deal with a file that is twice as big.
Successful search S/2 Unsuccessful search S
On average, we only have to search half the file if the record is there
But the whole file if not
Next | Copyright © 2003 M. J. Dominus |