Help with calculated data

Gmoz

Registered User.
Local time
Today, 23:47
Joined
Jun 10, 2001
Messages
34
I know it is said that you should not store calculated data in tables so I need some input on how to go about a problem I am having.

I am creating a DBase with some aircraft info in it. The DBase will be around for awhile so I plan to implement so sort of archiving later on.

The problem is one piece of info I am tracking is flight hours for the aircraft along with hours on certain components. I have a table with info pertaining to each aircraft by number (1 record per aircraft) one of the fields is total current flying hours. I have another table that has individual flight info including number of hours per flight. I want to add the individual flight hours with the total flight hours to get a new total flight hours. Easy with a query but if I get rid of old flights then how will you add them in the query. The only thing I can think of now is to save the newly summed number in the table which is supposedly taboo. Same with the components if it is on the aircraft during the flight it needs to get the new flight hours on it also .

Sorry if this is trivial but any ideas on how this should be done would be great.

Thanks in advance.
Frank
 
Frank, One way to do this is to modify the flight hours table so that each record is marked as either an actual flight data or balance carry-over type record.

Would something like this work or are you too far into devolpment?
 
I am pretty far but I want it right I have done several DBases but I am in no way an expert, with that being said I am not sure what you mean by balance carry-over type record?

Thanks for the quick responce
 
I work for a major airline in the parts department so I'm kind of aware how some of this stuff works with rotable aircraft parts, etc.

I guess it would be best to start back from scratch so I can get a better understanding of how you have your db set up.

a. Most all of these parts has a serial number that stays with the part through out it's life.
b. They have overall life span in cycles and/hours
c. They have cycle/hour time limit at which point they must be overhauled to cmm (component maint. manual) specs.
d. When a part breaks or runs out of cycles/hour, it becomes 'unserviceable'
e. Biggie - At some point, the FAA is going to have to sign off on this parts cycle/hours tracking system you're building...

Is this basically how your system works?
 
Yes and no there will be no FAA I am actually in the Air Force and I am creating a simple tracking system for a foreign Air Force until they learn what info they need to track and purchase a professional DB.
 
Oh well - I probably jumped in to far...

Where ro you need to see the total hours? I would think it would be you could do this in a function:

Send the function the ship#. The function does a dsum() on the hours table and a dlookup on the ship table and adds the two.

Make sense?
 
OK but still where do I store the new total hours number? Do I put it in a table or what?
 
Hum...

I must have missed something. You have a table with aircraft data. One of the fields is the 'time' the aircraft initially had on it. In the second table, the flight hours table you store an 'hour's value. There may be multiple records in this table that relate back to the aircraft tabel. So you sum these and add it to the initial value in the aircraft table. I guess the answer would be that you don't store the new, total value. You let the db calculate it each time you need the value.

???
 

Users who are viewing this thread

Back
Top Bottom