A couple of questions:
- Max number of entries you need to store?
- Max size of the entries?
- Is it ok if all entries in a "table" is of same size, or must they be
variable-sized?
- Must you be able to walk through the entries in different order without
loading the complete file to memory?
A lot of programs uses ordinary binary files for quite a lot functions.
They can handle many million entries. The are very, very easy to use as
long as each entry is of fixed size. Then it is possible to evaluate the
position of any entry in the file. However, in the file they are sorted in
the same order they were added, so to retrieve a customer from a phone
book, a lot of entries must be loaded to locate the entry for a specific
customer.
If you need more advanced functions, you are best of using a real
database, such as MySQL or similar. A simple alternative in the middle
might be to use Berkeley DB database files. It supports variable-sized
entries ordered on a single search index.
/Per W
On Wed, 25 Aug 2004, THAMAE wrote:
> Hi All!
>
> I am trying to develop a small database that reads and writes records to a text file and as I save more records to the file it gets corrupt. Is there an alternative to writing to a text file except advanced databeses such as Excel?
>
> Thanx all.
>
> Thamae
>
>
> ---------------------------------
> Do you Yahoo!?
> Y! Messenger - Communicate in real time. Download now.
|