37
CONCEPT OF COMPUTER FILES I 6/24/22

Concept of computer files

Embed Size (px)

Citation preview

Page 1: Concept of computer files

CONCEPT OF COMPUTER FILES IMONDAY, MAY 1, 2023

Page 2: Concept of computer files

LEARNING OUTCOMES

At the end of the lesson, I should be able to:

1. Define the following:a) Fileb) Recordc) Field

2. List three types of data3. Draw the order in a file

structure

Page 3: Concept of computer files

Definition of computer files

Computer files are a collection of related records. They are the most basic unit of data that users can store on a disk.

Every program, image, video, song and document is stored as a file.

Page 4: Concept of computer files

Definition of Record

A record is a collection of related data items or fields.

Each record normally corresponds to a specific unit of information. Examples are: Employee’s name, basic salary and house rent allowance.

Page 5: Concept of computer files

Field

A field is a collection of related data items. It a space allocated for a particular item of information.

A tax form for example contains a number of fields; one for your name, one for your tax identification number (TIN), one for your income and so on.

Page 6: Concept of computer files

Data Item

Data item is the smallest unit of information stored in a computer file. It is a single element used to represent a fact such as an employee’s name, item price.

Data items are physically arranged as fields in a computer file.

Page 7: Concept of computer files

Types of Data items1. Numeric data consist of numbers from 0 – 92. Alphabetic data consist of letters A –Z3. Alphanumeric data is a combination of

numbers and letters, can also refer to collection of Latin letters and Arabic digits or text constructed from these collection. There are either 36 (Single case) or 62 (Case Sensitive) alphanumeric characters. The alphanumeric data set consist of number 0-9 and letters A – Z.

Page 8: Concept of computer files

File StructureSummary of data items:The data is the smallest unit of information stored in a computer file A field is a collection of related data items A record is a collection of related fieldsThe collection of record is a file

The structure of a file in systematic order from top to bottom

• Data

• Field

• Record

•FILE

Page 9: Concept of computer files
Page 10: Concept of computer files

Evaluation 1. Define the following:

a) Fileb) Recordc) Field

2. List three types of data3. List the order in a file

structure

Page 11: Concept of computer files

CONCEPT OF COMPUTER FILES IIMONDAY, MAY 1, 2023

Page 12: Concept of computer files

LEARNING OUTCOMES

At the end of the lesson, I should be able to:a) -identify types of file organizationb) -outline methods of accessing filesc) -Classify computer filesd) -itemize criteria for classifying computer files

Page 13: Concept of computer files

File organization refers primarily to the logical arrangement of data in a file system.

Page 14: Concept of computer files

Choosing a file organization is a design decision, hence it must be done having in mind the achievement of good performance with respect to the most likely usage of the file. The criteria usually considered important are:

   1. Fast access to single record or collection of related records.   2. Easy record adding/update/removal, without disrupting .   3. Storage efficiency.   4. Redundancy as a warranty against data corruption.

Page 15: Concept of computer files

TYPES OF FILE ORGANIZATION1. Serial 2. Sequential3. Indexed Sequential4. Direct Access /Random Access

Page 16: Concept of computer files

Serial File Organization

A collection of records No particular sequence Cannot be used as master Used as temporary transaction file Records stored in the order received can be stored on magnetic tape e.g.

VHS

Page 17: Concept of computer files

Sequential File Organization

A collection of records Stored in key sequence Adding/deleting record requires

making new file Used as master files Can be stored on optical disk,

memory stick and magnetic disk.

Page 18: Concept of computer files

Sequential file

Page 19: Concept of computer files

Advantages

Simple file design Very efficient when most of the records

must be processed e.g. Payroll Very efficient if the data has a natural

order Can be stored on inexpensive devices

like magnetic tape.

Page 20: Concept of computer files

Disadvantages

Entire file must be processed even if a single record is to be searched.

Transactions have to be sorted before processing

Overall processing is slow

Page 21: Concept of computer files

Direct (Random) File Organization

Records are read directly from or written on to the file.

The records are stored at known address.

Address is calculated by applying a mathematical function to the key field.

Page 22: Concept of computer files

Direct (Random) File Organization

A random file would have to be stored on a direct access backing storage medium e.g. magnetic disc, CD, DVD

Example : Any information retrieval system. Eg Train timetable system.

Page 23: Concept of computer files

Advantages

Any record can be directly accessed. Speed of record processing is very

fast. Up-to-date file because of online

updating. Concurrent processing is possible.

Page 24: Concept of computer files

Disadvantages

More complex than sequential Does not fully use memory locations More security and backup problems

Page 25: Concept of computer files

Indexed sequential file

Each record of a file has a key field which uniquely identifies that record.

An index consists of keys and addresses.

An indexed sequential file is a sequential file (i.e. sorted into order of a key field) which has an index.

A full index to a file is one in which there is an entry for every record.

Page 26: Concept of computer files

Indexed-sequential organization

Page 27: Concept of computer files

Indexed sequential file

Page 28: Concept of computer files

Advantages Provides flexibility for users who

need both type of accesses with the same file

Faster than sequential An indexed sequential file can

only be stored on a random access device onlye.g. magnetic disc, optical disk (CD, DVD etc.)

Page 29: Concept of computer files

Disadvantages Extra storage space for the index

is required

Page 30: Concept of computer files

Methods of accessing computer files

Serial file access Sequential file access Direct/Random file access

Page 31: Concept of computer files

Computer file classification

Mater file Transaction file Reference/work file

Page 32: Concept of computer files

Computer file classificationA file is a collection of data that is treated as

a single unit on a peripheral device.

TYPES OF FILES-

Master file It contains record of permanent data

types. They are created when you install your

business.

Page 33: Concept of computer files

Transaction fileContains data which is used to update the records of master file. Ex-address of a customer.

Transaction files also serves as audit trails and history of the organization.

Reference/Work filesThis is a file with reasonable amount of permanency. Examples of data used for reference purposes are price list, tables of rates of pay, names and addresses.

Page 34: Concept of computer files

Criteria for Computer file classificationCriteria for classifying computer files are: By nature of content: refers to the

nature of file content By organization method: refers to the

way files are arranged e.g. serial, sequential, random etc.

By storage medium: refers to storage devices in which a file could only be stored such as magnetic or optical disk and magnetic tape.

Page 35: Concept of computer files

Evaluation 1. -identify types of file

organization2. -outline methods of

accessing files3. -Classify computer files4. -itemize criteria for

classifying computer files

Page 36: Concept of computer files

Assignment

1. Read up the topic: “handling computer files”.2. Outline the operating procedure for computer data processing [see pages 86 & 87 of your ICT textbook]

Page 37: Concept of computer files

Terminologies

Serial Sequential Random Index