Information Technology Reference
In-Depth Information
11. Updating fields
Before we proceed into updating fields in the account file, let us talk about some
possibilities. We could create a second program that could be used for updating the fields
or we could incorporate the options into the inquiry program. The advantage of two
programs is that we would keep each process separate and thus the logic for each program
would be less complex. On the other hand, m any of the same processes will be in each
program so perhaps a single program would be better. With the latter option, all the code
would be in one place, which means that if changes have to be made they would be done
in a single place. If we had two progr ams then we could miss changing one when there
were changes to the other.
Either having one or two programs is an acceptable choice. Obviously any system
should be designed to make the person using it as comfortable as possible and it should
be able to be easily maintained. The choice is not an easy one and having both user-
friendly and easily maintained systems may not always be possible. One feature may have
to sacrificed for the other and much thought needs to go into how things will be handled.
In our system, account numbers will be generated by the computer. They could
have been created by people at the computer as they entered all the fields. The reason for
using the machine and not people is because this approach will be easier for the user
insofar as the computer will have knowledge of what numbers are available, as they are
needed. If ten people are entering data at ten different places for the account file and need
to put in a new account number, they may try one only to find that that value has already
been used. This effort could result in the person inputting information getting delayed
because he cannot find an unused account number.
What this choice means is that to accommodate this decision, we will have to
spend more time developing our program. There will be more work for the programmers,
but this will be well appreciated by the users. Since we do have computers, there's no
sense in not taking advantage of their power. In the process we should make every effort
to guarantee that our systems are maintained as easily as possible. We will talk more
about the assignment of account numbers at a later time.
Using a single program, our old inquiry program will now give us the ability to
change the values of certain fields on the account file. For now, there will be no update of
the account number field because this would equate to a delete of a record and an add of a
new one. Only the fields last name, first name and balance will be allowed to be changed
for discussion purposes. The other remaining fields could be changed in the same manner
so there is no need to show all of them in this program. You have to do it yourself but you
will get the idea from these three fields alone.
The beginning will not change as the user will enter the account number and the
account file will be checked to see if it exists. Entering a 0 will enable the user to exit.
This is the same as in our original inquiry program. Assuming the record exists, the fields
on the record will be displayed along with an additional message at the bottom of the
screen and there will be numbers to the left of the three fields that can be changed. In the
event that no changes are to be made, the operator can enter a 0 and now another account
number can be entered. All three fields can be modified or as few as one, but once a
Search WWH ::




Custom Search