SS 2 COMPUTER SCIENCE, EASTER TERM, LESSON 1: COMPUTER FILES.
A file is a collection of data or information that is related to each other I.e. it is a collection of related documents or papers that are arranged so that they can be consulted at ease.
Therefore, a computer file is a digital data that contains stored information, and stored in computer readable form. A file is a named collection of bits, usually stored on a disk; it possesses some properties such as size, owner, type, name, etc.
A computer file is digital information stored in a computer file format (electronic format) which is available to a computer programmer and is based on some kind of durable storage.
Computer files may be stored on the RAM, ROM, hard disk, CD-ROM, floppy disks, micro disks, flash disk, magnetic tapes, etc. Almost all information stored on computers is in the form of files.
Anytime the CPU (central processing unit) needs data from a file, it or when it requires to write data to a file, it keeps the file temporarily in its memory (I.e. tandom access memory) before working on the data and it later saves the data into a permnanent location when instructedvby the user.
A record is an account of an event or something preserved in a lasting form that can be consulted in future. A record is a written account of proceedings of something or an event.
In computer science, a record is also a collection of related items of information treated as a unit by a computer.
A record is a block of data read and written at one time without any relationship to records in a file. A record can also be a group of logical related fields regarded as a unit.
A field is an element of a database record in which a piece of information is stored. It can also be defined as an area of storage medium (usually a set of adjacents columns) used to record a type of information.
A data item is a single member of a data element. It is a unit of stored data in a field. It can also be regarded as a sub-unit of descriptive information.
Types of data items
Types of data items explain the various data that are commonly used in computer data processing. Computer data types are necessarily translated into machine-readable form of binary digits(0,1) before they can be processed.
Common data item types are:
1. Numeric data
2. Alphabetic data
3. Alpha-numeric data
4. Audio data.
It should be noted that in computer data is stored as binary numbers. All the data types are converted back to binary digits before they are processed and stored.
Numeric data is data consisting of digits (numbers or figures) and not letters or special characters. Numeric data can be used for calculations. They also include numeric notations.
Example: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, $50, £20,>, <,+, -, %!( factorial).
These are data types in form of letters as opposed to numbers or numeric dats. They also include alphabetic notations. They cannot be used for calculations. Examples, A, B, C, D, Z, ?,!.(exclamation marks).
This is a data type in form of letters and numbers( combination of numbers and alphabetic dats). They cannot be used for calculations. Examples: 20 km, 50k, plot 2 Flat 4.
File structure on the computer. Computer files are arranged in order. File are grouped into folders and a sub-folder can be created in a folder where in files can be kept.
To understand file structure, consider a hard disk drive to be a filing cabinet where file are kept for future use. A filing cabinet has dividers or drawers and folders within the dividers. The hard disk drive (driveC) is similar to the filing cabinet. The dividers can be likened to directories. There are sub-folders where in files are kept. The default shape of the windows folder is ‘yellow file’ shape. The windows explorer reveals a comprehensive file structure on a computer. It shows the (drives). (C:, A:, D:, E:, F:, etc) directories or folders, sub-folders, etc. When entries of data are made on the computer, they are temporary kept inside the RAM where the data are being handled for processing. The data inside the RAM is volatile, I.e.it is lost when there is power outage.