0% found this document useful (0 votes)
9 views20 pages

Csc0222024

The document outlines the concepts of file organization and management in computing, including definitions of bits, bytes, fields, records, and files. It explains various file formats, file processing operations, and the hierarchical organization of files and directories. Additionally, it discusses the role of file systems in managing and manipulating files, emphasizing the importance of understanding file structures for effective data handling.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views20 pages

Csc0222024

The document outlines the concepts of file organization and management in computing, including definitions of bits, bytes, fields, records, and files. It explains various file formats, file processing operations, and the hierarchical organization of files and directories. Additionally, it discusses the role of file systems in managing and manipulating files, emphasizing the importance of understanding file structures for effective data handling.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

CSC022: File Organization and Management

The objectives of this study is to understand:


• The concept of File in computer
• The meaning of bits, byte, field and record in relation to file
• The File processing operations such as seek, read, write, fetch, insert, delete and update.

File Concept in Computing


File is considered as collection of bytes by many operating system. The byte which is series of
binary digits may represent integer values or text characters, or anything else; where the content of
the file is considered at higher level. For instance: “John is 10 years old”. Each of the character /
value in this statement is a byte which can be represented in computer as bits of ’0’s and ‘1’s.
The program using a file should be able to understand the internal layout of information in the file
and present it to a user as more meaningful information (like text, images, sounds, videos and so).
The file size is normally expressed in bytes which indicated how much storage is associated with
the file. In most modern operating systems the size can be any whole number up to a system limit.
Information in a computer file can consist of smaller packets of information, known as "records" or
"lines" that are individually different but share some trait in common. For example, a student file
might contain information concerning all the students in an institution and their details (such as
profile and academic records); each record in the student file concerns just one student and all the
records have the common trait of being related to student information such as student Matric No,
Name, department, year of admission and so on. This is just like keeping students’ information in
file cabinet inside department/faculty office.
A text file may contain lines of text, corresponding to printed lines on a piece of paper. Alternatively,
a file may contain an arbitrary binary image (a BLOB) or it may contain an executable code.
The way information is grouped into a file depends on file creator, that is why there is a plethora of
more or less standardized file structures for all imaginable purposes, from the simplest to the most
complex. Most computer files are used by computer programs which create, modify and delete files
for their own use on an as-needed basis. The programmers who create the programs decide what
files are needed, how they are to be used and their names.
In some cases, computer programs manipulate files that are made visible to the computer user. For
example, in a word-processing program, the user manipulates document files that she names herself.
The content of the document file is arranged in a way that the word-processing program understands,
but the user chooses the name and location of the file, and she provides the bulk of the information
(such as words and text) that will be stored in the file.
Many applications pack all their data files into a single file, using internal markers to discern the
different types of information contained within. Files on a computer can be created, moved,
modified, grown, shrunk and deleted. In most cases, computer programs that are executed on the
computer handle these operations, but the user of a computer can also manipulate files if necessary.
For instance, Microsoft Word files are normally created and modified by the Microsoft Word
program in response to user commands, but the user can also move, rename, or delete these files
directly by using a file manager program such as Windows Explorer.
Different File Formats
A file format is a standard way of storing data on a computer file. This structured format of storing
a large variety of raw information enables easy data storage, processing and harnessing. The
knowledge of different types of file formats enable you to know the kind of file to use for any work
you want to do.
Most common file formats are:
Text
Text files contain only text without any formatting and can be opened with any text editor. Different
types of text formats include: .doc, .docx, .rtf, .pdf, .wpd.
Image
This file type includes binary information about images and defines how image will be stored and
compressed. Image file format include .JPEG, .PNG, .GIF, .HEIF.
Audio
This file format stores audio data. It stores raw data in encoded format and uses codec to compress
and decompress the file. Audio file formats include .aac, .mp3, .wav.
Video
This type of file contains digital video data. It performs losy compression to store video data where
audio and video are separately encoded and stored. Video file types include: .amv, .mpeg, flv, .avi.
Program file
This type of file format contain codes that can be run on a computer through compiling or
interpreting. The programming file format incudes: .c, .java, .py, .js
Compressed /Archive file
This format stores data in compressed form in the computer and cab used to transport. Different
types of compressed file format include: .iso, .rar, .tar, .7z
Web files
This file format includes information related to websites, web pages and server. This includes
programming scripts for static and dynamic web pages. This format includes: .html, .asp, .css, .xps
The meaning of bits, byte, field and record in relation to file
Bit:
A Bit is simply defined as binary digits, which has only two values, 0’s and1’s. Binary digit is a
basic unit of information storage and communication in digital computing and
digital information theory. The bit is the smallest unit of storage. The bit is also a unit of
measurement, the information capacity of one binary digit. It has the symbol bit, or b.

