Data File in Programming Context

Only available on StudyMode
  • Download(s) : 41
  • Published : April 29, 2013
Open Document
Text Preview
What is a data file in programming context?
A file is referring to a permanent data/information storage space which is to exist in the secondary storage device like harddisk, portable pen-drive, optical media, et cetera. (Data located in memory (RAM and cache), primary storage, will vanished once the computing equipment losses power supply). How many type of presentation a file may have?

Data is Files existed in two presentations: Text mode and Binary mode. Text mode: easily readable and modifiable using text editor like MS notepad, MS wordpad. The content is decoded into human understandable texts. Binary mode: natural binary code is stored directly from the system as to how the data is presented in the operation memory. The retrieval and modification is troublesome because you will need specific software to do it. The file content existed in certain format. Examples of such files are database file, program file, and any files other than text files.

What are the types of file access?
Two types: sequential access and Random access.
Sequential file access is referring to record to record access from the beginning of a file to the end (“head to toe”). It means if you wanted to find a record (e.g. a particular word), you have to word by word starts from the first point of the file, one-by-one until you found it.

Random access of a file exhibits a method for specific content of a location in a file to be read/access directly without the need to start from the last stop points. The locator (file pointer) may jump directly from one stop point to another in order to read a record if the address of the said record is known.

Random access can further be distinguished to two categories: indexed and non-indexed. An example for the indexed random access file is database file. A separate index file (catalogue) is keep and maintained every time a new record was added or an existing record is deleted. This method enables the record to be found in a very short time....
tracking img