Overview
After implementation, it's often the case that you or your client finds that an application requires modification. Even a well-designed application may at some time need to be revised. This unit will help you to understand how to amend a database application as required to meet you client's requirements.
Amending an application
If you designed your application well, according to your client's requirements, why would you need to change it?
Modifications may be required for any of the following reasons:
- to remove errors or limitations
- to account for new or changed data
- to add new features
- to improve usability and productivity
- to streamline the application
- to facilitate the interaction of the application with other programs.
Types of changes
Some changes will be 'cosmetic' and easy to achieve, such as redesigning a form. Other changes, such as expanding the scope of the application to include new tables and reporting functions, may seem simple (especially to a client) but can actually require significant work. Some changes may even require the complete redesign of the application. Implementing changes at different stages of the development process will have varying consequences. In general, it's more difficult to make modifications once relationships have been established between the tables and data has been entered.
Making amendments to an application mirrors the development cycle discussed in an earlier topic, with the added provision that modifications must integrate seamlessly with the existing application. The application amendment cycle can be broken down into the following stages:
- consultation and analysis
- design
- implementation
- testing
- delivery.
Consultation and analysis
Initially you'll need to meet with the client or obtain a brief and any supporting materials, detailing the changes required. You then need to consider how you can provide a solution to the client's needs in the context of the existing application. This involves determining the feasibility and potential impacts of the proposed modification. You should ensure that:
- The modification is technically possible.
- The scope of the modification has been determined. For example, in a multi-user application that stores data on a server, changes to the data structures on the server (back-end) will affect the entire application, whereas changes to the front-end (the users' forms and reports) are more trivial.
- Existing data is preserved. If existing data and relationships are affected by the modification, what measures can you take to ensure that data integrity is maintained?
- The modification won't conflict with other parts of the application.
- The application flexibility is retained. Will the modification limit the potential for expansion of the database at a later time?
Application performance will not be adversely affected by the modification.
Make sure you keep the client informed about the cost and delivery time for any proposed modifications. These are often the most important factors in your client's decision to proceed with the changes.
After completing the analysis and design phases, you can implement and test the modification. Remember to always document any changes you make.
The revised application
You should then be ready to deliver the revised application to the client. Again, this should be carried out in sequence:
- backup the previous version of application-this will allow you to roll back to the original version if you encounter problems.
- make a general backup of systems that may be affected-in case your revised.
- application has unforeseen effects on the system.
- install the amended application on the client's computer(s).
- provide training for users in the operation of the amended application, if required.
Making changes to the Tru Blue agency application
In previous activities you completed the required design for the Tru Blue Agency, and implemented a working database application (Agency.mdb). Now, the agency has decided to incorporate into its database additional information about the screening costs for its advertisements. Your supervisor has met with the agency and has given you details of the changes required. You will need to make the specified changes to your design and implement the modifications.
Supervisor report on Tru Blue Agency application amendments
The agency's Accounting Department regularly receives a text file called ScreeningRatesTable.txt from the cable TV station. The file contains details on the advertisement screening costs charged by the cable TV station, and is used by the agency Accounting Department to prepare client invoices.
Download the file and store it on your local computer with your other files for this subject.
The text file is supplied to the agency in a comma-delimited format. The screen shot below shows the data format.
You can see from the sample file above that as the daily screening frequency increases, there is a corresponding decrease in the price of each screening. For example, an advertisement that's screened once per day costs $245.00 per screening, whereas an advertisement that's shown ten times per day is discounted to $150 per screening.
The agency General Manager now wants to be able to use this information in the agency database. In particular, he has asked that the current 'Brand Manager Summary' report be amended to include the total screening costs for each advertisement.
The Accounting Department is responsible for receiving and maintaining the data about screening costs. As the department acts as the central control for this information, it's been decided to link the text file they receive to the existing Tru Blue database. This will ensure that the screening cost data used in the database is always up to date, and means that no extra data entry is required when the file is updated in the Accounting office.
The required amendments
To meet the client's requirements, the following amendments are needed:
- link the text file named ScreeningRatesTable.txt to the Tru Blue Agency database, Agency.mdb.
- create a relationship between the linked ScreeningRatesTable and the tblAds table
- modify the qryBrandManagerSummary query to include a calculation of the total screening costs for each advertisement
- modify the rptBrandManagerSummary to use the new query.
Implementing the amendments-what you have to do
Now we'll look at the steps you'll need to take to carry out each of these tasks. To begin with:
- Make a back-up copy of your Agency.mdb database. Name the backup file AgencyBackup.mdb.
- Download the text file named ScreeningRatesTable.txt that contains the advertisement screening cost data.
- Open your original database Agency.mdb.
Linking the screening rates file to the database
The next step is to link the ScreeningRatesTable.txt file to the database.The following steps briefly describe how to link the file. Linking is covered in another topic. If you are unfamiliar with this, refer to the MS Access in-built help.
- In the open database, choose File > Get External Data > Link Tables.
- Complete the first Link dialogue box as follows:
- Continue with the Link Text Wizard as follows:
- Open the linked table in the database and check that the data is correctly displayed, as shown below:
- use the Look in box to navigate to the folder in which you've stored the text file
- from the Files of Type box, choose the Text Files format from the drop-down list
- select the file ScreeningRatesTable.txt and click the Link button. Access will launch the Link Text Wizard.
- at the first wizard screen, select the Delimited option, then click Next
- at the second wizard screen select the Comma radio button and the First Row Contains Field Names tickbox, then click Next
- at the third screen check that fields Screening Frequency and Rate are shown, then click Next
- the final wizard screen will display the name of the linked file. Click Finish. Access will link the file to the database and display the file name in the database window.
Relationships and queries
1. Now set the relationship between tblAds table and the linked ScreeningRatesTable, using the common field Screening_Frequency. Save the relationship. Note that you cannot set referential integrity for a linked table.
2. Check your version of the qryBrandManagerSummary query against the feedback in the queries suptopic. If your version is different, correct it now.
3. Make a copy of the qryBrandManagerSummary query, and name it qryNewBrandManagerSummary.
4. The Brand Managers at the agency want to know the total screening costs for each advertisement. In the queries subtopic we added a calculated field called Total_Screenings. To calculate the total screening cost for each ad we need to multiply the total screenings by the Rate from the ScreeningRatesTable. Modify the qryNewBrandManagerSummary query by:
- adding the ScreeningRatesTable table using the show tables button
- a new calculated field that multiplies Total_Screenings by the Rate. Name the field Total_Screening_Cost
- save the modified query.
Modifying the report
1. Make a copy of the rptBrandManagerSummary, and name it rptNewBrandManagerSummary.
2. Modify the the rptNewBrandManagerSummary report:
- in design view, using the Properties window, change the Record Source property of the report to qryNewBrandManagerSummary. This tells Access to use your new query.
3. Run the report and check that your calculated fields are functioning correctly, and that all fields and labels are clearly displayed. You may need to adjust the width and position of your columns.
4. Add the new report to the database switchboard.
5. Print a diagram of the relationships, showing the new linked table, for future reference.
- If you have not already done so, you will need to change the printer page orientation to landscape so that you can fit in the extra column easily. Select File > Page Setup to set the printer page orientation.
- Add a new column to the qryNewBrandManagerSummary report that shows the Total_Screening_Cost calculated field. Make it the rightmost column.
- Save the modified report.
Summary
In this topic is shown about even a well-designed application may require modification. This may be required to:
- remove errors or limitations
- account for new or changed data
- add new features
- improve usability and productivity
- streamline the application
- facilitate the interaction of the application with other programs.
No comments:
Post a Comment