Quantities of bits
Name Standard Binary
(Symbol) SI usage

Kilobit (Kbit) 103 210


Megabit (Mbit) 106 220
Gigabit (Gbit) 109 230
Terabit (Tbit) 1012 240
Petabit (Pbit) 1015 250
Exabit (Ebit) 1018 260
Zettabit (Zbit) 1021 270
Yottabit (Ybit) 1024 280

Byte
A byte is a collection of bits, originally differing in size depending on the context but now
almost always eight bits. Eight-bit bytes, also known as octets, can represent 256
values (28 values, 0–255). A four-bit quantity is known as a nibble, and can represent 16
values (24 values, 0–15). A rarely used term, crumb, can refer to a two-bit quantity, and
can represent 4 values (2² values, 0–3).
"Word" is a term for a slightly larger group of bits, but it has no standard size. It
represents the size of one register in a Computer-CPU. In the IA-32 architecture more
commonly known as x86-32, 16 bits are called a "word" (with 32 bits being a double
word or dword), but other architectures have word sizes of 8, 32, 64, 80 or others.
Terms for large quantities of bits can be formed using the standard range of SI prefixes,
e.g., kilobit (kbit), megabit (Mbit) and gigabit (Gbit).

Byte
A byte is an ordered collection of bits, with each bit denoting a single binary
value of 1 or 0. It is the basic unit for measuring information storage. In many computer architectures
it is a unit of memory addressing, most often consisting of eight bits. It is equivalent to a
character/number such as A to Z, 0 to 9.
The size of a byte can vary and is generally determined by computer operating system or hardware,
although the 8-bit byte is the standard in modern systems. The byte size is the number of bits required
to represent a character in computer, thus we have 8-bit , 16-bit, 32-bit, 64-bit systems as case may
be.

Field
A field is simply defined as a combination of characters. It is an attribute that can be assigned values.
For example, Matric No, Name, Age, Gender, Date of birth, etc.

Record:
Record is the collection of organized and related fields.
For example: Fos/23/24/24780 John 16 12/07/2008
Foe/22/23/87623 Grace 18 23/05/2006
These are records of two students.

File
File is the collection of organized and related records.
The two records above can make up a file.

Database
Database is the collection of organized and related files. For instance, the collection of staff-file,
student-file & equipment-file of an institution is referred to as the Institution’s Database. This
collection of data organized for storage in a computer memory and designed for easy access by
authorized users. The data may be in the form of text, numbers, or encoded graphics.

Data organization can be summarized thus:


Bits byte filed record file database (in ascending order)

Identifying and organizing files


File as has been defined earlier is the collection of organized and related records. Files and folders
are hierarchically arranged. The name of a file known as filename is used to access it. In some
operating systems like windows operating system, filename is associated with the file itself while in
some others, the file is anonymous, and is pointed to by links that have names. In the latter case, a
user can identify the name of the link with the file itself, but this is not always correct especially
where there exists more than one link to the same file.
Files or links to files can be located in directories. However, more generally, a directory can contain
either a list of files or a list of links to files. Within this definition, it is of important that the term
"file" includes directories. This permits the existence of directory hierarchies, i.e., directories
containing subdirectories. A name that refers to a file within a directory must be unique meaning
that identical filenames are not allowed within a directory. However, in some operating systems, a
name may include a specification of type that means a directory can contain an identical name for
more than one type of object such as a directory and a file or files of different file type.
In environments in which a file is named, a file's name and the path to the file's directory must
uniquely identify it among all other files in the computer system.
No two files can have the same name and path. Where a file is anonymous, named references to it
will exist within a namespace.

Filename format
Allowable strings of characters for a filename depends on the computer being used. Early computers
allowed only few letters or digit in a filename while modern computers now allow long names up to
225 characters containing any combination of Unicode letters or digits. With this the purpose of the
file can be understood by mere looking at the filename.
Some computer systems allow file names to contain spaces; others do not.
Case-sensitivity of file names is determined by the file system. Unix file systems are usually case
sensitive and allow user-level applications to create files whose names differ only in the case of
characters.
Microsoft Windows supports multiple file systems, each with different policies regarding case-
sensitivity. The common FAT file system can have multiple files whose names differ only in case if
the user uses a disk editor to edit the file names in the directory entries. User applications, however,
will usually not allow the user to create multiple files with the same name but differing in case.
Computers with Microsoft Windows do not allow special characters like: (,),$,*.#,@,^,!,& and
others in a filename.
Many (but not all) computer systems use extensions in file names to help identify what they contain,
also known as the file type. On Windows computers, extensions consist of a dot (period) at the end
of a file name, followed by a few letters to identify the type of file. An extension of .txt identifies a
text file; a .doc or .docx as document file, .xls or .xlsx as spreadsheet., .db as database file.
extension identifies any type of document or documentation, commonly in the Microsoft Word file
format; and so on. Even when extensions are used in a computer system, the degree to which the
computer system recognizes and heeds them can vary; in some systems, they are required, while in
other systems, they are completely ignored if they are present.

