5. Database housekeeping
5.1.1 Compact the database
It is a good practice to compact the database at least once a week. The main reason is that it makes the application more efficient. In the same time, it saves your computer’s memory space. However, if you feel that your computer is responding unexpectedly slow, you might consider compacting the database more frequently. Following is the description on how to compact database (For office 2000 users please see section 5.2.2).
Figure 5.1
Step 1. Go to the directory C:\invoice\maintenance and click on the maintenance. And the above screen (figure 5.1) will appear.
Step 2. For Office 97 users, click on Compact database. And the following screen will appear (figure 5.2).
Figure 5.2
Step 3. From the Database to Compact From screen, click on the indicator Look in and locate the file Invoice in the directory C:\invoice.
Step 4. Click on the file Invoice, and the file will be highlighted. Now, click on the Compact button located at the right side of the form.
Step 5. Upon clicking on Compact, you will notice that the title of form will change from "Database to Compact From" to "Compact Database Into". Ensure that at the indicator Save in is indicating the directory invoice, and click on the file Invoice. The File name indicator should then indicate Invoice.
Step 6. Lastly, complete the process by clicking on Save. And when prompt to replace existing file, click on Yes.
5.1.2 Backup the database
Database should be backup incase when previous data is needed for reference or emergency recovery. The frequency of backing up the database will largely depend on user’s needs. As the information captured in the system is relatively important, it is advisable to backup your data on daily basis. And always keep a monthly master copy. To backup the database, simply go to the directory at C:\invoice and copy the file Invoice to a secondary storage (it can be your hard disk, but my advice of a secondary storage is to have a read and write CD-ROM specified in section 2). Note the procedure for backup is the same for both Office97 and Office2000.
5.1.3 Restore the database
The idea of restoring a database here is to remove the unwanted database and replace it with the desired one. The process is relatively simple. Note the procedure for backup is the same for both Office97 and Office2000.
Step 1. Go to the directory C:\invoice
Step 2. Remove the unwanted file Invoice
Step 3. Copy the desired database that contains the data of quotation and invoice from your secondary storage to the directory C:\invoice.
Step 4. Ensure the desired database copied is named as Invoice
5.2 Repair corrupted database
The database might be corrupted due to accident, such as: power failure and unexpected termination of program. Whatever, the cause of the corruption, it is possible to rescue it by performing the following. However, if the following procedure fails, you will need to use your backup database to restore your existing database as explained in section 5.1.3. If you are using Office97 see section 5.2.1, and if you are using Office 2000 see section 5.2.2.
5.2.1 Office 97 users
Step 1. Similar to compacting database, go to the directory C:\invoice\maintenance and click on the maintenance. The screen, as depicted in Figure 5.1, will appear.
Step 2. For Office 97 user, click on Repair database. And the following screen will appear.
Step 3. From the Repair Database screen, click on the indicator Look in and locate the file Invoice in the directory C:\invoice.
Step 4. Click on the file Invoice to highlight it. Now, click on the Repair button, which is located at the right side of the form.
Step 5. Upon invoking the Repair button, if the repairing is successful, a pop up box should indicate that it is successful. Lastly, end the session by clicking on Ok to close the message box.
Note that for Office 2000, compact and repairing of database has been integrated as a single procedure.
Step 1. Go to the directory C:\invoice\maintenance and click on the maintenance. The screen, as depicted in Figure 5.1, will appear.
Step 2. Click on Rescue 2000
Step 3. From the menu, select Tools
Step 4. Select Database Utilities
Step 5. Select Compact and Repair Databases. And the form "Database to Compact From" will appear.
Step 6. From the "Database to Compact From", click on the indicator Look in and locate the file Invoice in the director C:\invoice.
Step 7. Click on the file Invoice to highlighted it. Now, click on the Compact button.
Step 8. Upon clicking on Compact, you will notice that the title of form will change from "Database to Compact From" to "Compact Database Into". Ensure that at the indicator Save in is indicating the directory invoice, and click on the file Invoice once again. The File name indicator should then indicate the file Invoice.
Step 9. Complete the process by clicking on Save. And when prompt to replace existing file, click on Yes.
Step 10. Lastly, end the session by clicking on the crossed box that is located at the top right corner of the screen.