Csc0222024
Csc0222024
Quantities of bits
Name Standard Binary
(Symbol) SI usage
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.
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).
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 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,
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).
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
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.
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.
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.
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.
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.
Advantages
• Quick retrieval of records
• Records can be of different sizes
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.
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.
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.
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.
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
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.
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.