File Organization
Most computers organize files into hierarchies using folders, directories, or catalogs. The concept is
the same irrespective of the terminology used. Each folder can contain an arbitrary number of files,
and it can also contain other folders. These other folders are referred to as subfolders. Subfolders
can contain still more files and folders and so on, thus building a tree-like structure in which one
"master folder" (or "root folder" — the name varies from one operating system to another) can
contain any number of levels of other folders and files.
Folders can be named just as files can (except for the root folder, which often does not have a name).
The use of folders makes it easier to organize files in a logical way.
When a computer allows the use of folders, each file and folder has both its own name and a path,
which identifies the folder or folders in which a file or folder resides. The special charater forward
slash “/” is used to separate the file and folder names.
For example, in the illustration shown in this article, the path /myDocument/myfiles/Passport
uniquely identifies a file called Passport in a folder
called Myfiles, which in turn is contained in a folder called myDocument. The folder and file names
are separated by slashes in this example; the topmost or root folder
has no name, and so the path begins with a slash (if the root folder had a name,
it would precede this first slash).

FILE PROCESSING OPERATIONS


A computer file is a resource for storing information, which is available to a computer program and
is usually based on some kind of durable storage. The durability of a file is based on its availability
for other programs to use after the current program has finished. Computer files can be considered
as the modern counterpart of paper documents which traditionally were kept in offices' and libraries'
files, which are the source of the term.

The various activities carried out on file is known as File processing operations. These operations
include:
i. File creation: This is the process of bringing file into existence.
ii. Searching: Searching is locating data in a file by reference to a special field of each
record/data called the key. The key is a unique file data used to identify certain record in a
file. If a record is to be inserted into a file, it must be given a unique key value.
iii. Retrieving/reading: This involves reading an existing data from a form of storage or input
medium.
iv. Writing: Writing is the act of recording data onto some form of storage.
v. Deleting: This means removing a record or item of data from a storage medium such as
disk/tape.
vi. File updating: This is an act of changing values in one or more records of a file without
changing the organization of the file. That is making the file modern by adding most recent
data to the file.
vii. Sorting: Sorting means rearranging data in either ascending or descending order. It involves
the arrangement of grouped data elements into a predetermined sequence to facilitate file
processing.
viii. Calculating: The arithmetic or logical manipulation of data in a file is referred to as
calculation.
ix. File querying/interrogating: This is retrieving specific data from a file according to the set of
retrieval criteria.
x. File merging: Combining multiple sets of data files or records to produce only one set,
usually in an ordered sequence is referred to as file merging.
xi. Reporting: Reporting is a file processing operation that deals with the production (printing)
of report from the file in a specified format.
xii. File display: The contents of a data file can be displayed either on the computer screen as
soft copy or printed on the paper as hard copy.
xiii. File storage: When a file is created, it is stored in the appropriate storage medium such as
disk, flash disk, tape, drum, etc.

Qualitatively file system performance in terms of fetch, insert, update and reorganization

FILE SYSTEMS AND FILE MANAGERS

File System
File system is the way a computer organizes, names, stores and manipulates files. It provides a
mapping between the logical and physical views of a file, through a set of services and an interface
hiding all the device-specific aspects of the file manipulation from the user. In computing, a file
system (often also written as filesystem). It is a method for storing and organizing computer files
and the data they contain for easy access. File systems may use a data storage device such as a hard
disk or CD-ROM and involve maintaining the physical location of the files,

The basic services of a file system include;


i. Keeping tract of file (knowing location)
ii. I/O support, especially the transmission mechanism to and from main memory
iii. Managing of secondary storage
iv. Sharing of I/O devices
v. Providing protection mechanisms for information held in the system
.
Most computers have at least one file system while some allow the use of several different file
systems. For instance, computers with newer MS Windows supports the FAT (File Allocation Table)
file system which was in MS-DOS and older version of Windows in addition to NTFS (New
technology) file system, the file system for Windows NT operating system and newer Windows for
storin and retrieving files on HDDs and SSDs (solid-state drives)

Each file system has its own advantages and disadvantages. Standard FAT allows only eight-
character file names (plus a three-character extension) with no spaces whereas NTFS allows much
longer names that can contain spaces. For example, you can call a file “Payroll records” in NTFS,
but in FAT you would be restricted to something like “payroll.dat” (unless you were using VFAT,
a FAT extension allowing long file names).
Most known file systems make use of an underlying data storage device that offers access to an array
of fixed-size blocks, sometimes called sectors. The file system software organizes these sectors into
files and directories, and keeps track of which sectors belong to which file and the ones not in use.
Most file systems address data in fixed-sized units called "clusters" or "blocks" which contain a
certain number of disk sectors (usually 1- 64). This is the smallest logical amount of disk space that
can be allocated to hold a file. However, file systems need not make use of a storage device at all. A
file system can be used to organize and represent access to any data, whether it be stored or
dynamically generated (e.g., procfs).

