Saturday, May 22, 2010

C++ for beginners?

Why would sequential file access be a valuable skill for a programmer?





would a sequential file access faster than a index (with keys) file access?





what is a good example of data storage outside of a program?





your help please

C++ for beginners?
Hi Sfr,





Data storage outside of a program might entail the data on either hard drives or floppy drives, or tape.





Sequential file access is of critical importance to a programmer. Oftentimes, data from outside sources comes on either a floppy disk or a tape. In the case of data on tape, the data has to be sequential, as there is no efficient way of randomly accessing data on the tape.





Oftentimes programs will read a database using the parameters given in a program. This data can then be written to tape for export, or stored temporarily on disk to be merged with another sequential file. The merged data is either printed, or written to tape for use in another program.





These kinds of activities take place every day in a computer center.





I'm not sure about your speed question. My guess (and that is all it is) is that a plain sequential file would take less time then reading via keys. I think I would need to know more information before I can really give you a good answer.





I hope this helps,





James :-)
Reply:sequential file access - There are still many, many programs that access data sequentially from files.





For example, there are programs that read, process, and summarize apache log files. There are programs that read and sequentially process large XML files.





speed - When reading in large amounts of data that exceed the physically memory of a computer, sequential file access is faster than an index file access. One reason is because with sequential access, data can be retrieved more efficiently from the disk drive.





good example of data storage outside of a program.


1) any program that stores data in a database.


2) any Windows XP program that stores configuration information in the Windows registry.


No comments:

Post a Comment