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

Algorithms, algorithm to find out all the factors of given positive integer...

algorithm to find out all the factors of given positive integers

Define difference among delete and delete[]?, when you allocate memory with...

when you allocate memory with new[], you ought to free the memory via delete[]. While you allocate memory along 'new', then use 'delete' with no the brackets. You employ new[] to a

C program for pattern star, 1 PETTERN1 (Pettern1.c)   main() { ...

1 PETTERN1 (Pettern1.c)   main() {           int i,j,k=1,a;           clrscr();           for(i=1;i           {                    if(i>=3)

Class and object, write a class player that contain attributes for the play...

write a class player that contain attributes for the player,s name,average and team

C program to allocate memory dynamically for 2-d array, Aim: To implement ...

Aim: To implement a program to allocate memory dynamically for 2 dimensional array (accept and print matrix) using pointers. Code:                       #include #inc

C++, superposition of two waves

superposition of two waves

Memory management system, 1. Basic Heap: Each memory location in our model ...

1. Basic Heap: Each memory location in our model of the RAM will be an instance of type Memory: 2. typedef union Memory_u Memory; 3. union Memory_u{ 4. char character;

Need to fix a code written in c++, Need to Fix a code written in c++,SDL2.0...

Need to Fix a code written in c++,SDL2.00 for high CPU and memory leak There is a 2D simple game written with SDL2.00 using c++. The game isn't complete and the code is a little

How comment symbols help in debugging the code, How does placing some code ...

How does placing some code lines between comment symbols help in debugging the code? - Placing comment symbols /* */ around a code separates some code that coder believes might

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