Features of File system

Filename
Whether the file system has a storage device or not, file systems have directories which associate
file names with files, usually by connecting the file name to an index in a file allocation table of
some sort, such as the FAT in a DOS file system, or an inode in a Unix-like file system. Directory
structures may be flat, or allow hierarchies where directories may contain subdirectories. In some
file systems, file names are structured, with special syntax for filename extensions and version
numbers. In others, file names are simple strings, and per-file metadata is stored elsewhere.

Metadata
This is information about a file within a file system. The information include:
• The length of the data contained in a file may be stored as the number of blocks allocated for
the file or as an exact byte count.
• The time that the file was last modified may be stored as the file's timestamp. Some file
systems also store the file creation time, the time it was last accessed, and the time that the
file's meta-data was changed.
• The file's device type (e.g.block, character, socket, subdirectory, etc.),
• File author or its owner user-ID and group-ID
• File access permission settings (e.g., whether the file is read-only, executable, etc.).
Arbitrary attributes can be associated on advanced file systems, such as XFS (high performance) file
system for Linux, ext2/ext3 (second/third extended file system), some versions of UFS (Unix file
system), and HFS+, using extended file attributes. This feature is implemented in the kernels of
Linux, FreeBSD and Mac OS X operating systems, and allows metadata to be associated with the
file at the file system level. This, for example, could be the author of a document, the character
encoding of a plain-text document, or a checksum.
For this study we are concentrating more on Windows operating system

Classes of File system


File system can be classified into:
i. Disk file systems,
ii. Flash file system
iii. Network file systems and
iv. Special purpose file systems

Disk file systems


These are file systems designed for the storage of files on a data storage device, such as disk drive,
which might be directly or indirectly connected to the computer. Examples of disk file systems
include FAT (FAT12,FAT16, FAT32), NTFS, HFS and HFS+, ext2, ext3, ISO 9660, ODS-5, and
UDF.
Some disk file systems are journaling file systems or versioning file systems.

Flash file systems


A flash file system is a file system designed for storing files on flash memory devices like your flash
drives, memory cards etc. As a block device layer, flash memory can emulate a disk drive so that a
disk file system can be used on a flash device, but this is not appropriate for the following reasons:
Erasing blocks: Flash memory blocks have to be explicitly erased before they can be written to. The
time taken to erase blocks can be significant, thus it is beneficial to erase unused blocks while the
device is idle.

Random access: Disk file systems are optimized to avoid disk seeks whenever possible, due to the
high cost of seeking. Flash memory devices impose no seek latency.
Wear levelling: Flash memory devices tend to wear out when a single block is repeatedly
overwritten; flash file systems are designed to spread out writes evenly.

Flash file system include JFFS2 (Journalling Flash File system2) and YAFFS(Yet Another Flash
File System). These are log-structured file systems that hold data and metadata in a log.

Network File Systems


A network file system is a file system that acts as a client for a remote file access protocol, providing
access to files on a server. Examples of network file systems include clients for the NFS (Network
File System), AFS (Andrew File System), SMB(Server Message Block) protocols, and file-system-
like clients for FTP and WebDAV (Web distributed Authority and Versioning,).

Special purpose file systems


These are most commonly used by file-centric operating system like Unix. Any file system that is
neither a disk file system nor network file system can belong to this class. In these systems, the files
are arranged dynamically by software, intended for such purposes as communication between
computer processes or temporary file space. Examples include the procfs (/proc) file system used by
some Unix variants, which grants access to information about processes and other operating system
features.

File system and Operating systems


Most operating systems provide a file system, as a file system is an integral part of any modern
operating system. Early microcomputer operating systems' only real task was file management — a
fact reflected in their names (see DOS).
Some early operating systems had a separate component for handling file systems which was called
a disk operating system.
There are different file system supported by different operating systems; for this course we are going
to concentrate more on file systems supported by windows operating system.

Windows makes use of the FAT and NTFS file systems.


The FAT filing system, supported by all versions of Microsoft Windows, was an evolution of that
used in Microsoft's earlier operating system (MS-DOS which in turn was based on 86-DOS). FAT
ultimately traces its roots back to the short-lived M-DOS project and Standalone disk BASIC before
it.
Over the years various features have been added to it, inspired by similar features found on file
systems used by operating systems such as Unix.
Earlier versions of the FAT file system (FAT12 and FAT16) had limited file name length of eight
(8) characters for filename and three(3) characters for extension which is referred to as 8.3 filename,
a limit on the number of entries in the root directory of the file system and restrictions on the
maximum size of FAT-formatted disks or partitions.
VFAT, which was an extension to FAT12 and FAT16 introduced in Windows NT 3.5 and
subsequently included in Windows 95, allowed long file names (LFN). FAT32 also addressed many
of the limits in FAT12 and FAT16, but remains limited compared to NTFS.
NTFS, introduced with the Windows NT operating system, allowed ACL-based
permission control. Hard links, multiple file streams, attribute indexing, quota tracking, compression
and mount-points for other file systems (called "junctions") are also supported, though not all these
features are well-documented.
Windows distinguishes one disk or partition from another at user level using drive letter abstraction.
For example, the path C:\WINDOWS represents a directory WINDOWS on the partition represented
by the letter C. The C drive is most commonly used for the primary hard disk partition, on which
Windows is usually installed and from which it boots.
It has been wrongly assumed in earlier versions of Windows that operating system was installed on
drive C. The tradition of using "C" for the drive letter can be traced to MS-DOS, where the letters A
and B were reserved for up to two floppy disk drives. Network drives may also be mapped to drive
letters.

The qualities of a good filing system


• Maintainable
• Complete
• Secure
• Accessible
• Reliable
• Readable
• Expandable
• Storage saving
• Portable, etc.

File manager
These are utility programs that allow you to manipulate files directly. They allow you to move,
create, delete and rename files and folders, although they do not actually allow you to read the
contents of a file or store information in it. Every computer system provides at least one file-manager
program for its native file system. Under Windows, the most commonly used file manager program
is Windows Explorer.

Data Retrieval process


The operating system calls on the Installable File System (IFS) manager. The IFS calls on the correct
FSD (File System Driver) in order to open the selected file from a choice of four FSDs that work
with different storage systems—NTFS,VFAT, CDFS (for optical drives), and Network. The FSD
gets the location on the disk for the first cluster of the file from the FAT (File Allocation Table),
FAT98, VFAT (Virtual File Allocation Table), or, in the case of Windows XP, the MFT (Master
File Table). In short, the whole point of the FAT, FAT98, VFAT, or MFT is to map out all the files
on the disk and record where they are located (which track and sector of the disk).

File sharing
Sharing files among users raises a major issue of protection. A general approach is to provide
controlled access to files through a set of operations such as read, write, delete, list and append. Then
permit users to perform one or more operations.
One popular protection mechanism is a condensed version of access list where the system recognizes
three classifications of users with each file and directory:
• User
• Group
• others

Storing files
In physical terms, most computer files are stored on some type of data storage
device. For example, there is a hard disk, from which most operating systems run
and on which most store their files. Hard disks are the most universal form of non-volatile storage
at the start of the 21st century. Files with only temporary information may be stored in RAM.
Computer files may be stored on magnetic tape. Files can also be stored on other media in some
cases, such as writeable compact discs, Digital Versatile Discs, Zip drives, USB flash drives, etc

Backing up files
When computer files contain information that is extremely important, a back-up
process is used to protect against disasters that might destroy the files. Backing
up files simply means making copies of the files in a separate location so that
they can be restored if something happens to the computer, or if they are deleted
accidentally.
Ways of backing up files
• Using utility programs provided by computer systems to assist in the back-up process. This
can become very time consuming if there are many files to safeguard.
• Copying files to removable media such as writable CDs or cartridge tapes.
• Copying files to another hard disk in the same computer to protects against failure of one
disk, but if it is necessary to protect against failure or destruction of the entire computer,
• Copying of the files must be made on other media that can be taken away from the computer
and stored in a safe, distant location.
• The Grandfather-Father-Son method automatically makes three backups, the grandfather file
is the oldest copy of the file and the son is the current copy.

File storage media


File storage media is a device that can receive data and retain it for subsequent retrieval. Such devices
cover a wide range of capacity and speed of access. The examples are;
Magnetic disk storage: This is available in many forms such as floppies, hard-disks, cartridge,
exchangeable multi-platter and fixed disks.

File organization method


There are various ways records can be organized on disk or tape. The main methods of file
organization used for files are:
a. Serial
b. Sequential
c. Indexed Sequential
d. Random (or Direct)
e. Serial Organization

a. Serial file organization:


In this method, records in file are stored and accessed chronological order, that is, as each record is
received it is stored in the next available storage position. It is only used on a serial medium like
magnetic tape. This type of file organization means that the records are not in any particular order
and so to retrieve a single record, the whole file needs to be read from the beginning to the end.
Serial organization is usually the method used for creating Transaction files (unsorted), Work and
Dump files.

Advantages
• It is simple
• It is cheap
Disadvantages
• It is cumbersome to access because you must go through all preceding records before getting
to what you are searching for.
• Wastage of space in medium in form of inter-record gap
• It cannot support high speed requirement for quick record access.

b. Sequential file Organization


Sequential files are serial files whose records are stored and accessed in a particular order using a
key field. Retrieving a record requires searching through the entire file sequentially, but because it
is sorted searching techniques like binary search can be used to reduce search time.

Advantages
• The sorting makes it easy to access records
• The binary chop technique can be used to reduce record search as much as fifty (50) percent.

Disadvantages
The sorting does not remove the sequential searching of other records before getting to required
record.
Like, serial method, it cannot support the modern technologies that require quick access to stored
records.
The requirement that all records be of equal size is sometimes very difficult to enforce.

c. Indexed Sequential file Organization


Indexed Sequential file organization is logically the same as sequential organization, only that here
the records are indexed. The index indicates the block containing the record which makes it to be
located by the computer. For example, on a magnetic drum, records are stored sequentially on the
tracks, but each record is assigned an index that can be used to access it directly. This is only possible
with disk files.

There are three major types of indexes used:


Basic Index: This provides a location for each record (key) that exists in the system.
Implicit Index: This type of index gives a location of all possible records (keys) whether they exist
or not.
Limit Index: This index groups the records (keys) and only provides the location of the highest key
in the group. Generally they form a hierarchical index. Data records are blocked before being written
to disk. An index may consist of the highest key in each block, (or on each track).

d. Random (or Direct) file organization method


This method allows randomly organization of file. The records are stored randomly but accessed
directly using a record key which determines where the record is stored in a storage medium.
Magnetic and Optical disks allow data to be stored and accessed randomly.

Advantages
• Quick retrieval of records
• Records can be of different sizes

Summary of file organization and access methods:


Access Method
File Organization Serial Sequential Random
Serial X
Sequential X
Indexed Sequential X X
Random X X

Classes of Files
Files are classified into:
i. Master File
ii. Transaction File
iii. Reference File
iv. Archive file
v. Data file
Master file:
A master file consists permanent data fields. The values of these fields must periodically be updated
so that the file will always contain the most recent transaction or affairs in the organization. For
instance, an employee file is made of records whose fields may include; Employee Number, Name,
Date of birth, Qualification, Salary grade, etc.

Transaction File:
This is a collection of transaction records. The data in this file is used to update the master file that
contains the data about the subject of the organization. (staff, students, etc.). Transaction files also
serve as audit trails and history of the organization.

Reference File:
In computer science, a reference is a value that enables a program to indirectly access a
particular data item, such as variable or a record, in the computer’s memory or in some other storage
device. Reference file contains data that are to be permanently stored. It stores data that are used as
reference for processing of transaction.

Archive file:
This file is also referred to as historical file as it contains old files/records which are currently not
useful or no longer useful. For instance, the files containing particulars of former clients, records of
graduated students in an institution, etc

Data file:
A file containing data/value, such as a file created within an application programs. Data files are
normally organized as sets of records with one or more associated access methods. For example, it
may be a word processing document, a spreadsheet, a database file or a chart file.

Different types of Data file are shown in this table:

File type extension function


Executable Exe, com, bn Ready-to-run code
Text Txt, doc, docx Textual data documentation
Source C, F77, py, jv Sources in various languages
object Obj, o Object code
library Lib, a Library routine
Archive Tar, zip, aro Grouped files
Compressed Zip, Z, gz Compressed
Printview Ps, eps, pdf Printing or viewing
Word processor Ppt, wp, tex Word processors

File characteristics
Data file(s) should have at least one of the following behaviors or qualities
:
Hit rate: This is the frequency with which active records in the file are accessed. File records that
are accessed more often are said to have high hit rate, while those records which are rarely accessed
are said to have low hit rate.

Volatility: The ease at which records are either added or deleted from file is described as file
volatility. This calls for careful handling of data file to avoid sudden loss of its contents (records)
due to its volatility nature.

Growth: This is referred to the increase in size of the file. When a file is created, it grows as new
records are added to the file. The file grows as its contents (records) increase.
Size: The file size is expressed in terms of characters in the field of the record and the number of
records. When a file is created, the size is determined by the amount of data stored in the file.

Storage Medium/Devices

A storage device is an integral part of the computer hardware which stores information/data to
process the result of any computational work. Computer needs a storage device, to be able to run or
even boot up. Or in other words, we can say that a storage device is hardware that is used for storing,
porting, or extracting data files. It can also store information/data both temporarily and permanently.
Classes of Computer Memory are:
1. Primary Memory
2. Secondary Memory
3. Tertiary Memory

Primary Memory
This is also known as internal memory and main memory. It is a section of the CPU that holds
program instructions, input data, and intermediate results. It is generally smaller in size. Examples
are: RAM (Random Access Memory) and ROM (Read Only Memory).

Secondary Memory
Secondary memory is storage external to the computer. It is mainly used for the permanent and
long-term storage of programs and data. Examples are: Hard Disks, CDs, DVDs, Pen/Flash drives,
SSD, etc.

Tertiary Memory
Tertiary Memory is not considered to be an important one because it is rarely used in personal
computers. It is a comprehensive computer storage system that has slow process. It is used to archive
data that is rarely accessed. It is used for very large data storage which can be accessed without
human intervention. Data/information in tertiary memory can be read by first consulting a specific
database to ascertain which information is in which disc, after which a robotic function arm is used
to fetch the specific medium and place it into a drive. When computer has finished reading all
required data, the robotic arm dismounts and keeps back the disc in position. Examples are: magnetic
tape, optical disc, optical tapes.

Different Computer Storage Devices


Some of the commonly used storage devices are:
1. Primary Storage Devices
2. Magnetic Storage Devices
3. Flash memory Devices
4. Optical Storage Devices
5. Cloud and Virtual Storage

1. Primary Storage Devices


Primary storage devices include:
i. Random Access Memory (RAM)
ii. Read Only Memory (ROM)
Random Access Memory (RAM). It is a temporary memory that stores information that is used
immediately. The software installed on a hard disk is brought to RAM to be processed and used by
the user. Its content clears immediately the computer is turned off. With the help of RAM, computers
can perform multiple tasks like loading applications, browsing the web, editing a spreadsheet,
experiencing the newest game, etc. It allows you to navigate quickly among these tasks,
remembering where you’re in one task once you switch to a different task. It ranges from 1GB –
32GB/64GB depending upon the specifications.

Types of RAM
There are different types of RAM, and although they all serve the same purpose, the most common
ones are:
i. SRAM
ii. DRAM
iii. SDRAM
Static Random Access Memory (SRAM) also known as volatile memory consists of circuits that
retain stored information as long as the power supply is on. It is used to build Cache memory. The
access time of SRAM is lower and it is much faster as compared to DRAM but in terms of cost, it is
more expensive than DRAM.
Dynamic Random Access Memory (DRAM): It is used to store binary bits in the form of electrical
charges that are applied to capacitors. The access time of DRAM is slower as compared to SRAM
but it is cheaper than SRAM and has a high packaging density.

Synchronous Dynamic Random Access Memory (SDRAM): This is faster than DRAM. It is
widely used in computers and others. Followed SDRAM is the upgraded version of double data rate
RAM, i.e., DDR1, DDR2, DDR3, and DDR4 which are widely used in home/office desktops and
laptops.

Read only Memory (ROM): This is non-volatile memory that stores data/information permanently.
Data in this memory can neither be modified or deleted. It can only be read from not write to, hence
the name “read only” memory. ROM stores instructions that are used to start a computer. This
operation is referred to as bootstrap. It is also used in other electronic items like washers and
microwaves. ROM chips can only store a few megabytes (MB) of data, which ranges between 4 and
8 MB per ROM chip.
Types of ROM:
i. Programmable Read-Only Memory (PROM)
ii. Erasable Programmable Read-Only Memory. (EPROM)
iii. Electrically erasable programmable read-only memory (EEPROM)

PROM: These are ROMs that can be programmed. A special PROM programmer is employed to
enter the program on the PROM. Once the chip has been programmed, information on the PROM
cannot be altered. PROM is non-volatile, that is data is not lost when power is switched off.

EPROM: This type of ROM allows the erasing of previously stored information and writing of new
data onto the chip.

EEPROM: Here, data can be erased without using ultraviolet light, by just applying the electric
field.

Primary Storage Devices

2. Magnetic Storage Devices


These include:
• Floppy Disk
• Hard disk
• Magnetic card
• Tape Cassette
• SuperDisk

Floppy Disk
This is also known as a floppy diskette. It is generally used on a personal computer to store data
externally. A Floppy disk is made up of a plastic cartridge and secured with a protective case. Floppy
disk is now replaced by new and effective storage devices like USB, etc.
Hard Disk (HDD)
This is a storage device that stores and retrieves data using magnetic storage. It is a non-volatile
storage device that can be modified or deleted as many times as possible without any problem.
Most computers and laptops have HDDs as their secondary storage device. It is actually a set of
stacked disks, just like phonograph records. The read-write speed of HDDs is not so fast but decent.
It ranges from a few GBs (gigabyte) to a few and more TB (Terabyte).

Magnetic Card
It is a card in which data is stored by modifying or rearranging the magnetism of tiny iron-based
magnetic particles present on the band of the card. It is also known as a swipe card which is used
passcode. Examples are: credit/debit card, identity card, some drivers license etc.

