You only have to do "Garbage Collection" when a lot of records have been deleted and you need more space to add new records.
"Garbage Collection" might be ok to use if it is automatically performed (with no user intervention).
For example, if you were setting up a mail list database you would need one field each for name, address, city-state, and zipcode.
Next decide how many characters will be allowed for each field (25 for name, 30 for address, 25 for city-state, and 5 for zipcode).
By Dave Kelly, Mac Tutor Editorial Board There are two types of data files that can be created and used by your MS Basic program: sequential files and random access files.
Sequential files are used more often because they are easy to create, but random access files are more flexible and data can be located faster. Before we begin our discussion of random access file I/O, I suggest that you refer to those pages.
First, you should decide just what data you have to store.It is NOT desirable for the user of your program to have to keep track of this kind of file handling (when to collect garbage and when not to).When a record is added to the datafile, a new index entry should be created and the new record should be added to the random access file (either as a new record or replacing a previously deleted record).A large sequential file could take quite a bit of time just to read and write to the disk.Next you should consider how you want to access each record of your random access file.It requires more work to organize a random access file.The organization of the random access file is up to you.The total length of an individual record would then be 85 characters.Now decide how many individual records you expect to have in the file.A discussion of sequential file I/O operation begins on page 45 of your MS Basic manual (ver. The purpose of this column is to help you develop an understanding of random access I/O and how to use it in your own programs.It is very easy to understand how data is structured in sequential files.