Database Maintenance
All databases need
routine maintenance. When you add and delete objects in a database, the
files may become fragmented. This can happen when you add or delete
records in a table. It also occurs when you add and delete Form Fields,
Combo Boxes, or Labels.
In Microsoft Access, the
command is called: Compact and Repair. When you compact an Access
database, this utility will copy your file and arrange the database bits
and bytes more efficiently on your hard drive. Compacting makes the
database run faster.
For example, let's say
that you added ten new
records to a table with 360 records and then deleted the last ten.
Compacting resets the Auto Number so that the next record will be one
number more than the last record. In our example, the next new record
will be numbered 361.
Why does a database need
to be repaired? Databases can become corrupted if they are shut down
unexpectedly: e.g. the power goes out when you are editing a
record. Network problems can also trash a database. Sometimes,
switching back and forth from Design to Form View can make a database
act goofy.