Tape Cassette
This is also known as a music cassette. It is a rectangular flat container in which the data is stored in
an analog magnetic tape. It is generally used to store audio recordings.

Super Disk
It is also called LS-240 and LS-120. It is introduced by Imation Corporation and it is popular with
OEM (original equipment manufacturer) computers like Compaq and Packard Bell. It can store data
up to 240 MB. SuperDisk drive was also compatible with 1.44MB disks.

Magnetic Storage Devices

3. Flash Memory Devices

Flash Memory Devices


It is a cheaper and more portable storage device. It is the most commonly used device to store data
because is more reliable and efficient as compared to other storage devices. Some of the commonly
used flash memory devices are:
• Pen Drive
• Solid State Drive (SSD)
Pen Drive
It is also known as a USB flash drive that includes flash memory with an integrated USB interface.
These devices can be directly connected to our computers and laptops and read/write data into them
in a much faster and more efficient way. These devices are very portable. It ranges from 1GB to
256GB generally.

SSD
It is a mass storage device like HDD but more durable because it does not contain optical disks inside
like hard disks. It is lightweight and needs less power as compared to hard disks, and has 10x faster
read and writes speed as compared to hard disks though more expensive. While SSDs serve an
equivalent function as hard drives, their internal components are much different. Unlike hard drives,
SSDs don’t have any moving parts and thus they’re called solid-state drives. Instead of storing data
on magnetic platters, SSDs store data using non-volatile storage. Since SSDs haven’t any moving
parts, they do not need to “spin up”. It ranges from 150GB to a few more TB.

SD Card: It is known as a Secure Digital Card. It is generally used with electronic devices like
phones, digital cameras, etc. to store larger data. It is portable and the size of the SD card is also
small so that it can easily fit into electronic devices. It is available in different sizes like 2GB, 4GB,
8GB, etc.

Memory Card: It is generally used in digital cameras. printers, game consoles, etc. It is also used
to store large amounts of data and is available in different sizes. To run a memory card on a computer
you require a separate memory card reader.

Multimedia Card: It is also known as MMC. It is an integrated circuit that is generally used in-car
radios, digital cameras, etc. It is an external device to store data/information.
4. Optical Storage Devices

Optical Device storage


Optical Storage Devices is a removable secondary storage device. Examples of some optical storage
devices are:
• Compact Disc (CD)
• Digital Versatile Disc (DVD)
Compact Disc (CD): It contains tracks and sectors on its surface to store data. It is made up of
polycarbonate plastic and is circular in shape. CD can store data up to 700MB.
CD is of two types:
CD-R: It stands for Compact Disc read-only. This type of CD is read only, once the data is written,
it cannot be erased.

CD-RW: It stands for Compact Disc Read Write. In this type of CD, you can easily write or erase
data multiple times.

DVD: This is a circular flat optical discs used to store data. It comes in two different sizes one is
4.7GB single-layer discs and another one is 8.5GB double-layer discs. DVDs look like CDs but the
storage capacity of DVDs is more than as compared to CDs.

DVD is of two types:


DVD-R: It stands for Digital Versatile Disc read-only. In this type of DVD, once the data is written
cannot be erased. It is read-only. It is generally used to write movies, etc.
DVD-RW: It stands for Digital Versatile Disc Read Write. In this type of DVD, you can easily write
or erase data multiple times.

Blu-ray Disc: It is just like CD and DVD but the storage capacity of blu ray is up to 25GB. To run
a Blu-ray disc you need a separate Blu-ray reader. This Blu-ray technology is used to read a disc
from a blue-violet laser due to which the information is stored in greater density with a longer
wavelength.

5. Cloud and Virtual Storage


Nowadays, secondary memory has been upgraded to virtual or cloud storage devices. We can store
our files and other stuff in the cloud and the data is stored for as long as we pay for the cloud storage.
There are many companies that provide cloud services largely Google, Amazon, Microsoft, etc. We
can subscribe the amount of space we need and we get multiple benefits out of it. Though it is
actually being stored in a physical device located in the data centers of the service provider, the user
doesn’t interact with the physical device and its maintenance. For example, Amazon Web Services
offers AWS S3 as a type of storage where users can store data virtually instead of being stored in
physical hard drive devices. These sorts of innovations represent the frontier of where storage media
goes.
Cloud and Virtual Storage

Characteristics of Computer Storage Devices


• Data stored in the Memory can be changed or replaced in case of a requirement, because
of the mobility of the storage devices.
• Storage Devices validate that saved data can be replaced or deleted as per the
requirements because the storage devices are easily readable, writeable, and rewritable.
• Storage Devices are easy and convenient to access because they do not require much skill
set to handle these resources.
• The storage capacity of these devices is an extra advantage to the system.
• Storage Devices have better performance and data can be easily transferred from one
device to another.

You might also like