Explain processing a data file, C/C++ Programming

Assignment Help:

Explain Processing A Data File?

Mainly data file applications needs that a data file be altered as it is being processed. For instance in an application involving the processing of customer records it perhaps desirable to add new records to the file either at the end of the file or interspersed among the existing records to delete existing records that to modify the contents of existing records or to rearrange the records and these requirements in turn suggest numerous different computational strategies.

Consider for instance the problem of updating the records within a data file. There are numerous approaches to this problem. Maybe the most obvious approach is to read each record from a data file update the record as necessary and then write the updated record to the same data file. But there are some troubles with this strategy. In particular it is hard to write and read formatted data to the same data file with no disrupting the arrangement of the data items within the file. Furthermore the original set of records may become unapproachable if something goes wrong during the program execution. Another approach is to work with two diverse data files - an old file (a source) and a new file. Every record is read from the old file the updated as necessary and then written to the new file. When each and every one of the records have been updated the old file is deleted or placed into archival storage and the new file renamed. Therefore the new file will become the source for the next round of updates.

 


Related Discussions:- Explain processing a data file

Super ASCII string cost, string will contain only lower case alphabet& the ...

string will contain only lower case alphabet& the ascii value starts from 1-26,(ie,a=1&z=26).it perform the operation like the following costs:add=2units,replace=1unit,delete=3unit

Program, Data array A has data series from 1,000,000 to 1 with step size 1,...

Data array A has data series from 1,000,000 to 1 with step size 1, which is in perfect decreasing order. Data array B has data series from 1 to 1,000,000, which is in random order.

Program, salotion of programes

salotion of programes

C program to find vowels , C Program to FIND VOWELS   void main() ...

C Program to FIND VOWELS   void main() {           char str[50];           int ac=0, ec=0, ic=0, oc=0, uc=0;           int i,stln,vc,word=1;           clrscr

Lcm code, full coding for lcm in c++

full coding for lcm in c++

Program is to reverse the names stored in an array pointer, Program is to r...

Program is to reverse the names stored in an array pointer: Program is to reverse the 6 names stored in an array pointer as name[] void main()   {  clrscr();  char

Define types of storage classes in c language, Define Types of storage clas...

Define Types of storage classes in C language? There are four storage classes in C language: 1. Automatic storage class. 2. External storage class. 3. Register storage cla

C program to compute the factorial, Write a C program to compute the factor...

Write a C program to compute the factorial of  5 i.e 1x2x3x4x5 etc #include stdio.h   void main()   {   char promt;      int factor;   factor = 1*2*3*4*5;   printf("The fac

Last ant on rod, There are ''n'' ants on a ''n+1'' length rod. The ants are...

There are ''n'' ants on a ''n+1'' length rod. The ants are numbered from 1 to n and are initially placed at positions starting from position 1 till position n. They are moving eith

C with thread , #I have assignment c with unix thread multiplication progr...

#I have assignment c with unix thread multiplication program ..

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd