|This article needs additional citations for verification. (December 2009)|
||This article may require cleanup to meet Wikipedia's quality standards. (February 2009)|
A data file is a computer file which stores data to be used by a computer application or system. It generally does not refer to files that contain instructions or code to be executed (typically called program files), or to files which define the operation or structure of an application or system (which include configuration files, directory files, etc.); but specifically to information used as input, or written as output by some other software program. This is especially helpful when debugging a program.
Most computer programs work with files. This is because files help in storing information permanently. Database programs create files of information. Compilers read source files and generate executable files. A file itself is a bunch of bytes stored on some storage device like tape, magnetic disk, Optical disk etc. The data files are the files that store data pertaining to a specific application, for later use.
Storage types of Data file
The data files can be stored in two ways:
- Text files.
- Binary files.
A text file (also called ASCII files) stores information in ASCII characters. A text file contains visible characters. One can see the contents of file on the monitor or edit it using any of the text editors. In text files, each line of text is terminated, (delimited) with a special character known as EOL (End of Line) character. In text files some internal translations take place when this EOL character is read or written.
Examples of text files
- A file containing a C++ program
A binary file is a file that contains information in the same format in which the information is held in memory i.e. in the binary form. In binary file, there is no delimiter for a line. Also no translations occur in binary files. As a result,binary files are faster and easier for a program to read and write than the text files. As long as the file doesn't need to be read or need to be ported to a different type of system, binary files are the best way to store program information.
Data file categories
Data files come in two broad categories: open and closed.
Closed data file formats Closed data (frequently referred to as proprietary format files) files have their metadata data elements hidden, obscured or unavailable to users of the file. Application developers do this to discourage users from tampering with or corrupting the data files or importing the data into a competitor's application.
Open data file formats Open data files have their internal structures available to users of the file through a process of metadata publishing. Metadata publishing implies that the structure and semantics of all the possible data elements within a file are available to users.