HP3000-L Archives

December 1998, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Bruce Toback <[log in to unmask]>
Reply To:
Bruce Toback <[log in to unmask]>
Date:
Wed, 2 Dec 1998 11:33:27 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (53 lines)
X-no-Archive:yes

Stan writes:

>Does this mean, however, that the data being added or updated (or read
>and acted on) is correct?  It depends.  You're gambling that the
>DB administrator, when he/she added the new field(s), was correct in
>assuming that the application (program *AND* database) would work
>correctly absent the knowledge of the new field.
>
>If the new field is, for example, an employee birthdate, and the
>"add new employee" application isn't updated to know about the field,
>then by definition any entries added (via DBPUT) will have empty
>values for the birthdate.

That's the job of the DB administrator: to know the function of each data
item, its source and its uses. The DB administrator didn't assume
anything about the applications; s/he knew.

>As Steve Cooper preached, decades ago (wow!), the correct method is to
>have the application open the database, use DBINFO to determine the
>structure of the datasets, and then (perhaps) REFUSE TO RUN if the
>structure changed.

This results in a very brittle system, and negates most of the reasons
for using a DBMS in the first place. You'll catch *some* errors made by
the DBA, but at a huge cost in program flexibility and maintainability.
Now, every program has to be modified to contain the correct compiled-in
constant record lengths, data set counts, and so on. Okay, so you wrote a
script to do that. Who maintains the script, and who catches errors in
it? And if the script blindly changes all programs, what have you gained?
You just masked the DBA's error, and are in the same position you started
in -- except that now, you're using a faulty procedure with complete
confidence.

If your DBA has properly done their job of mapping the real world to the
database, Stan's hypothetical situation will not happen. And if your DBA
has not done their job properly, the programming issue is the least of
your problems.

-- Bruce


--------------------------------------------------------------------------
Bruce Toback    Tel: (602) 996-8601| My candle burns at both ends;
OPT, Inc.            (800) 858-4507| It will not last the night;
11801 N. Tatum Blvd. Ste. 142      | But ah, my foes, and oh, my friends -
Phoenix AZ 85028                   | It gives a lovely light.
btoback AT optc.com                |     -- Edna St. Vincent Millay
Mail sent to [log in to unmask] will be inspected for a
fee of US$250. Mailing to said address constitutes agreement to
pay, including collection costs.

ATOM RSS1 RSS2