0% found this document useful (0 votes)
41 views

Chapter 1

The document discusses different types of file organization including sequential, random, serial, and indexed-sequential. It also covers concepts related to files like records, fields, characters, bytes, and bits. Finally, it describes common file operations such as seek, read, write, fetch, insert, delete, and update.

Uploaded by

Ramon Dev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

Chapter 1

The document discusses different types of file organization including sequential, random, serial, and indexed-sequential. It also covers concepts related to files like records, fields, characters, bytes, and bits. Finally, it describes common file operations such as seek, read, write, fetch, insert, delete, and update.

Uploaded by

Ramon Dev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

CHAPTER 1

FILE ORGANISATION AND FILE MANAGEMENT


What is file?
A file is a collection of data stored in one unit, identified by a filename.
It can be a document, picture, audio, video stream, data library,
application, or other collection of data.
A file is an object on a computer that stores data, information, settings,
or commands used with a computer program.
File organization
File Organization refers to the logical relationships among various
records that constitute the file, particularly with respect to the means
of identification and access to any specific record. In simple terms,
Storing the files in certain order is called file Organization. File Structure
refers to the format of the label and data blocks and of any logical
control record.
File management
File management refers to the process of organizing, storing, and
manipulating files on a computer system. This can include organizing
stored files into folders, backing up files, and compressing files to save
space.
Every digital file we generate or receive must be appropriately handled
and saved in our system to save us time in finding the resource when
we need it. The process of identifying and storing these data files inside
a logical structure made up of directories and subdirectories should be
handled with care.
Computer file management allows us to take full control over our most
valuable digital assets by creating digital logical folders and subfolders
for long-term preservation, backup, and easy access when needed.
The main components of file management in operating system include
organizing files into folders, storing files on a device or storage system,
retrieving stored files from storage systems when they are needed, and
providing an interfaces for users to access their files.
CHAPTER 2
FILE ORGANISATION AND FILE MANAGEMENT
File organization refers to the way data is stored in a file. File
organization is very important because it determines the methods of
access, efficiency, flexibility and storage devices to use. There are four
methods of organizing files on a storage media. This include:
 Sequential,
 Random,
 Serial and
 Indexed-sequential
SEQUENTIAL FILE ORGANIZATION
Records are stored and accessed in a particular order sorted using a key
field.
Retrieval requires searching sequentially through the entire file record
by record to the end.
Because the record in a file are sorted in a particular order, better file
searching methods like the binary search technique can be used to
reduce the time used for searching a file .
Since the records are sorted, it is possible to know in which half of the
file a particular record being searched is located, Hence this method
repeatedly divides the set of records in the file into two halves and
searches only the half on which the records is found.
For example, of the file has records with key fields 20, 30, 40, 50, 60
and the computer is searching for a record with key field 50, it starts at
40 upwards in its search, ignoring the first half of the set.
Advantages of sequential file organization
 The sorting makes it easy to access records.
 The binary chop technique can be used to reduce record search
time by as much as half the time taken.
Disadvantages of sequential file organization
 The sorting does not remove the need to access other records as
the search looks for particular records.
 Sequential records cannot support modern technologies that
require fast access to stored records.
 The requirement that all records be of the same size is sometimes
difficult to enforce.
RANDOM OR DIRECT FILE ORGANIZATION
Records are stored randomly but accessed directly. To access a file
stored randomly, a record key is used to determine where a record is
stored on the storage media. Magnetic and optical disks allow data to
be stored and accessed randomly.
Advantages of random file organization
 Quick retrieval of records.
 The records can be of different sizes.
SERIAL FILE ORGANIZATION
Records in a file are stored and accessed one after another. The records
are not stored in any way on the storage medium this type of
organization is mainly used on magnetic tapes.

Advantages of serial file organization


 It is simple
 It is cheap
Disadvantages of serial file organization
 It is cumbersome to access because you have to access all
proceeding records before retrieving the one being searched.
 Wastage of space on medium in form of inter-record gap.
 It cannot support modern high speed requirements for quick
record access.
INDEX SEQUENTIAL FILE ORGANIZATION
An indexed file contains records ordered by a record key. A record key
uniquely identifies a record and determines the sequence in which it is
accessed with respect to other records. Each record contains a field
that contains the record key. A record key for a record might be, for
example, an employee number or an invoice number.
An indexed file can also use alternate indexes, that is, record keys that
let you access the file using a different logical arrangement of the
records. For example, you could access a file through employee
department rather than through employee number.

CHAPTER 5
CONCEPT OF RECORD, FIELD, CHARACTER, BYTE AND BIT IN
RELATION TO A FILE

