2nd Term Computer Ss2 Note-1
2nd Term Computer Ss2 Note-1
1st week
Field
Record
File
Represented above is the structure of a file in a systematic order from top to bottom.
a. Data
A Data item is the smallest unit of information stored in computer file
b. Field
A field is a collection of related data items
c. Record
A record is a collection of related fields
d. File
The collection of records is called a file
WEEK 2
Topic: Concept of Computer Files
1. Serial file is one in which the record have been stored in the order in which they
have arisen. They have not been sorted into any particular order e.g an unsorted
transaction file, a shopping list (non – computerized serial file). It can be stored
on tape, disc or in memory.
2. Sequential file is one records are organized in the sequence by which they were
added. A sequential file contains records organized in the order they were
entered. The order of the records is fixed. The records are stored and sorted in
physical, contiguous blocks within each block the records are in sequence.
Records in these files can only be read or written sequentially.
3. Indexed file organization contains reference numbers, like student file that
identify a record in relation to other records. These references are called the
primary keys that are unique to a particular record.
Alternate keys can also be used as reference number e.g instead of accessing a
student’s record using student number, you can use an alternate key that
reference students by departments/subject offer. This allows greater flexibility for
use to randomly search through thousands of records in a file. However, it
employs complex programming in order to be implemented.
4. Random file organization is a file organized via an index. Also called a “direct file”
or a “direct access file”, it enables quick access to specific records or other
elements within the file rather than having to read the file sequentially. The index
points to a specific location within the file, and the file is read from that point.
a. Serial Files e.g tape, the only way to access a serially organized file is serially.
b. Sequential files
The method of access used is still SERIAL but of course the files are now is
sequence, and for this reason the term SEQUENTIAL is often used in describing
serial access of a sequential tape file. It is important to note that to process (e.g
update) a sequential master tape file, the transaction file must also be in the
sequence of the master file. Access is achieved by first reading the transaction
file and then reading the master file until the matching record (using the record
keys) is found. Note therefore that if the record required is the 20 th record on the
file, in order to get it into storage to process it the computer will first have to read
in 19th preceding records.
c. Random files
Generally speaking the method of accessing random files is RANDOM. The
transaction record keys will be put through the same mathematical formula as
were the keys of the master records, thus creating the appropriate bucket
address. The transactions in random order are then processed against the
master file, the bucket address providing the address of record required.
Computer File Classification
a. Master file
b. Transaction file
c. Reference file
a. Master file are files of a fairly permanent nature e.g customer ledger, payroll,
inventory. It need to update to show a current position. It is seen therefore that
master record will contain both data of a static nature, by its nature will change
each time a transaction occurs.
b. Transaction file is also known as movement file. This is made up of various
transactions created from the source documents. It is the file used to update the
master file. It is no more required as soon as it had been used to update because
it will be replace by a file containing the next batch of orders.
c. Reference file is a file with a reasonable amount of permanency e.g price lists,
tables of rates of pay, names and address.
WEEK 3
Topic: Handling Computer Files
I. Basic operations on computer files
a. Creation: creating a file with a given name
b. Deletion: Deleting files that are unwanted
c. Retrieval: Retrieving a stored file or lose file
d. Copy: Copying a created file to either an external or in – built storage device
e. View: Viewing a created file or granting privilege of viewing
f. Update: Reading or updating the contents
g. Open: Opening a file to use its contents
h. Close: Closing the file, thereby losing access until it is opened again.
II. Steps involved in creating sequential file with e.g EXAM FILE using BASIC
file processing statements. To create sequential file the ‘OPEN’ statement is
used for writing information to a file. It goes thus:
The file determines the file name to use.
The FOR portion indicates how the file will be accessed or operated. It may
be APPEND, BINARY, INPUT, OUTPUT and RANDOM.
As # is the identifier used for the file handle in question.
Example:
The following opens a file, using mode OUTPUT and number 1, and then
saves the text subject offered to the file
10 CLS
20 OPEN “Example.dat” FOR OUTPUT AS # 1
30 PRINT # 1, “Subject offered”
40 CLOSE # 1
50 END.
III. Steps involved in accessing sequential file using BASIC file processing
statements.
The ‘OPEN’ statement is also used for reading information from a file which
goes thus;
OPEN file $ FOR INPUT AS # 1
Example:
10 CLS
20 OPEN “Examfile .dat” FOR INPUT AS # 1
30 INPUT # 1subject offered &
40 CLOSE # 1
50 PRINT subject offered &
60 END
WEEK 4
Topic: Handling Computer Files.
Example:
10 CLS
20 OPEN “EXAMFILE.TXT” FOR INPUT AS # 1
30 PRINT #1, “Matric No Maths Eng Total score
40 PRINT #1, “0142 50 40 90
50 PRINT #1, “0143 70 30 100
60 PRINT #1, “0144 90 70 160
70 CLOSE #1
80 OPEN “EXAMFILE.TXT” FOR OUTPUT AS #1
90 DO WHILE NOT E OF (1)
100 INPUT #1, text $
110 PRINT text $
120 LOOP
130 CLOSE # 1
140 END
File insecurity
Computer file insecurity system is vulnerable to attack, and that this fact
creates a constant battle between those looking to improve security and those
looking to circumvent security.
Effect of insecurity of files.
a. Data loss refers to the unforeseen loss of data or information.
An occurrence of data loss can be called a Data Loss Event and there are
several possible root causes e.g intentional action, unintentional action,
failure (power failure, hardware (hard drive) software crash, data
corruption, crime, Natural disaster (fire, flood, earthquake), explosion etc.
Backup and recovery schemes are developed to restore lost data.
b. Overwriting is a process of writing a binary set of data on a memory. It
generally occurs when unused file system clusters are written upon with
new data. In general it writes over the previous data.
a. Use of back up
Backup refers to making copies of files so that these additional copies
may be use to restore the original after a data loss event.
Backups have two distinct purposes:
(i) To recover data loss
(ii) To recover data from a historical period of time.
b. Use of Anti – Virus
An anti – virus program protects a computer file from malicious viruses
attack, detects and heals files that have been attacked. Usually it consists
of a fire wall, a virus scanner and remover and sometimes other tools as
well.
c. Password
It is a user chosen secret string of characters that allows access to a
computer, interface, files etc. The use of password is at user’s discretion
and caution must be exercised by the user to remember the password
always.
d. Proper label of storage devices.
To avoid mix up of files/data, all the storage device must be proper label
accordingly especially in a big firm.
e. Maintenance of storage drive/hardware.
Data sometimes loss due to hardware failure or pack up of storage drive.
The hardware/storage drive should be maintained to prevent this
occurrence to take place.
WEEK 5
Topic: Handling Computer Files
Computer files are files processed using computer system. Manual files are files physically done
physically demanding
WEEK 6
Topic: Word Processing
I. Definition of Word Processing and Text Document.
Word processing is the use of computer software to create, edit, view, store,
retrieve and print text documents. Text document is a written communication
like letters, reports, memos, etc. The software that is used for word
processing is called a word processor.
WEEK 7
Topic: Word Processing
ii. Cut: To cut a document means to move the document from its original
location to a different location.
Shortcut method
Highlight the portion of a document to be copied
Right click on the highlighted text
Select copy
Position the insertion point in a new location
Right click in an empty space
Select paste
Keyboard method
Highlight the document to be copied
Press the keys Ctrl + c to copy
Position the cursor on the insertion point
Press the keys ctrl + v to paste
Strike through
To apply strike through effect on your text, do the following:
Type the text
Highlight the text
From the Home ribbon click on the icon
Note: Same is applicable to double strike through, subscript and superscript.
Change case
To change case of a text
Type the text
Highlight the text
From the Home ribbon click on the Aa icon drop down arrow
Select the format of case you desire for your text
Character spacing
This displays different characteristics of spacing that can be applied on a text they
include: Expanded or Condensed, Kerning etc.
Paragraph
Indent and spacing: This feature creates a text with spacing before or after. The effects
here are alignment, indentation, spacing, tabs etc.
Investigation stage
1. Investigation Stage
This stage involves the investigation of the existing system. The existing system
is studied and evaluated to identify its problems and deficiencies. It involves
gathering information about the existing systems. The information could be
gathered through observation, questionnaire and interviewing. The information
gathered is use in a feasibility study. The aim of the feasibility study is to identify
the problem and proffer feasible solution through a feasibility report. The output
here is feasibility report.
2. System Analysis Stage
This stage starts with a more detailed investigation into the existing system. The
date and procedures gathered are analyzed to define the new system
requirements. The new system requirements are defined addressing the
deficiency in the existing system with specific proposals for improvement. The
output here is the user’s requirements.
3. Systems Design Stage
At this stage the proposed system is designed. It involves layout plans for the
physical construction, hardware requirements, operating systems, programming
communications and security.
It describes the desired features and operations of the proposed system in detail,
including screen layouts, business rules, process diagrams, flowcharts,
pseudocode and other documentation etc.
4. System Implementation Stage
This stage is where programs of the new system are written in the specified
programming language in line with the system specifications. It involves testing of
all aspects of the new system and adjustments and corrections are made where
necessary.
5. Systems Development Stage
This is where system developed in stage 4 is put into use. It involves bringing all
the different parts of the proposed system together. This is the stage where the
software is put into use and runs the actual business.
6. Systems Maintenance Stage
Here, the system is subject to evaluation on how to achieve its setup goals.
Thus, the remaining life of the system is subject to changes, correction,
additions, moves to a different computing platform and more, which make system
existing forever.
WEEK 10
Topic: Program Development
1. Accuracy
Every good program must be error free.
2. Readability
The program should be easy for any programmer to read and understand.
3. Maintainability
A carefully written program should be very easy to amend and maintain if need
be
4. Efficiency
A good program should possess ability to solve a particular problem skillfully
5. Generality
A good program should be able to solve all similar problems
6. Clarity
Every good and tested program must be clear, straight forward and easy to
understand
7. Reliability
The program should be depended upon at all times.
WEEK 11
Topic: Steps involved in program development
1. Problem Definition
The programmer is expected to first of all understand the problem and know
exactly what the program entails. The definition of the problem must be clear.
2. Problem Analysis
The programmer is expected to analyze the problem to determine how it will be
solved, the required inputs and output.
4. Program Coding
This is the actual writing or coding of the program in a particular programming
language e.g Basic, Cobol etc.
5. Program Compilation
This is done after coding process of the programming language allows it.
6. Program Testing
This is similar to proof reading. The written program is tested and errors
corrected to check if the program is able to solve problem it is expected to solve.
7. Program Documentation
This involves writing a detailed description about the program and some specific
facts pertaining to the usage and maintenance of the program.
8. Program Running
This is the actual running or execution of the program with the compiler or
interpreter so as to check if the desired output is generated
9. Maintenance
It is process of updating or amending a previously written program for current
use.