A data file is a
computer file
A computer file is a computer resource for recording data in a computer storage device, primarily identified by its file name. Just as words can be written to paper, so can data be written to a computer file. Files can be shared with and transfe ...
which stores data to be used by a computer
application or
system
A system is a group of Interaction, interacting or interrelated elements that act according to a set of rules to form a unified whole. A system, surrounded and influenced by its environment (systems), environment, is described by its boundaries, ...
, including input and output data. A data file usually does not contain instructions or code to be executed (that is, a
computer program
A computer program is a sequence or set of instructions in a programming language for a computer to execute. Computer programs are one component of software, which also includes documentation and other intangible components.
A computer program ...
).
Most of the computer programs work with data files.
Types of data files
Data files can be stored in two ways:
* Text files;
* Binary files.
Text files
A text file (also called ASCII files) stores information in
ASCII
ASCII ( ), abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because of ...
characters. A text file contains human-readable characters. A user can read the contents of a text file or edit it using a text editor. 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 text document (often .txt)
Binary files
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.
Examples of binary files
*A JPEG image (.jpg or .jpeg)
Data file categories
Closed data file formats, frequently referred to as
proprietary format files, have their
metadata
Metadata is "data that provides information about other data", but not the content of the data, such as the text of a message or the image itself. There are many distinct types of metadata, including:
* Descriptive metadata – the descriptive ...
data element
In metadata, the term data element is an atomic unit of data that has precise meaning or precise semantics. A data element has:
# An identification such as a data element name
# A clear data element definition
# One or more representation terms
# ...
s 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 format files have their internal structures available to users of the file through a process of
metadata publishing Metadata publishing is the process of making metadata data elements available to external users, both people and machines using a formal review process and a commitment to change control processes.
Metadata publishing is the foundation upon which a ...
. Metadata publishing implies that the structure and
semantics
Semantics (from grc, σημαντικός ''sēmantikós'', "significant") is the study of reference, meaning, or truth. The term can be used to refer to subfields of several distinct disciplines, including philosophy
Philosophy (f ...
of all the possible data elements within a file are available to users.
Examples of open data files include
CSV,
XLS and
XML
Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. T ...
formats such as
HTML
The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScri ...
for storing web pages or
SVG for storing scalable graphics.
See also
*
Index file
A database index is a data structure that improves the speed of data retrieval operations on a database table at the cost of additional writes and storage space to maintain the index data structure. Indexes are used to quickly locate data without ...
*
Indexed file
An indexed file is a computer file with an index that allows easy random access to any record given its file key.
The key must be such that it uniquely identifies a record. If more than one index is present the other ones are called ''alternat ...
*
Database
In computing, a database is an organized collection of data stored and accessed electronically. Small databases can be stored on a file system, while large databases are hosted on computer clusters or cloud storage. The design of databases sp ...
*
Serialisation
In computing, serialization (or serialisation) is the process of translating a data structure or object state into a format that can be stored (e.g. files in secondary storage devices, data buffers in primary storage devices) or transmitted (e ...
References
{{DEFAULTSORT:Data File
Computer files
Data types