RECORDS
Several related fields can be used to compose a record. In a payroll
system, for example,
The record for an employee might consist of the following fields
(possible types for these fields are shown in parentheses):
• Employee identification number (a whole number).
• Name (a string of characters).
• Address (a string of characters).
• Hourly pay rate (a number with a decimal point).
• Year-to-date earnings (a number with a decimal point).
• Amount of taxes withheld (a number with a decimal point).
Thus, a record is a group of related fields. All the fields listed above
belong to the same employee. A company might have many employees
and a payroll record for each.

FIELDS
Just as characters are composed of bits, fields are composed of
characters or bytes. A field is a group of characters or bytes that
conveys meaning. For example, a field consisting of uppercase and
lowercase letters can be used to represent a person’s name, and a field
consisting of decimal digits could represent a person’s age.
CHARACTERS
Work with data in the low-level form of bits is tedious. Instead, people
prefer to work with decimal digits (0–9), letters (A–Z and a–z) and
special symbols such as $ @ % & * ( ) – + ” : ; , ? / Digits, letters and
special symbols are known as characters. The computer’s character set
contains the characters used to write programs and represent data
items. Computers process only 1s and 0s, so a computer’s character set
represents every character as a pattern of 1s and 0s. Python uses
Unicode® characters that are composed of one, two, three or four
bytes (8, 16, 24 or 32 bits, respectively)—known as UTF-8 encoding.5
Unicode contains characters for many of the world’s languages. The
ASCII (American Standard Code for Information Interchange) character
set is a subset of Unicode that represents letters (a–z and A–Z), digits
and some common special characters.
BITS
A bit (short for “binary digit”—a digit that can assume one of two
values) is the smallest data item in a computer. It can have the value 0
or 1. Remarkably, the impressive functions performed by computers
involve only the simplest manipulations of 0s and 1s—examining a bit’s
value, setting a bit’s value and reversing a bit’s value (from 1 to 0 or
from 0 to 1). Bits for the basis of the binary number system, which you
can study in-depth in our online “Number Systems” appendix.

CHAPTER 6
SEEK, READ, WRITE, FETCH, INSERT, DELETE AND UPDATE
OPERATION
WRITE OR CREATE
The CREATE operation adds a new record to a database. In RDBMS, a
database table row is referred to as a record, while columns are called
attributes or fields. The CREATE operation adds one or more new
records with distinct field values in a table.
The same principle applies to NoSQL databases. If the NoSQL database
is document-oriented, then a new document (for example, a JSON
formatted document with its attributes) is added to the collection,
which is the equivalent of an RDBMS table. Similarly, in NoSQL
databases like DynamoDB, the CREATE operation adds an item (which is
equivalent to a record) to a table.
READ
READ returns records (or documents or items) from a database table
(or collection or bucket) based on some search criteria. The READ
operation can return all records and some or all fields.
UPDATE
UPDATE is used to modify existing records in the database. For
example, this can be the change of address in a customer database or
price change in a product database. Similar to READ, UPDATEs can be
applied across all records or only a few, based on criteria. An UPDATE
operation can modify and persist changes to a single field or to multiple
fields of the record. If multiple fields are to be updated, the database
system ensures they are all updated or not at all. Some big data
systems don’t implement UPDATE but allow only a timestamped
CREATE operation, adding a new version of the row each time.
DELETE
DELETE operations allow the user to remove records from the
database. A hard delete removes the record altogether, while a soft
delete flags the record but leaves it in place. For example, this is
important in payroll where employment records need to be maintained
even after an employee has left the company.
FETCH
FETCH retrieves rows of data from the result set of a multiple-row
query—one row at a time, several rows at a time, or all rows at once
and stores the data in variables, records, or collections.
INSERT
The Insert operation is called Enqueue, and adds an element to the end
of the list; the Dequeue operation selects and removes its first element.
As a result, the neighbors of the source node are generated layer by
layer (one edge apart, two edges apart, and so on).
SEEK
The Seek operation allows the application program to change the value
of the file pointer so that subsequent Read/Write is performed from a
new position in the file. The new value of the file pointer is determined
by adding the offset to the current value.

CHAPTER 7
QUATITATIVELY FILE SYSTEM PERFORMANCE IN TERMS OF
FETCH INSERT, UPDATE AND ORGANIZATION
In computing, a file system (often also written as filesystem) is a
method for storing and organizing computer files and the data they
contain to make it easy to find and access them. 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, they might provide access
to data on a file server by acting as clients for a network protocol (e.g.,
NFS, SMB, or 9P clients), or they may be virtual and exist only as an
access method for virtual data (e.g., procfs). More formally, a file
system is a special-purpose database for the storage, hierarchical
organization, manipulation, navigation, access, and retrieval of data.

You might also like