0% found this document useful (0 votes)
134 views67 pages

Understanding Database Records and Fields

The document discusses the importance of databases in managing data as a resource for organizations, defining a database as a structured collection of related data. It outlines the two main types of databases (manual and electronic), their advantages and disadvantages, and details the functions and features of Database Management Systems (DBMS). Additionally, it covers various database models, particularly the hierarchical, network, and relational models, along with considerations for designing and creating databases using Microsoft Access.

Uploaded by

thandizodavid
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)
134 views67 pages

Understanding Database Records and Fields

The document discusses the importance of databases in managing data as a resource for organizations, defining a database as a structured collection of related data. It outlines the two main types of databases (manual and electronic), their advantages and disadvantages, and details the functions and features of Database Management Systems (DBMS). Additionally, it covers various database models, particularly the hierarchical, network, and relational models, along with considerations for designing and creating databases using Microsoft Access.

Uploaded by

thandizodavid
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

USING DATABASES

Introduction

Managing data as a resource is a very important task in any organization nowadays. This is because
data forms an important part of strategic, tactical, operational management as well as decision
making in an organization. To ensure convenient (suitable) and easy storage and retrieval of data,
organizations use databases.

Definition of Database

 A Database: is a collection(group) of related data items that has been organized to provide easy,
consistent and controlled access to data.

OR

 A Database is an organized (structured) collection of data that is related in subject or purpose.

Types of Databases

There are two types of databases namely:

A. Manual database (also called Traditional database)

B. Electronic database (also called Computerized database)

Manual Databases

 This is a database that consists of files and folders each properly tagged and kept in an
appropriate sequence in a cabinet.

It is a traditional approach to managing files (i.e. manual filing system)

Examples of manual databases:

• Admission office in a school stores students files identified using unique student admission
number e.g. 1/2020, 200/2019.

Note: Manual organization of data becomes difficult and time consuming as data and information
grows(increases)

Problems of Manual Databases

i. There is high redundancy: This refers to unnecessary duplication of data in multiple(many)


files. E.g. student data may be found in many places such as kitchen records, library records,
administration records etc.

ii. Lack of flexibility: It is difficult to search for requested file or record or update records since
these tasks are done manually so more effort is needed.

iii. Lack of data integrity: Poor storage and maintenance of data may lead to unreliable and
misleading reports. i.e. some records may not be complete due to difficulty in updating (e.g.)
some elements such as Age of student may not be up-to-date or may not be available in
some students records.

1
iv. Lack of data sharing: Data or information in different manual files may not be available to
other users. E.g. one may lock the files in a filling cabinet making them unavailable to other
people.

v. Huge volumes of data requiring large storage space: Data in manual files is bulky as such it
takes more storage space (i.e. more filling cabinets needed) unlike electronic data which is
compact hence takes less storage space e.g. more data is kept only in one computer.

Advantages of Manual Databases

i. Improved data/information security: The records are on paper as such they cannot be lost
through virus attack or accidental deletion. Note: there is still danger of unauthorized access
so keep the files in locked places.

ii. It is relatively less expensive: Manual database does not require use of computers as such
no money is spent on purchase of computers and software.

iii. It does not require special technological skills : No need for one to have skills to work with
computer hardware and software since it does not require use of any of these.

Electronic/Computerized Databases

 This refers to the use of electronic devices(i.e. computers) to store and organize files for easy
access. e.g. in windows, related files are collected and stored in an electronic wallet called a
folder.

 Note: Electronic or computerized filling system mainly involves creating and manipulating
databases using software called Database Management Systems(DBMS)

 A DBMS: is a software that provides tools for creating, storing, searching and manipulating
databases.

Examples of Database Management Systems(DBMS):

• Microsoft Access

• Open Office Database

• Microsoft SQL Server

• Oracle

• Fox Pro

• Lotus Approach

• Oracle MySQL

Benefits of using DBMS(Advantages of Computerized Databases)

a) There is improved security and integrity: Electronic database is protected from unauthorized
access and modification of records using passwords.

b) Files/records are well organized for easy and quick access, retrieval and sharing. DBMS have
objects for searching for required records (i.e. Queries). This saves effort.

2
c) Data is compact meaning that it takes less storage space since it is stored in electronic form .ie
not need for filling cabinets or shelves.

d) Data is kept current or up-to-date. This is possible because DBMS provide tools for easy and
quick updating of records in multiple files.

e) There is easy interaction between databases and other application programs e.g. data can be
transferred between application . E.g. one can copy records from a database table and paste it in
a document.

Disadvantages of using DBMS (Disadvantages of Computerized Databases)

a) Sometimes data may be accidentally deleted or may be attacked by viruses: This may lead
to data loss which may also affect work operations.

b) It is expensive as it requires purchase of computers and software

c) It needs one to have skills to work with computers and database software

Functions of DBMS

a) Allowing only authorized users to add or delete records

b) Allowing users to update or modify existing records

c) Organizing records for easy access, retrieval and sharing

d) Ensuring security and integrity of data by safeguarding it against unauthorized access and
modification

e) Interfacing between database files and other application programs

f) Keeping statistics of data items in a database

Common features of DBMS

DBMS software consists of objects or features that are used to create and manage databases. The
common objects available in DBMS such as Microsoft Access are:

1) Tables

2) Forms

3) Queries

4) Reports

1) Table

 A table is a database object that is used to store or hold related records about a particular item
described in a database. E.g. A student table hold records of students.

• A table is organized into rows and columns. Each row represents a record while each column
represents a field in each record.

Note:

3
 A record: is a collection of related fields that belong to (represents) a single item described in
a table.

An example of a record is a row in a student table containing Student First name, Surname,
Age, Class, Age as fields

 A field: is a single characteristic(attribute) that defines a single data value of an item or entity
described in a table. E.g. A Students’ Age, First name, Surname are fields. E.g John, 15

• Each table describes a single entity(item) i.e. it contains data about a single item e.g. A
student table only contains Students ‘ records.

• Each table must have a Primary key field. This is a field that uniquely identifies each record.
This field must not contain null values and must not contain repeating values. For example,
a Student ID number is a primary key field as it uniquely identifies a particular student.

2) Forms

 A form is a database object that is used for entering and updating data in database tables and
also viewing data from a table or query.

 Forms usually resemble an ordinary paper form which is used to collect and enter data into
database tables.

3) Queries

 A database query is an object that is used to request (ask for) required information from a
database that meets a particular criteria.

For example, you can create a query to search for records of students whose Age is 20. In most
DBMS ,queries are written in a language called Structured Query Language(SQL)

4) Reports

 A report is a database object used to present or display data from a database in a more
professional and printable format or layout.

 Note: when creating a database, you create these objects starting with tables.

Database Models

 A Database model is a logical structure that determines how data is stored, organized and
manipulated by DBMS software.

4
Types of Database Models

There are five types of database models but the commonly used are three models:

a) Hierarchical database model

b) Network database model

c) Relational database model

Other older types of database models are object-oriented model and object/relational model

a) Hierarchical Database Model

 This is a database structure in which data is organized in related levels from top to bottom
(forming an upside down tree-like structure) with low level records(Child records) under high
level records(Parent records).
 To access level 1 data, a user has to access the root(main data item) and then follow the path
to the level 2 and then a specific path leading to each item at lower levels. Hierarchical
model is no longer in use in modern database systems.

 In hierarchical database model, a parent record can have many child records under it, while a
child record can only have one parent creating a one-to-many relationship between parents
and children records.
Note: There are no connections between child records.

Advantages of Hierarchical Database Model

i. It is very easy to find data( since one just has to trace through a parent record from top to
the next levels down to get to the data required).

ii. It is easy to store data since you just add the data to its parent.

Disadvantages of Hierarchical Database Model

i. It is easy to loose data because once you delete a parent record all its child records are lost.
(its not flexible).

ii. You cannot add a child record if it does not have a related parent record.

iii. It is difficult to relate different records as such some records must be repeated. E.g. a teacher
handling two subjects in different departments will have his or her record repeated in the
departments since no child records connections are allowed.

5
b) Network Database Model

 This is a database model which allows one or more child records(member records) to be
related to one or more parent records(owners).

 The network model allows each record to have multiple(many) parents and child records
forming a lattice structure that represents a many-to-many relationship.

Note: In network model, access to a record can be through multiple paths and from several
records.

Advantages of Network Database Model

i. It enables creation(representation) of complex relationships e.g. a teacher handling two


different subjects or a student taking more than one subject in Science and Humanities.

ii. It is easier to retrieve data since records can be accessed through multiple(many) paths and
from several records e.g. to find John you can go through either of the departments.

iii. It is not easy to loose data as child records (members) may have many parents (owners).
Deleting one parent may not necessarily result in loss of child records if they have another
parent(owner)

Disadvantages of Network Database Model

Records that are not linked are difficult to retrieve. E.g. a record of student not doing any of the
subjects may be difficult to retrieve.

c) Relational Database Model

 This a database model in which data is organized into records that are stored in related
tables (Relations).

 The relational database model is the most popular and widely implemented model in most
DBMS software.

 It is called relational model because two tables can be linked together such that a record in
one table references (points) to a record or records in another table. See the Parents and
Students tables on the next slide:

6
• The two tables are related to each other through a field PARENT ID and PARENT ID
NUMBER. In the example, the Student table shows that Parent2 has two students
(children) : Student1 and Student2.

Note: In relational database model there are no access pathways down to data. Instead, data in the
tables are related by a common data element in a foreign key field. A foreign key field is a field of
another table that is introduced in another table in order to relate(link) the records in the two tables.

Note: Microsoft Access uses Relational database model hence it is called a Relational Database
Management System (RDBMS)

Advantages of Relational Database Model

i. It is easy to use even for beginners.

ii. It is possible to establish more relationships between data in the tables so long as each table
has a primary key field. Note: A primary key field is a field that uniquely identifies a
particular record in a table. E.g. STUDENT ID in Student table is a primary key field as it
uniquely identifies a record of each student. Note: A primary key field must contain unique
values(i.e. no duplicates) and must not contain null values(i.e. no blanks)

iii. It is possible to automatically retrieve data from several tables and present the data as if it
were stored in one table using queries.

Disadvantages of Relational Database Model

• Searching required data can be time consuming(i.e. may take more time) if there are many
tables linked to each other.

Database Structure (Database Schema)

Relational database management system like Access organizes data into a structure called a Schema
for easy storage, retrieval and manipulation.

 A Schema: is an organizational structure made up of fields at the lowest level and database at
the highest level. OR it is an outline in which data is organized.

 A relational database is organized in related tables and each table consists of related records
made up of related fields.

7
 A database collects different tables. Each table describes a single entity(item) e.g. student or
parent. A table collects related records and each record is unique. A record is a collection of
several fields that represent a single data item or entity.

Creating a Database

Note: This discussion will be based on Microsoft Access: an application software for creating and
manipulating databases. It comes in various versions such as 2007,2010.2013 etc.

Designing a Database

Note: Before creating a database, first design it. The design results in better storage, access and
maintenance of records in the database.

Considerations when Designing a Database

Consider the following before creating a database:

a) Estimate the amount of data expected to be stored in the database.

Ask yourself what entities or items are to be described (represented) in your database. This is
important because it helps you determine the number of tables to be created e.g. if the database
will store information about students and their parents then two tables will be contained.

Note: To rightly determine the data that will be stored in your database, you must first establish the
purpose of the database e.g. fees tracking database, hospital management database etc

b) Study the requirements of the users carefully

Find out from the users about what and how the input and output should be and what are the
required relationships between data.

c) Design a prototype database( I.e. Sample database)

Design a sample database on paper to determine fields and tables required to implement the
database. E.g. Student first name, Student surname, Age, Parent name, Parent Surname , Student Id
number,Parent Id number etc.

d) Normalize the fields into separate tables to allow flexibility in database manipulation

e) Normalization: is the process of decomposing fields into separate but related tables.

This is the stage where you create the tables manually allocating each field to its rightful table .

e) Identify a primary key field in each table

8
A primary key field is a field that is used to uniquely identify a record. Identify a field that will be a
primary key in the tables to be contained in your database. E.g. Student Id Number will be a primary
key in Student table.

f) Give the most important fields first priority when designing a table structure.

Fields that will be used to sort and search for records in a database ( e.g. primary key field) must be
put first in the table.

g) Design sample data forms and reports needed for interaction between the users and the
database system.

• The forms should indicate fields that will be used for entering new records in the tables(input) .

• The Reports indicate how data will be presented from the database(output)

Creating Electronic Database using Microsoft Access

To create a new database:

i. Click Start button

ii. Point All programs

iii. Point “Microsoft Office Access 2007”

iv. Click “Blank Database” in the New Blank Database section.

v. Type the name of your database e.g. Clinic management and also specify the location you
want to save the database file.

vi. Click Create button. A blank database with a default Table 1 will be created.

vii. To create a new database from Template, choose from the templates e.g. Contacts

viii. Click on the open icon to specify the location you want to save the database file.

Note: Database files are saved at the beginning of your project. After creating the file, you can start
creating objects such as tables, forms, queries and reports and you save the objects as you create
them or as you edit them.

The first object to be created are tables. They store records.

Creating Database Table

Note: When you first launch Microsoft Access, it creates a default(automatic) table: Table 1. You can
customize this table to suit what you want. To do this:

1. Click the icon for the table in the Objects(left) task pane

2. Click Home tab, in the View command group click View

3. Choose “Design view”

OR

• Right-click the table icon and choose Design View from the shortcut menu

9
4. The Save As dialogue box opens prompting you to save your table with a name. Type the
name for the table e.g. Student

5. Click OK. The table will be renamed and the Table design view will open the table design
grid.

Note: Table design view: is a view of a table that shows the design structure of the table. It does not
show records in the table but field names and their data types.

• To set a primary key to a field click to select a field

• Click Design tab

• Click Primary key icon

• After adding fields, setting primary key, data types etc remember to save the table and the
changes made to its structure. To do this click save icon OR press Ctrl + S.

• Close the table after saving. To close the table:

• Right-click the table tab on the database window.

• Choose Close.

Double click your table name to open your table in Datasheet View to start entering your data in the
fields.

Note: Datasheet View: is an object view(table view) that displays rows and columns where you can
type data (or shows records or data contained in the object or table

Setting Primary key fields and Field indexes

 An index: is a field that speeds up searching and sorting of records in a table.

 A primary key field is a field that uniquely (specifically) identifies each record stored in a
table.

Note: A primary key prevents the user from making duplicate entries in a table meaning that a
primary key field must not contain duplicates. It must also not be blank. When you set a field as
primary key, Access uses it to order(sort) records and also control redundancy (duplication of
records)

To set a primary key field:

10
To set a primary key field:

i. Open the table in design view.

ii. Select the field you wish to set as primary key by clicking in the row header on the left of the
Field name. e.g. Student Id number

iii. Click Design Tab

iv. Click Primary key button

v. The selected row will have a picture of a key

Note: A primary key field is automatically indexed meaning that it can be used for searching or
sorting records. It is a primary index. This is a primary key field which has also been set as an index.

Setting other fields as Indexes (i.e. Applying a Secondary index)

Note: A secondary index: is any other field(which is not a primary key field) which has been set as
an index.(i.e. a tool for searching and sorting records in a table).

To set another field as an index, do the following:

i. Open the table in Design View

ii. Click Design tab and click Indexes button in the Show/Hide command group. The index
dialogue box opens.

iii. In the Field Name column, select the field you wish to set as Secondary index other than the
primary key field e.g. Student First Name, Phone Number etc

iv. In the Index name column, type the name of the Index e.g. Name Index, Phoneindex etc

v. Choose the sorting order e.g. ascending or descending order. This defines the order in which
searched records will be arranged after being retrieved by the index.

vi. Click Save icon then close the Indexes dialogue box.

Setting Field Data Types (Setting Data Types for Fields)

 A field data type: is a specific type of data that will be stored or held in a particular field in your
tables.

 It is a characteristic of a field that determines the type of data to be stored in the field.

Importance of setting data type for a field:

• It ensures that only data that meets the set data type is entered or allowed in the field otherwise
it refuses the entry. This helps to normalize data in the field.e.g. an entry John will not be
allowed in field set with a data type Number since John is text characters not a number.

• It determines the purpose for which data will be manipulated e.g. data type Number means that
the numbers entered in that field can be used in a calculation.

Field Data Types

Below are data types that you can apply to the fields

11
FIELD DATA TYPE DESCRIPTION

Text (or Short Text) This data type includes alphabetic letters, numbers, spaces and punctuations or
combinations of these, that do not need to be used in calculations e.g. Names,
Phone numbers. This field accommodates a maximum of 255 characters.

Memo(or Long Text) This field data type stores long text up to a maximum of 65,535 characters. E.g. a
memo letter. Any textual entry of more than 255 characters should be entered in a
field with memo data type.

Number This field data type holds numeric values 0 to 9 that are used in mathematical
calculation. The size of this field is 1,2,4,8 bytes.

AutoNumber This field data type stores(holds) unique sequential numbers automatically
increased(incremented) by 1 .e.g. 1,2,3,4,5 or 001,002,003,004 etc.. The numbers
are increased by 1 each time you enter a new record in your table.

Date/Time This field data type is set to fields that store date and time. This is so because dates
and times can also be calculated. E.g. you can calculate age of a person from 1974 to
2021. The field size for this data type is 8 bytes.

Currency This data type is set to fields that store numeric values that have monetary values
or decimals e.g. Salary. The field size is 8 bytes and more.

Yes/No This is a logical data type for an entry that has either Yes or No or True or False. E.g.
a field that requires one to answer to HIV positive status. The field size is 1 bit. Here
one clicks in the check box for Yes and leaves the box unchecked for No.

Lookup Wizard This field data type creates a field that allows you to choose items from a list of
items using a list box, instead of typing the entries. E.g. Male, Female. The field size
is 4 bytes.

Hyperlink This field data type is for storing text and numbers used as links to other files or web
pages. E.g. e-mail addresses such as peter@[Link]

OLE(Object Linked or The term OLE is an acronym for Object Linked and Embedded. This field data type is
Embedded Object) for storing graphical objects such as pictures, drawings and charts.

Attachment(available in This is a field data type that stores one or more files containing pictures, sound,
Microsoft office Access 2010 video or word document.
onwards)

Calculated(available in This is a newer field data type in Access that is used to store data created from a
Microsoft office Access 2010 formula especially if the value will be used in queries, forms and repots.
onwards)

12
Field Properties

When creating more complex tables, you need to use field properties to specify details related to
each field in the table. The properties depend on the field data type you applied. Below are the field
properties:

FIELD PROPERTY DESCRIPTION

Field size This property allows you to set number of characters to be accommodated in the field
instead of the default. E.g. the size 255 only accepts 0 to 255 characters.

Format This determines how information appears on the screen or when printed e.g. you can
format a number as currency, percentage or general.

Decimal places This property applies to numbers and currency data types. It specifies the number of
decimal places

Input mask This is used to format a field entry into a specified format. This is mostly used to format
phone numbers and address entries e.g. the input mask 000-(0000)-000 will display
phone numbers with a format 099-(9987)-444

Caption This is a more descriptive name for a afield that is used in forms or a table. E.g. a
caption for STUID could be Student ID Number.

Default value This is a value that will automatically appear in the datasheet if nothing typed in the
field cell by a user e.g. =DATE() will automatically display current date.

Validation rule This is an expression that limits values to be entered in a field.e.g. when you type the
expression Between>=10 And <=50, the field will only allow entry of numbers between
10 and 50 in the Age field. When a user enters a value that violets the set rule Access
displays a custom message called a validation text.

Note: After specifying field data types and properties, save your table and close the design view.

Open the table in data sheet view and enter some records.

Creating a table in Datasheet view

Note: Datasheet view is a table view that shows fields and records. It is the view in which data entry
can be done. To create a table in datasheet view:

i. Click Create tab

ii. Click Table

13
iii. A new table is added with ID field(Primary key field) which you can edit by double-clicking
and “Add New Field” as a next column. Yuu can double-click the ID field and type a field
name for the primary key [Link]

iv. You can resize the column by pointing the border line and then click and drag the border
when the resize handle appears.

v. Click Save icon to save your table. You can open your table in Design View to add data types,
field properties and also change primary key field. Save the changes made then close design
view and open the table in datasheet view to enter data

Data Entry and Manipulation

Manipulating Records

 Database manipulation (manipulating database) is the process of appending(adding) new


records, editing records and modifying(changing)the table structure.

Appending (adding) records

There are many ways of entering new records in a database table. Below are some notable ways:

i. Typing data directly in a table in datasheet view

ii. Entering data using forms (to be discussed later)

Typing data directly in a table in datasheet view

a. Double-click the table to open it in datasheet view


b. Click first row in the table and type the entries
c. Click Save icon to save the entered data
Note: the following symbols appear in row header as you enter records:

• Pencil: This means that the current record is not yet saved. Note: in Access 2007, a record is
automatically saved in a table after it has been typed.

• Asterisk (*): This marks a blank record below the current entry.

• Arrowhead: This indicates that there is no new data entry or no edit is pending..

Record locked: This indicates that the current record is being edited by another user in a multiuser or
networked environment

14
Deleting Records

To delete unwanted records:

a. Open the table in datasheet view

b. Click the row header of the record(s) you want to delete in order to select the records.

c. Click Home tab and then choose Delete in the Records command group. Access will prompt
you that you are about to delete 1 or 2 records if you selected 2 records

d. Click Yes button in the dialog box

OR

• Right-click a record in the table

• Choose “Delete record”

Editing Cell content

i. Click inside the cell and erase the current entry

ii. Type the new content

OR

a. Click on the left border of the cell when the cell indicator appears to select the cell

b. Type the new content to replace the existing content

Searching for Records

To find and replace a field content:

i. Click the field e.g. First name

ii. Click Home tab

iii. Click Find

iv. Type the word in the Find what box you want to search for and word you want to replace
with in the Replace with box. You can also use Wildcards such as asterisk(*) or question
mark(?) e.g. type J* in first name or type the name

Copying and Moving Records

Use the Copy command to create a duplicate copy of records in another table and Cut command to
move a record to another table. To Copy or move a record:

i. Select a record to be copied or moved to another table

ii. Click Home tab and choose Copy or Cut

iii. Open the other table(i.e. destination/ target) table in datasheet view

iv. Click the destination row in the new table

v. Click Paste button

15
Sorting and Filtering Records:

 Sorting: refers to arranging records either in increasing or decreasing order either


numerically or alphabetically.

 Filtering: refers to extracting a subset of records from a table that meets a given criteria.

Sorting Records: To Sort records in a table, do the following:

i. Select the records to be sorted

ii. Click Home tab

iii. In the sort and filter group click Sort icon for Ascending or Descending order

To Sort all records in a table by a particular column(field)

i. Right-click the column you want to sort the record by

ii. Choose sort A to Z or Z to A

Important note: Numbers stored in text field data type are sorted as text so they must be given same
length(i.e. they must be padded) for example 1,11,2,22 must be 01,11,02,22 then sort them.

Filtering records

There are four techniques or options for filtering records:

a) Filter by common filters where you filter by using a particular value which is checked

b) Filter by selection where you filter for records that contain the selected value e.g. age 17

c) Filter by form which involves filtering records using more than one field e.g. First name and
Surname

d) Advanced filter in which you filter records that meet a particular criteria(condition) e.g.
Surname “Banda” Or “Tembo”

a) Filtering records using common filters

i. Open the table in datasheet view and click a field you want to filter by

ii. Click Home tab. In the Sort and Filter command group , Click Filter icon that looks like a
funnel

iii. To filter for a specific value, use the check box. Only the records with the checked field
will be displayed after clicking OK.

Note : To remove the filter(to view all records in the table)

• Click “Toggle Filter” in the Sort & Filter group OR choose Clear All Filters on Advanced

c) Filtering by Form

 This technique involves filtering records by using more than one field. E.g. Filtering for
records of students whose first name is Andrew and Surname is Banda, Age is 20 and is a
Vegetarian. Note: filtering records using more than one field helps to narrow down the
search. To filter using more than one field:

16
i. Open the table in datasheet view and Click Home tab

ii. Click on the arrow on Advanced in the Sort & filter command group and choose “Filter by
Form.” A blank form with fields in the table will appear.

iii. Click each field, an arrow will appear to the right of each clicked field. Click the arrow and
choose an entry for each field you want to include in the filter. For Yes/No fields click the
checkbox for Yes and uncheck the box for No

iv. Right-click the form filter and click Save or Click save icon to save the form fields as a Query
with a name e.g. Student20

v. Double-click the name of the Query to view the results of the filter. To get back to all
records, just close the query and get back to the table.

d) Advanced filter

 This involves filtering records using particular logical complex criteria. E.g. Filter for students
whose Surname is “Banda” Or “Phiri” another example could be filtering for Students
records whose First Name starts with A which will be “A*”

To do this:

i. Click Home tab while the table is open in datasheet view.

ii. Click on the arrow on Advanced in the Sort & filter command group and choose “Advanced
Filter/Sort” a query design window opens showing the Table fields you can base your
filtering criteria on or you can add more fields.

iii. Click any field in the Sort row to specify the sorting order for the filtered records e.g.
Ascending .

iv. Click in the Criteria row and specify your filtering criteria against each field. E.g. click
Surname field in the criteria row and type Banda Or Tembo

v. Click Save icon to save the filter query with a name. To view the results of the filter , run the
query by clicking Run icon

Examples of filtering/searching criteria

a. Like “Banda” this will display records of students with surname Banda.

b. Not “Banda” this will exclude students’ records with surname Banda.

c. Like “P*” will display records of students whose surname start with letter P.

d. Not “P*” this will display records of students whose surname does not start with letter P.

e. Between 16 And 50 if typed in age field in criteria row will display records of students whose
age is between 16 and 50.

f. Like “*A” will display records of students with surname ending with letter A.

Printing Results of a Filter(Printing filtered records)

To print filtered records or records in any table or any object:

17
i. Click Microsoft office button or click File menu while the records are displayed in datasheet
view.

ii. Point on Print then choose Print Preview.

iii. Choose the page orientation you want in the page layout group e.g. landscape and choose
the paper size you want e.g. A4

iv. Click Print. Specify the number of copies you want and print range e.g. All

v. Click Ok to start printing.

Note: If you want to print only a selected record in a table, first select the records and proceed with
the printing steps and choose Selected Records under print range.

Modifying a Database

After creating your database, one can modify the tables’ datasheet or structure, export tables to
another database or even import tables from another database. The following are tasks involved in
modification of database:

 Adjusting field/column and row size in the tables

To adjust column width:

i. Open the table in datasheet view.

ii. Point to the column border between the column headers then click and drag to the required
size.

To adjust row height:

i. Point to the border between the row headers then click and drag to the required height.

Note: All rows will be resized to the same size

To adjust row to a specific height:

i. Click on a row heading to select the row

ii. Right-click the selected row and choose Row Height

iii. Type the number for the row height e.g. 50

iv. Click Ok

Follow similar steps to adjust column to a specific width

 Adding and deleting columns(fields) and Rows(records)

18
To add a column(field):

i. Right-click on the header of the column to which you want to add a column to its right.

ii. Choose Insert column from the short cut menu

iii. Double-click the automatic field name and type a name you want

To add a row(record):

i. Right-click a row

ii. Choose New record from the shortcut menu

To delete a column(field):

i. Select a column by clicking on the field header

ii. Right-click in the column and choose Delete column from the shortcut menu.

To delete a row(record):

i. Right-click a row

ii. Choose Delete Record from the shortcut menu.

 Reordering fields in table

This involves switching positions of fields in a table. E.g. you can move First name field before
Surname field. To reorder fields to the following:

i. Select a column you wish to move by pointing to its header

ii. Click and drag it to the right or left to the position you want it to appear.

 Exporting tables and modifying table structure

Note: When you want to make some changes to your database tables, it is advisable to save a copy
of the table to avoid losing anything in case you make a mistake. Remember: Changes made to the
database tables (e.g. deleting records) cannot be undone.

To export a table:

i. Right-click the table name under tables

ii. Choose Export from the shortcut menu and choose the destination e.g. to Access database

OR

i. Open the table in datasheet view

ii. Click Microsoft office button or File menu and choose Save As or Save object As

iii. Type a new name for your table and click Ok

Creating Related Tables (Creating relationships between tables)

 You can relate tables in your database. Relationships between tables enable Microsoft Access
bring data or records from various tables back together as if they were saved or held in one
table.

19
 One of the technical part in design of relational database is to link tables using a foreign key
that references a primary key of another table. A foreign key is a field in a database table
that matches primary column(primary field) of another table. It is basically a primary key of
one table introduced in another table to relate records in the two tables.

 For example, to keep track of a parent for each student, introduce Parent ID field (a primary
key in Parent table) in the Student table (as foreign key) to indicate a parent for each student.

The Parent ID will be a foreign key field in the Student table since it is not originally supposed to be in
that table. It has just been introduced to relate records in the two tables.

Types of Relationships

There are three types of relationships that can exist between records in tables. The relationships are
named according to the number of records that are involved in the relationship. The types are:

a) One-to-one relationship

b) One-to-many relationship

c) Many-to-many relationship

a) One-to-one relationship

 This is a type of relationship in which the primary table(reference table) has only one related
record in the related(child) table and vice versa. This means that a record in the
primary(reference) table will only be related to one record in the related(child) table.

 For example: In a marriage database with two Husband and Wife tables, assuming that these
are Christian marriages, then one husband record will be related to one wife record only.

Note: Relationships between records in tables are represented using a diagram known as Entity
Relationship Diagram(ERD)

Below is Entity Relationship Diagram(ERD) showing one-to-one relationship

20
Note: Most one-to-one relationships are forced by rules that do not follow naturally from data(i.e.
rules from an institution). In the absence of such rules, you can just combine both tables(i.e. put the
records in one table)

b) One-to-many relationship

 This is a relationship in which a single record in the primary table corresponds to(relates to)
more than one record in the child or related table, but each record in the child table is
related to only one record in the primary table. For example, one parent can have many
children, while each child has one parent. Below is an Entity relationship diagram
representing one-to-many relationship

c) Many-to-many relationship (also called Non-specific relationship)

 This is a relationship in which each record in the primary table corresponds(relates) to


more(many) records in the child table and vice versa. For example: In a database tracking
Teachers and Subjects they teach, a teacher may teach more than one subject while at the
same time a certain subject may be taught by more than one teacher. ERD below shows
Many-to-Many relationship

Note: Relational databases do not directly handle many-to-many relationships. To represent this type
of relationship, there is need to create a third table known as an associated table that converts the
relationship to two one-to-many relationships.

Creating One-to- Many Relationship in MS Access

E.g. Create a one-to-many relationship between Parent and student Tables. To do this follow the
steps below:

1. Introduce(include/type) Parent ID field (from primary table i.e. Parent table) as a foreign key
field in student table(related/child) table. To do this open the Student table in design view.
Type the Parent ID field in it. NOTE: Make sure that the primary key and its corresponding
foreign key have the same data type. E.g. Primary key Parent ID has Text as data type and its
foreign key field Parent ID in student table has Text as well as its data type.

2. Save the content you have added to the table design view and exit the design view.

21
3. Click Database Tools tab, then click Relationships button. This opens the
relationship window.

4. Click Show table button in the Relationship command button.

5. Click Tables tab, the table names will be displayed. Select the tables you want to relate ie.
Parent table and student table, then Click Add button.

6. Close the Show table dialogue box.

Note: the tables will be added and displayed in the relationship window. You can point on the edges
of the tables and resize the tables by clicking and dragging to see all field names

7. Drag Parent ID(primary key) from primary table Parent Table and drop it onto the Primary
ID number(foreign key) in the Student table(related table).The Edit relationship dialog box
appears. If needed, you can enforce referential integrity(i.e. each record must be related to
another).

8. Click Create button to establish the relationship. The relationship is indicated by a joint line
between the primary key and its corresponding foreign key.

Note: You can edit or delete the relationship by right-clicking the joint line.

9. Click on Save icon to save the relationship you have created before closing the relationship
window.

10. Open the child(related table) i.e. Student table in datasheet view and type Parent ID
assigning a parent to each student record.

Note: Creating one-to-one relationship involves the same process only that when you will be typing
data in the foreign key field there will not be any repetitions since one parent will only relate to one
child record.

Enforcing Referential Integrity

 Referential integrity is a relational database integrity rule that ensures that every record entered
in the child table(related table) has a related record in the primary table. E.g. There must be no
student record without a parent. When you enforce this Access will not allow you to enter child
records with blank Parent ID number(foreign key) field. To enforce referential integrity:

22
i. Click Database Tools tab, then click Relationships to display the relationship window.

ii. Right-click the joint link between the two tables and then click “ Edit Relationship” to open
the dialog box

iii. Select “ Enforce Referential Integrity” check box to enforce referential integrity

iv. Click Ok to close the dialog box

Creating Many-to- Many Relationship in MS Access

Create a database named 2020TEACHERSUBJECTS and create two tables:

Teacher table with the fields (Teacher_ID, Surname, FirstName, Gender)

Subjects table with the fields: (SubjectCode, Subject Name)

• Introduce the field Teacher_IDD in Subject table as foreign key field to link the tables
Teacher and Subject.

• To create many-to-Many relationship between Teachers and Subjects introduce a third table
TeacherSubject with the fields: (Teacher_ID, SubjectCode, Term, Academic Year)

Note: The primary key of TeacherSubject table is a composite primary key(i.e. Two-in-one primary
key) borrowed from the two related tables. The fields Term and Academic Year in the TeacherSubject
table depend on the composite primary key Teacher_ID ,SubjectCode.

To create a composite primary:

i. Open the TeacherSubject table in Design view

ii. Press and hold down the Shift key as you click the fields to make the composite primary key
i.e. Teacher_ID and SubjectCode

iii. Click the Primary key icon

iv. Click Database Tools tab, then click Relationships button.

v. Click Show Table to display the show table dialog box. Click each table and use the Add
button to add the Teacher table , TeacherSubject table and the Subject table to the
Relationships window.

Click and drag the Teacher_ID primary key from the Teacher table and drop it onto the Teacher_ID in
the TeacherSubject table. Next drag SubjectCode primary key from Subject table and drop it onto
SubjectCode in TeacherSubject table

 In the Edit relationship box click Create button to establish two one-to-many relationships
forming many-to-many relationships. Click Save icon and close the relationship window

23
 Enter data in fields to indicate the relationships between records in the tables.

 See the records in the third table(TeacherSubject table) one teacher (i.e. Teacher1) is teaching
more than one subject( Subj21 and Subj02) creating one –to- many relationship at the same
time, one subject(i.e. Subj44) is being taught by many teachers(i.e. Teacher 2 and Teacher 3)
creating another one-to-many relationship. There are two one-to-many relationships in the table

creating a many-to-many relationship.

Navigation buttons in Table Datasheet view

 Below are buttons that help you navigate between records in your table when you open it in
datasheet view. Note: The buttons are located in the Record bar which appears at the far
bottom of your table datasheet view window.

Creating Data Forms

 A form is a database object that enables the user enter data into and also view data from
tables or queries.

• A form is basically a graphical interface that a user uses to enter records or view records from
tables or queries in your database. For example: you can create a form with students fields to
enable you enter new data or records in the students table without typing the data directly
in the table. Note: You can design and create a form in two ways :

24
i. In Design view

ii. Using a form wizard

In Microsoft Access, a form is designed using a form object and field controls.

A control is an object (e.g. a textbox,checkbox,button, label) that you can place on a form design to
display data or perform an action. To display controls:

i. Click Create tab

ii. Click “Form Design” the controls are displayed. You can click and draw each one of them
onto the form design.

Types of Controls

There are two types of controls:

a) Bound Controls:

 These are controls whose source data is a field in a table or query e.g. Student ID label on a
form design will identify entries in Student ID field

a) Unbound Control:

 This is a control that is not related to any data source(i.e. not related to any field in any table)
in your database. E.g.. Textbox where you can type your own text like your name on the form

Note: When designing your form you place the controls in their required position be it in Header
section, Detail section or form footer. You can also resize these sections of a form by clicking and
dragging the borders.

i. Designing/ creating a form using form wizard

A form can be designed using a form wizard. A form wizard is a feature that takes you through
series of steps to select fields, layout of data and background style for your form. To create a
form using a form wizard:

a. Click Create tab in the forms command group. Click More Forms then choose Form Wizard.

b. In the Form wizard dialog box, select the table or query you want to create a form for (e.g.
Parent table) and select the fields you want to appear on the form. Use the single arrow to
move each field from the source fields to the selected section. Use the double arrow to
move all available fields from the source table or query to the selected fields section to be in
your form.

25
c. Click Next button and specify the form layout. Layout refers to how data will be displayed on the
form.

Below are some form layouts:

 Columnar form: This layout displays fields for each records down a column. Each value is
displayed on a separate line with field labels to the left.

 Tabular form: This layout displays records from left to right across the page. The labels
appear at the top of each column and each row represents a new record.

 Datasheet form: This layout resembles a table datasheet view.

 Justified form: This is a form layout in which one record occupies the whole from.

d. Click Next button and specify the style for your form. A form Style is basically a background
of your form. E.g. Apex, Aspect, Median and others listed styles.

e. Click Next button and save your form with a name e.g. ParentForm . Click Finish button to
open and view the form and enter new records using the form. You can also modify your
form in form design view.

Note: Use Record navigation buttons to move between records.

 To add a new record to the table, click the new record navigation button to get to a blank
record and type the new record then click Save icon to save the data you have just entered
using the form.

 To print the form:

1. Click Microsoft office button while the form is open or click File menu

2. Click Print.

ii. Creating Forms in Design view

 This involves designing a form from scratch using the design grid.

To design a form in design view:

1) Click Create tab and click Form design.

26
2) On the right of design grid is a Field List pane. Expand the list for each table by clicking the
plus sign at the beginning of the table you want to get fields from to be in your new form.

3) Drag and drop the fields from the fields list on the design grid.

4) Add other controls on the form such as Buttons,, Text boxes etc.

• You can also resize field names and their labels boxes to a size they will be able to display all
content(i.e. not cut content)

• You can also move the fields using the move handles that appear at the top left corner of
each control by dragging.

5) Save your form by clicking Save icon and type a name for the form e.g. ParentForm and Click
Ok. You can then open your form in Form View to enter new records or view existing records
in the tables.

Creating Queries

Note: The term query in general means a question.

A query (in database context) refers to a question that is used to instruct a database to retrieve(get)
particular data or perform a particular operation e.g. delete or update data.

• The language used to query a database on behalf of the user is called Structured Query
Language (SQL)

Classes/ Types of Queries

There are two main classes or types of queries in relational databases:

A. Select query

B. Action queries

A. Select query

 This is a type of used for searching and retrieving required data from one or more tables in
the database.

Note: Select query enable users to search for data from the database using specified criteria and
displays the records that meet the specified criteria in a query datasheet called a dynaset.

B. Action queries

27
 These are queries that are used to perform actions that make changes to records in tables in
the database. Action queries are used to delete, update, add a group of records from
another table or creating a table from another table. Below are types of action queries:

i. Update query

ii. Append query

iii. Delete query

iv. Make table query

Note: To create each of these queries open a query in design view

Below is a description of each type of action query

Type of Action Query Description

Update query This is an action query that updates data in a table. E.g. you can
update ones age.

Append query This is an action query that adds data (records) in a table from
another table

Delete query This is an action query that deletes specified records from one or
more tables.

Make Table query This is an action query that creates a new table from a dynaset(i.e.
records obtained after a search)

Note: Queries can be created in two ways :using query wizard and in Design view tool.

Creating Queries using a Query Wizard

i. Click Create tab and click Query wizard command. This opens the New query dialog box.

ii. Choose Simple Query wizard in the dialog box and click Ok.

iii. Under Tables/Queries click the table or query that has fields you want to include in your
query e.g. Parent table and pick the fields you want to be included using the arrow buttons
and click Next button

iv. Type the Title or name for your query to save the query and click Finish button to finish the
wizard and view the results of the query.

To specify query criteria:

• Open the query you have created in Design View and type the criteria(condition) under the
field you want to search for the data you want in criteria row.

28
• Remember to click on Show check boxes under the fields you want to be shown in your
query.

Note: Since a query is a question, it will get different results each time you change the criteria in each
search. When you type a search criteria, run the query by clicking the Run icon on design tab to get
the results that match the search criteria.

To create a query in design view, follow the procedure below:

i. Click Create tab and choose Query Design. The show table box opens displaying names of
tables in your database and also previously created queries.

ii. Click the tables or queries with the fields you want to include in your query and Add then in
query design window. E.g. Parent or Student or both tables. Click Close to close the window.

iii. Click and drag each field you want to be in the new query and drop it in a particular column
in the Field row in the query design grid until all the fields you want are included.

Below are important sections of the query design grid:

Query section Description

Field row This show or displays fields from tables to be used in the new query. Each field
occupies its own column.

Table row This shows name(s) of tables or queries from which a field was obtained

Sort row This allows you to specify the sort order i.e. ascending or descending by clicking in
it under a particular field.

Show row This allows you to specify whether to display a field in the query results or not. If
the box is checked , it means the field will be displayed in results.

Criteria row This is where you enter a condition or expression that will be used by the query to
display specific records.

Or row This is used to specify an alternative condition for searching( e.g. Type Banda in
criteria row and Phiri in the Or row to get students’ records with surname Banda
or Phiri.

iv. Specify query criteria(i.e. search criteria or conditions) in each field you want to use for
searching records.

To search for a particular set of records, you have to enter a conditional statement in the criteria row.
E.g. type >20,000 in the fees field to get records of students whose fees is greater than 20,000.

Note: When defining query criteria use either relational or logical operators.

29
Relational operators include:

• Less than <

• Greater than >

• Equal to =

• Grater than or equal to>=

• Less than or equal to<=

• Not equal to <>

Logical operators include:

• AND e.g. >40000 AND <50000 will display records with fees greater than 40000 but less than
50000

• OR e.g. “Phiri” OR “Banda”

• Between… And ….. E.g. Between 20000 And 50000

• Not e.g. Not 20000 will exclude records with fees 20000

• LIKE e.g LKE “ Banda” will get records with surname Banda.

Note: You can also use wildcard characters to search for records you only remember part of
characters in them e.g. LIKE “B*” will get records of students with a surname that start with B and
continues with any characters . Or use LIKE “B????”

Note: When searching fields with Yes/No data type, Type Yes or No in the search criteria .

v. Save and run your query: Click the Save icon ands type a name for your query. Click Run icon
on the Design tab to search records and display the results

Sorting query results

To arrange query results in a particular order:

a. Open the query in Design view i.e. Right-click the query name and choose Design view.

b. In the Sort row specify the sort order on the desired field e.g. Ascending order by Surname

c. Run the query to display the dynaset

Modifying Queries

 This involves removing some fields, resizing columns, changing the search criteria and
changing fields to be displayed.

To delete fields from query grid:

1. Open the query in Design view

2. Select the column containing the field you want to delete by clicking its header

3. Click “Delete Columns” in the query setup command group.

To adjust column size in a query

30
1. Open the query in Design view

2. Position mouse pointer on the border that separates column headers then click and drag to
the column width you want.

OR

Double-click the border to resize the column to fit the contents.

To modify the search criteria or condition:

1. Open the query in Design view

2. Change the criteria in the criteria row

3. Click Save button to save the new criteria and run the query to display new results

Creating/Generating Database Reports

 A Report is a database object that is used to summarize and present information from a
database in a more professional and printable layout. A report can be designed in two ways:

 Using report wizard

 In Design view

Generating Reports using Report Wizard

A report wizard takes the user through a number of steps by answering a few questions and then
automatically creates the report. To generate a report, proceed as follows:

1) Open your database

2) Click the Create tab and then click Report Wizard button in the Reports group

3) On the New report dialog box, select the Table/Query and the fields to be added to the
report using the arrows and then click Next

4) The wizards prompts you whether you wish to add grouping .Grouping is used to classify
records using a particular field e.g. you can categorize students by using class like form 1,
form 2 etc. It keeps records together based on one or more fields. Click Next.

5) In the screen that appears, select the Sort option if you want to sort the records. You can
also click the Summary options button if you want Microsoft Access to perform calculations
on some fields. Use the summary options screen box to select the summary options you
want Access to perform suck as Sum, Average, Minimum, and Maximum. Click Next

6) Select the type of layout for your report in the Layout screen e.g. Stepped, Justified. Specify
the page orientation e.g. Landscape then click Next

7) In the style screen box, Specify the report style e.g. Bold, Casual or any other. Click Next

8) Enter the name of your report then click Finish. The report will be displayed on the screen in
print preview mode.

Creating Reports in Design View

31
This involves placing controls on the report design grid to come up with the report design you want.
To create a report in design view, follow the procedure below:

9) Click the Create tab, then select Report Design in the Reports group. A blank report design
grid is displayed.

The report design grid has the following sections

Report Section name Section Description

Report Header This section contains unbound controls that display the title of
report

Page Header This contains headings or labels for the data items to be displayed
in every column

Detail section This hold bound controls that display data items for the table or
query it was created from.

Page footer This holds a control(a footer0 that is to be displayed on every page
such as the page number and date e.g. =Now() displays the current
data and time in all pages as set in the system clock

Report footer This is used to display summary information from a report such as
grand totals.

ii. To select the table or query for which the report is to be created click Property sheet in Tools
group of Design ribbon.

iii. On the displayed property sheet, click the Data tab and then specify the table/query name
in the Record Source.

iv. Click the Field list button( Add Existing Fields) in the Tools group to display fields associated
with selected table.

v. To design the layout, drag each field from the field list onto the layout grid and drop it where
you want it to appear.

vi. When you finish placing the controls, click the Save icon on the Quick Access Toolbar. Type a
name for the report and click Ok.

vii. Click the Print preview button to view the report.

Creating/Generating Labels

 A label is a tag placed on an item for ease of identification. Examples of tags include name
tags, mailing labels, bottle stickers etc. To generate labels using report wizard, do the
following:

1. Open the database

32
2. Click the Create tab then click Labels button in the reports group. Labels wizard starts
running.

3. Specify the label size, font, fields to be included in the label and also name of the label. Click
Finish.

Use the following procedure to print various objects in your database:

1. Select a table, query, form or report by clicking it OR open the object in Datasheet view.

2. Click Microsoft office button or File Menu and choose Print. You can also preview the object
you want to print to set page orientation, paper size e.g. landscape, A4 size .

3. Choose your Print options then

4. Click Ok to start printing

Database Security

Data in the database must be secured. Microsoft Access provides users with a number of data
security features to secure data in the database. These features include: encryption(i.e. converting
data into a code/ symbols), password protection, hiding database objects (e.g. hiding table) and
user-level security.

Note: A password protection is one of the mostly used ways of protecting data in your database. To
protect a database using password, do the following:

1) Open the database in exclusive mode(i.e. open Access, then click File menu then click Open.
Point Open button Arrow and choose Exclusive)

2) Click File menu or Database Tools Tab, point Encrypt with password.

3) The Set Database Password dialog box appears. Type your password in the Password textbox

4) Re-enter the password in the verify text box then click Ok.

Self-Test Questions

1. Define the terms:

• Database

• Database schema

• Database model

• Record

• Field

• Encryption

• Validation rule

• Validation text

• Primary key field

• Foreign key field

33
2. Explain three ways you can use to protect your database from unauthorized access.

3. State any three advantages of enforcing database security.

4. State any four advantages of electronic databases over manual filling methods.

5. Use entity relationship diagrams to represent each of the following relationships:

 One-to one relationship

 One-to-many

 Many-to-many

6. State any four database objects and give the function of each object.

7. What factors should be considered when designing a database.

INTRODUCTION TO COMPUTER NETWORKS

Definition of terms

 A network: is a collection of independent entities (items) arranged together to exchange data,


information or other resources.

34
Note: the definition above is broad and covers both computer networks and other non-computer
networks like telephone networks, road networks etc.

 A computer network: is an interconnection (interlinking) of computers using transmission media


that enable sharing of resources or exchange of data / information.

Types of Computer Networks

Note: Computer networks can be classified using several aspects such as topology (i.e. star, mesh,
ring, bus), design/architecture (i.e. client-server and peer-to-peer) and size. Classes of computer
networks according to topology and design were already discussed in form 3. Below are 5 types of
computer networks according to size:

1. Personal Area Network(PAN)

2. Local Area Network (LAN)

3. Metropolitan Area Network (MAN)

4. Wide Area Network(WAN)

5. Storage Area Network (SAN)

1. Personal Area Network (PAN) [also called Home Area Network (HAN)]

This is a type of network setup at home using personal devices.

For example:

An interconnection of a laptop to a mobile phone via Bluetooth is a PAN.

2. Local Area Network (LAN)

This is a computer network that covers(spans) a relatively small geographical area such as a
building or a school block.

Note:

• A LAN is usually owned by one organization but it can sometimes be connected to other
LANs over a distance via data transmission lines or electromagnetic waves.

• Most LANs connect personal computers and server computers on a small network. A server
computer: is a computer that is dedicated to servicing requests for resources from
workstations or clients on a network. LANS enable users share expensive devices such as
laser printers and data.

3. Metropolitan Area Network (MAN)

 This is a computer network that covers a metropolitan area like a town or city.
 A MAN is made up of many local area networks in a town or a city. It size covers a radius of
between 5 to 50km.
 A MAN can be owned by a company that has offices across the city e.g. National Bank has
many branches within Blantyre city. They have interconnected local area networks in their
Blantyre branches to create a MAN.

4. Wide Area Network (WAN)

35
 This is a computer network (larger than MAN) that covers a larger geographical area. E.g. a
network that covers a country, continent or the whole world. Such as the internet.
 A WAN is basically made of local area networks and metropolitan area networks connected
together to form one large network.
 When a WAN covers the whole world(e.g. the internet) it is called a Global Area
Network(GAN)

5. Storage Area Network (SAN)

 This is a network of powerful computers that have powerful processors, huge memory and
data storage capabilities that can be accessed from anywhere in the world using personal
computers, Smartphone, tablets etc.
 An example: Cloud computing networks where you can save your data in an online
secondary storage computer and access your file as if it were located on your local computer.

Network Topologies

Network topology refers to logical and physical arrangement of computers and other devices on a
network.

Types of Networks Topologies

1. Star Topology
In a star network topology all nodes are directly connected to a common central computer
that is often referred to as a hub.
When the hub receives data from a trasmiting computer, it broadcasts the message to all the
other nodes on a network.

Advantages of Star topology


 Less Expensive than Mesh topology.
 • In a star topology, each device needs only one link and one I/O port to connect it to any
number of other
 devices. This factor also makes it easy to install and reconfigure.
 • Less Cabling, Addition and Deletion involves only one connection between the devices
and the Hub or
 Switch.
 • Easy for Fault identification and fault isolation. If one link fails, only that link is affected.
All
 • other links remain active.

36
 It allows centralization of key networking resources like concentrators and serves.
 It gives the network administrator a focal point for network management. The
administrator can troubleshoot from one place.
 They are easy to configure.

Network Software

There are two main groups/classes of network software. These are :

A. Network Operating System(NOS)

B. Network protocols

A. Network Operating System (NOS)

 These are operating systems designed to support a network by improving the ability of
networked computers to respond to service requests.
 Servers run on network operating systems(NOS). Examples of network/server operating
systems are:

o windows server 2008

o Solaris

o Netware

Functions of Network Operating Systems (NOS)

Apart from the functions of normal O.S., NOS perform the following network related functions:

i. Providing and controlling access to network resources. e.g. shared printers, folders etc.

ii. Enabling nodes on the network to communicate with each other efficiently.

iii. It supports interprocess communication(i.e. it enables various processes on the network to


communicate with one another)

iv. Responding to requests from application programs running on the network.

v. Supporting network services such as network interface card drivers and network protocols
(i.e. translating protocols)

vi. Implementing network security features to ensure that there is no unauthorized access to
network resources. E.g. blocking requests from unauthorized users.

Note: Internetworking devices such as routers also have operating systems of their own that
can be managed and configured to improve performance of the network. Note: Routers are
special purpose computers.

B. Network Protocols

 Protocols are a set of rules and procedures that govern communication between two
different devices or people. In computer networking, Protocols are rules and technical
procedures that govern communication between different computers. They usually
determine the format of data and transmission procedure to be followed.

37
 NOTE: The data transmission process over the network has to be broken down into separate
systematic(orderly) steps. At each step, a certain action takes place. Each step has its own
rules and procedures to be followed as defined by network protocols.
 The work of network protocols must be coordinated to ensure that there are no conflicts or
incomplete operations between communicating devices. To achieve coordination of the work
of network protocols, protocol layering was introduced.
 In a world full of innovations from different people, it is difficult to dictate uniformity on how
protocols are developed and how communication between devices on network should
happen.

Communication Reference Models

There are two communication models:

1. The OSI model

2. The TCP/IP protocol model

To avoid network protocols that conflict, International Standards Organization (ISO) developed a
communication standard reference model for all developers of protocols world wide called the Open
System Interconnection (OSI)reference model.

Note: The Open System Interconnection (OSI) is not a protocol but a blue-print or a reference point
or a standard guideline for developing high quality protocols.

A). Open System Interconnection (OSI) Reference Model

 Network protocols are designed after (based on) the OSI reference model. The OSI model has
seven layers. The OSI reference model describes the flow of data in a network through seven
layers, from the user’s application to the physical transmission media. Each layer performs a
different function. (Note: On the sending side the order is from layer 7 to layer 1 while on
the receiver’s side the order is from layer 1 to layer 7)
 On the sending point, data enters at the top floor (the application layer) and travels to the
bottom floor (the physical layer). Each layer communicates with the layers immediately
above and below it. When a layer receives data, it performs specific functions, adds control
information to the data, and passes it to the next layer. The control information contains
error-checking, routing, and other information needed to ensure proper transmission along
the network.

See the 7 layers of OSI model on the diagram:

38
OSI Model Layer Function

7. Application layer This layer serves as the interface between the user and the network. Using
application software, such as an e-mail program, a user can type a message and
specify a recipient. The application then prepares the message for delivery by
converting the message data into bits and attaching a header identifying the
sending and receiving computers.

6. Presentation layer The presentation layer translates the converted message data into a language the
receiving computer can process (e.g. from ASCII to EBCDIC) and also may
compress or encrypt the data. Finally, the layer attaches another header
specifying the language, compression, and encryption schemes.

In simple terms, It is a layer where data is formatted for transmission (at sending
point) or formatted for use by an application (at the receiving end) e.g. ASCII,
JPEG (Joint Photographic Expert Group) for compressing color images)/ GIF,
encrypts or decrypts data.

39
5. Session layer The session layer establishes and maintains communications sessions. A session is
the period between establishment of a connection, transmission of the data, and
termination of the connection. The session layer adds protocols that sets up a
communication session between the communicating devices , maintain the
connection for data exchange and terminate the session after communication.

4. Transport layer The transport layer, also called the end-to-end layer, ensures that data arrives
correctly and in proper sequence. The transport layer divides the data into
segments and create a checksum (i.e. A digit representing the sum of the digits in
an instance of digital data; used to check whether errors have occurred in
transmission or storage). The information is later used to determine if the data
was scrambled during transmission.

3. Network layer The network layer routes the message from sender to receiver. This layer splits the
data segments from the transport layer into smaller groups of bits called packets.
It then adds a header containing the packet sequence, the receiving computer
address, and routing information (i.e. sending device’s network address and
receiving device’s network address e.g. IP address). The network layer also
manages network problems by rerouting packets to avoid network congestion.

2. Data Link layer The data link layer supervises the transmission of the message to the next
network node by specifying the network technology (such as Ethernet or token
ring) and grouping data accordingly. The data link layer also calculates the
checksum (A digit representing the sum of the digits in an instance of digital data;
used to check whether errors have occurred in transmission or storage) and keeps
a copy of each packet until it receives confirmation that the packet arrived
undamaged at the next node.

1. Physical layer The physical layer encodes the packets into a signal recognized by the medium (at
the sending point) that will carry them (such as an analog signal to be sent over a
telephone line) and sends the packets along that medium to the receiving
computer.

In simple terms: the physical layer encodes data (to suit the channel e.g. from
parallel to serial form),adds error checking information and transmits data bits to
a transmission medium to the receiving computer.

NOTE: At the receiving computer, the process is reversed and the data moves back through the seven
layers from the physical layer to the application layer, which identifies the recipient, converts the
bits into readable data, removes some of the error-checking and control information from the data,
and directs it to the appropriate application(i.e. application program to open and display the
message to the user)

Below is a simple explanation of the OSI communication model data transfer:

i. The user creates a message to be sent over the network using an application program
running at layer 7 (application layer) of OSI model(e.g. an e-mail application). The user then

40
presses Send button, the message is passed to the application layer whose protocols add an
Application Header(AH) to the message.

ii. The message is passed down the layers all the way to the physical layer(at the sending point).
Each layer adds its header to the message (e.g. presentation header (PH),session header (SH)
etc. until it is sent to the network channel at the physical layer.

iii. At the receiving end, the message undergoes a reverse process(i.e. each layer rips off its
header e.g. if the message was encrypted at the presentation layer, it is decrypted at the
same layer). All headers are removed as the message goes up the layers(from layer 7 to layer
1) until the original message is presented to the receiving user application that displays it to
the receiver.

Examples of Protocols at each layer /level of the OSI

Layer/Level of OSI Protocols at the Layer

7. Application layer Simple Mail Transfer Protocol(SMTP), File Transfer Protocol(FTP)/ Telnet(for
remote login)

6. Presentation layer ASCII, JPEG, GIF etc. These protocols format the data ready for
transmission.

[Link] layer Remote Procedure Call( RPC), Point-to-Point Tunneling Protocols(PPTP), OSI
Session layer Protocol (OSI-SP)

4. Transport layer Transport Control Protocol (TCP), Sequence Packets Exchange(SPX)

3. Network layer Internet Protocol(IP), Internet Control Message Protocol (ICMP)

2. Data link Ethernet, Token ring, Point-to Point Protocol (PPP), Wireless Access
Protocol(WAP)

1. Physical layer There are no protocols. It only has encoding techniques, bit streaming and
transmission techniques e.g. baseband, broadband etc.

Below is a description of some important protocols:

Application protocols (at layer 7)

• SMTP(Simple Mail Transfer Protocol): This is the internet standard for electronic mail.

• FTP(File Transfer Protocol): This enables a person to transfer files on the internet.

41
Transport Control Protocol(at layer 4-transport layer)

• TCP(Transport Control Protocol): This ensures reliable transfer of data from source to
destination. It breaks down message into packets and assigns them with sequence number
so that the message can be correctly reconstructed at the destination.

• UDP(User Datagram Protocol)-This is an unreliable data transfer protocol and it is used to


transfer non-user data such as control signals, that control the transmission.

Network protocols(at layer 3-network layer)

These are protocols that provide routing services. They handle addressing and routing
information, error checking and retransmission.. These protocols include:

• Internet Protocol(IP)-This does packet forwarding and routing using addressing systems
called IP addresses. Note: Each network on the internetwork(internet) has a unique IP
address.

• OSPF(Open Shortest Path First) protocol: This helps in efficient routing of data on internet as
it analyses all routes and chooses the one with least costs to transfer the packets.

Note: In networks, some devices work at networking level( i.e. they link nodes to a network) while
others work at internetworking level (i.e. they link a network to another network)

OSI Layer Devices Level of operation

7 Gateway internetworking

6 Gateway internetworking

5 Gateway internetworking

4 Gateway internetworking

3 Gateway, Router internetworking

2 Gateway, Router, Switch, Bridge, NIC Networking

1 (physical layer) Gateway, Router, Repeater Switch, Bridge, Networking


Hub

Note: Router and Gateway are both networking and internetworking devices.

B). TCP/IP Protocol model

(Developed in 1978 before OSI reference model)

• The Transmission Control Protocol (TCP)/ Internet Protocol(IP) model was developed to
enable internetworking on the internet.

42
• It combines the transport control protocol (TCP) and internet protocol(IP) into one. TCP/IP is
a set of protocols (including TCP) developed for the internet to get data from one network
device to another.

• Like OSI reference model, TCP/IP protocol model also has a layered structure only that
instead of 7 layers it has four(4) layers.

Layers of TCP/IP Protocol model

Below are layers of the TCP/IP protocol model from top to bottom:

4. Application layer

[Link] layer

2. Internet layer

1. Network interface layer

• Note: The Application layer, Presentation layer and Session layer are combined into
Application layer in the TCP/IP protocol. The Data link and Physical layer are what makes the
Network interface layer of the TCP/IP model.

Table below: OSI model layers and TCP/IP model layers

OSI model TCP/IP model TCP/IP Protocols

Application layer FTP, SMTP, Telnet

Presentation layer Application layer

Session layer

Transport layer Transport layer TCP, UDP

Network layer Internet layer IP

Data link layer Ethernet, Token ring


Network interface layer
Physical layer

Comparing OSI reference model and TCP/IP Protocol model

Similarities between OSI model and TCP/IP model

i. They have a similar architecture(i.e. they both have a layered design.)

ii. They both have the Application layer

iii. The network layer in OSI and the Internet layer in TCP/IP model perform same function

iv. Both models support packet switching and routing on networks.

43
Differences between OSI model and TCP/IP model

a. OSI model has seven layers while TCP/IP model has four layers.

b. The Session, Presentation and Data link layers present in OSI model are missing in TCP/IP
model.

The internet and intranet

 internet: is a global public network of interconnected computer networks.


It is a computer network consisting of a worldwide network of computer networks that use the
TCP/IP network protocols to facilitate data transmission and exchange.
 intranet: is a restricted (private)network of computers belonging to an organization or agency. It
is a network of computers within an organization. E.g. network of computers belonging to
National bank of Malawi.

Note: Only those with permission are allowed to access information resources on the intranet.
Intranet is connected using TCP/IP protocols.

Methods of internet access

The following are methods that can be used to access the internet:

1) Connecting via telephone lines

2) Connecting via mobile telephone networks

3) Accessing the internet via fiber links

4) Wireless internet access using WiMax and Wi-Fi

1) Connecting to internet via telephone lines

The telephone line has been one of the most widely used methods of connecting a network or
computers to the internet. Below are ways of connecting to internet via telephone lines:

a. Use of analog telephone lines that support dial up connections (circuit switched
connections):

Here you need to have a modem between computers to convert digital signals to analog
signals to be carried to the receiving end where there is another modem that demodulates,
converting analog signals back to digital signals to be handled by the computer.

b. Use of Digital leased lines

This is a digital line that gives you permanent connection to internet(unlike the dial up).

In this case you do not need a modem as the line is already a digital signal carrier. However a
codec is required to control how bits are sent or received by the computers e.g. compressing
and decompressing a digital signal.

2) Connecting to internet via mobile telephone networks

44
Mobile phone networks are capable of carrying both voice and data. Through wireless modems,
mobile phones (Smartphone) and tablets, you can tether them to computers (e.g. laptop) and
access internet via mobile networks.

Types of mobile networks

i. Global System for Mobile communication (GSM)


GSM is an international standard for mobile phones. It has evolved from first generation
(1G) to second generation [2G which introduced General Packet Radio Service(GPRS)] to
third generation (3G) and now fourth generation (4G i.e. Long Term Evolution with a
speed of about 299mbps better than previous generations)

ii. Code Division Multiple Access(CDMA) network


This is a wireless transmission technology known as Evolution Data(EVDO). It has speed
of up to 2mbps. It is commonly build on wireless modems(dongles).

3) Accessing the internet via fiber links

This is the fastest method of accessing the internet since fiber optic cable carries huge
bandwidth. The subscriber simply applies to a service provider who comes and connects the
premise of the subscriber to the fiber network. E.g. GlobeMax provides fast internet to
companies.

Note: There are high initial costs but long run costs are cheaper (e.g. fast downloads)

4) Wireless internet access using WiMax and Wi-Fi

• WiMax stands for Worldwide Interoperability for Microwave.

• This uses small microwave transceivers to transmit and receive data signals both at the
service providers end and at the customer across distance of up to [Link] are
WiMax antaenas

• Wi-Fi(Wireless Fidelity) : is a wireless radio technology that is used to provide computers


and mobile devices access to internet over a distance of a few hundred feet. The access is
usually via a wireless access point which creates a radius of access called a Wi-Fi hotspot that
covers a small area such as a park, bus etc. Devices that are within range detect and connect
to Wi-Fi hotspot and access the internet when their Wi-Fi is activated.

45
Addressing System on Computer Networks

The internet is continuing to grow at a high rate such that many individuals, businesses, institutions
and others are increasingly connecting to the internet and are also using the world wide web(www)
as a platform for doing their businesses.

Note: All networks that are connected to the internet have a unique network number called Internet
Protocol (IP) number. As a general rule, every organization that has a network connected to the
internet is allocated only one IP address.

Types of Internet Protocol (IP) address

A. IP version 4(IPv4)

B. IP version 6(IPv6)

A. IP version 4(IPv4)

• This is the most common IP addressing system . It was the first to be created and it was
adopted widely.

• In IPv4 addressing system, each address is made up of 32 bits. The bits are separated into
groups of eights by periods. see below:

00000000.00000000.00000000.00000000

• Each group of eight bits can be converted to its decimal equivalent (i.e. from base 2 to base
10) to create a dotted decimal notation that is easy to read.

• In binary (base 2) notation the lowest possible IP number is:

00000000.00000000.00000000.00000000 which is [Link] in decimal (base 10) notation

• The highest IP number would be:

11111111.11111111.11111111.11111111 which is [Link] in binary notation

Remember: when converting to base 10 you use expanding method in which you multiply
each digit in smaller base i.e. base 2 by its position minus 1 and then add the results on each
position to get the decimal equivalent. See the calculation on next slide:

Example: To convert 00000000 to decimal (base 10) equivalent

=0 x 27+ o x 26+o x 25+0 x 24+0 x 23+ 0 x 22+ 0 x 21+0 x 20

=0 x 128+ o x 64+o x 32+0 x 16+0 x 8+ 0 x 4+ 0 x 2+0 x 1

=0+0+0+0+0+0+0+0

=o

Structure of an IP address

Note: The internet address has a two level structure:

46
• The leading part of the address which is called the Network number or Prefix. This number
is unique worldwide as it is used to identify each network.

• The remaining portion of the address is called the host number(i.e. A number that identifies
computers in the network)

E.g. [Link]

Network Number Host Number

192.168.100 1

Classful IP Addressing (Classes of IP addresses)

Internet addresses are divided into classes (Five classes). Designers of the addresses decided that for
easier identification of the network and for easier routing, the length of the network number should
be varied to differentiate the addresses into classes.

Note: The classes are based on the number of bits used for the Network ID( Network number) and
the host number.

Below are the classes of IP addresses:

i. Class A

ii. Class B

iii. Class C

iv. Class D

v. Class E

ii. Class A addresses

The first bit(i.e. highest order bit) of IP addresses in Class A is set at 0 and the network
number (Network ID) is made up of the first eight bits( 8bits). The twenty four bits (24 bits)
are used to identify host computers on the network.

e.g. [Link]

Network Number
Hosts Number

ii. Class B addresses

In this class of IP addresses, the first two highest bits start with 10 and the network number
(network ID) is made up of first sixteen(16) bits. The other 16 bits identify hosts.

47
e.g. [Link]

Note: 10000000 is 128 (i.e. 1 x 27 + 0 x 26)

iii. Class C addresses

This class has the first three highest bits of the addresses starting with 110. The network number
is made of first twenty four(24) bits. The host number is made of last eight(8)bits. E.g.
[Link]

e.g. [Link]

Note: 11000000 is 192 (i.e. 1 x 27 + 1 x 26 +0 x 25)

iv. Class D addresses

This class has its first four bits set at 1110 . It is reserved for IP multicasting(i.e. sending to all
networks)

v. Class E addresses

This class has the first five bits set at 11110. This class is reserved for research purposes.(e.g.
research in networks and protocols)

Note: The first three classes (Class A, B and C) are called primary classes and they are classes in
commercial use all over.

Interpreting IP Numbers

The lowest possible IPv4 IP number is

00000000.00000000.00000000.00000000 (32 bit in Binary) . In Decimal notation, it will be [Link]

The highest would be

11111111.11111111.11111111.11111111 in binary notation which is

[Link] in decimal( base 10) notation.

Note: Computers use binary digits i.e. 0 and 1.

48
Between 00000000 and 11111111 there are 256 numbers(i.e. 2n which is 28=256). The 255 in the
decimal notation comes because we count from 0. When this happens, it becomes 2n-1=28-1 which will
be 256-1 giving 255.

Note: The all zeros and all ones host addresses are reserved(i.e. are never given out).

The IP space exhaustion problem

The classful addressing has a limited number of unique network address numbers that could be
generated. In this case it is 232 which is 4,294,967,296 (since it uses 32 bits)

NOTE: At first it was never thought that this number of networks could not exist, but as internet grew
all this space neared exhaustion and it became difficult to register new networks on the internet.

This problem prompted(lead to) development of a different addressing scheme called Classless IP
addressing. After this development, there was development of new generation IP or the IPv6.

Note: In classful addressing, small organizations were allocated Class C address because in Class C,
the host number has only 8bits meaning 255-2=253 (remember the o and 1 are reserved). Large
organizations were allocated Class B (which has host field having 16 bits) while very large
organizations were allocated Class A (which has 24bits for hosts)

IP Class Range of addresses

Class A [Link] to [Link] e.g. [Link]

Class B [Link] to [Link] e.g. [Link]

Class C [Link] to [Link] e.g. [Link]

Class D 224 to 239

Class E 240 to 247

Note: 127 is not used in class A because it is used for loop back address. It is used as a local host to
test TCP/IP functionality.

Classless IP addressing

{also called Classless Inter-Domain Routing(CIDR)}

In CIDR there are no fixed boundaries between the octets(after every 8 bits) making the network
number and host numbers. Instead the IP addresses are assigned with a boundary of network
number and host number placed anywhere within the 32bit address. The router can be told where
the network number ends by including a /x at the end of the IP address . The x represents number of
bits making the network number.

E.g. [Link]/24 means the network number is 24 bit long.

49
IP Address Number of addresses per IP

[Link]/24 =28=255(i.e. 32-24=8 hence 28=255)

[Link]/22 =210=1024(i.e. 32-22=10 hence 210=1024)

Differences between Classful and Classless IP addressing

a) In classful addressing, there is strict address layout specification for the network number and
host number for various classes while in classless, the number of bits used for the network
number and host number for the address varies according to the size of the network.

b) In classful addressing, the number of bits for the network and hosts is determined by the
class of the address, while as in classless addressing ,the number of bits that specifies the
network number is specified following a forward slash. e.g. [Link]/8

c) Classful addressing bring order in the way network numbers are allocated unlike the classless
addressing which is not orderly because the network and hosts can take on an
arbitrary(random) number depending on the size of network hence increasing routing costs.

B. IP version 6(IPv6)

 This is a new generation of Internet addressing that has succeeded the IPv4.

 The IPv6 uses 128 bit addresses as such it has bigger address space to accommodate more
networks. i.e.

2128=3,402,823,669 x 1038 approximately 3.4 x 1038

• IPv6 consists of 8 groups of hexadecimal digits ranging from 0 to F separated by full colons.
See the example below:

[Link]

Note: The leading zeros (i.e. zeros in front of non-zero numbers) are omitted. With this fact
the number above will be:

[Link]

Characteristics of IPv6 address numbers

i. It uses 16 bit hexadecimal numbers (i.e. in 8 groups) e.g.


xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx Note: each xxxx group is 16 bit,meaning each x is
4bit.

ii. The numbers are separated by full colons(:)

iii. It is possible to have abbreviations. For example, leading zeros in contiguous blocks(adjacent
blocks)are represented by double colons(::)

e.g. [Link] is equivalent to [Link]

50
Binary Decimal (base 10) Hexadecimal

0000 0 0

0001 1 1

0010 2 2

0011 3 3

0100 4 4

0101 5 5

0110 6 6

0111 7 7

1000 8 8

1001 9 9

1010 10 a (represent 10)

1011 11 b

1100 12 c

1101 13 d

1110 14 e

1111 15 f

Exercise: convert 11001111 to hexadecimal

Steps:

51
• first group the digits i.e 1100 1111

• Use the table i.e. 1100=c while 1111=f

Therefore 11001111 =cf in hexadecimal.

Specifying the network and host numbers in IPv6


NOTE: Use the CIDR (Classless Inter-Domain Routing) prefix representation i.e. a slash followed by
the length of the network number (bits making up the network number) written after the IPv6
number.

e.g. [Link]/48 means the first 48 bits are for the network number while the remaining
(80bits) are the host bits.

The :: at the end represents the remaining blocks are all zeros.

Comparison between IPv4(IP addresses version 4) and IPv6(IP addresses


version 6)
1) The IPv6 has large address space (2128) unlike IPv4 which only has limited space (232)
2) When writing IPv4 addresses we use dotted decimal notation while when writing IPv6 we use
hexadecimal numbers separated by full colons.
3) The IPv6 was designed with modern internet and gadgets technologies in mind hence it is more
flexible and extensible i.e. it caters for wired and wireless devices efficiently.

IP configuration on Networks
After connecting your computer to a network using transmission media, you need to configure it in
order to be able to communicate with other computers on the local network and also to access the
internet.

To configure IP on windows 7 do the following:

i. Open Control Panel


ii. Click Network and Sharing Center (NSC) link
iii. There are several available connections you can configure their IP
iv. Click Change Adapter Settings link to see all available network connections if active or not.
v. Right-Click the connection you wish to configure then click Properties command from the
shortcut menu.
vi. Click on the Internet Protocol version 4 (TCP/IPv4) then click Properties button to see
TCP/IPv4 properties.
vii. Enter the IP address and specify the default gateway. If the administrator installed a protocol
called Dynamic Host Configuration Protocol(DHCP) then you do not have to specify the IP
address, just select the option “Obtain an IP address Automatically”
viii. Click Ok button

52
NETWORK APPLICATIONS
Networks are being used to provide a number of services nowadays. Previously people used to send
and receive messages through ordinary mail commonly known as snail mail (as it was slow). Today
people are using most efficient modes of communication such as mobile phones and the Internet.

The Internet and World Wide Web (www)


 Internet: refers to the global interconnection of computer networks for the purposes of sharing
resources and communication.
 World Wide Web (www): refers to the interlinked hypertext (web) documents (or websites) that
are accessed using a special software or program known as a web browser.

The World Wide Web (www)


Note: the term web in www (adapted from spider web) refers to the interlinking of documents.
These documents are in various computers or devices connected together.

 A web: refers to a set of related hypertext (interlinked) documents that contain text, images and
video.
 A Webpage: is a single document page connected to the World Wide Web containing text and
other items that can be viewed by everyone connected to the internet using a web browser. A
webpage is basically a file written in a language called Hypertext Mark-up Language (HTML)
containing text, images, video e.t.c
 A Website: is an addressed location that consist of a collection of related web pages hosted on
one or more computers linked together in a particular way.
 Web browser: is a special program that is used to view information on web pages on the
Internet.
A web browser allows you to see contents on web pages such as text, images or videos. It also
allows you navigate between web pages using hyperlinks.
Examples of popular web browsers are:
 Google chrome
 Opera
 Microsoft internet explorer
 Mozilla Firefox
Purpose of web browser:
 Connecting to web servers
 Requesting web pages
 Properly formatting the web pages and displaying them to the user

Note: a Hyperlink is a link from a hypertext file to another file that is activated by clicking on the
highlighted word or icon. It helps you navigate from one page to another webpage.

 Hypertext document: is a web page that has links to the same page or other pages on the web.
Clicking on a link in a hypertext document takes you from a current page or section to another.

53
Note:To ensure easy access to information or resources on a website, each website has a unique
address called a uniform resource locator (URL).
The URL is the unique address of a webpage on the World Wide Web that provides access to the
required resource on the website or webpage.
e.g. to visit a site such as Google you type the URL [Link]

Parts of the URL


The URL has 3 parts namely:

1. The protocol governing how to get the information e.g. HTTP( Hypertext Transfer
Protocol)

2. The Internet Host name of the computer where the required content or resource is
stored [Link]

3. The directory or location on the site where the content or resource is located. This
usually follows the forward slash. See below

[Link]

Note: HTTP (Hypertext Transfer Protocol) is a protocol that uses TCP to transfer hypertext requests
and information between servers and browsers.

 Search engine: is a special site or special type of website that helps users search and easily find
information from other websites. It is basically a website that searches for content in other
websites.
Note: there is vast amount of information on the web such that it sometimes becomes
frustrating to users when they cannot get information they need. A solution becomes to use a
search engine to search for the required content from various websites.
Examples of search engines include Yahoo, Google, Bing, Excite, Alta Vista

How a search engine works?


A search engine consists of three components:
a. A web robot ( also known as the spider or crawler)
b. Indexing database
c. Query engine
The following are steps on how a search engine works:
i. Before you command the search engine to do the search, the program called Spider or
crawler searches for new items on the web to add to the search engine index database.
This makes the search faster (i.e. results are displayed faster)
ii. The search engine indexing database receives whatever the spider brings to it. It then
scans the documents for keywords and generates the indexes and stores them in an
index database.
iii. The user submits the search string (a word or phrase). The query engine receives the
indexing database request and processes the request in two ways:
 Looks for the keywords specified in the user’s query from the index databases.
 Retrieves associated documents and ranks them according to some criteria or
preference such as the most visited page

54
iv. The results and time takes to search for the requested item are displayed on the web
browser.

 Homepage (also known as website Index): is the first page for a website. Note: the homepage is
mostly loaded to be used for navigation to other pages or other websites.
 Web Server: is a computer on a network or intranet that delivers web pages and other files in
response to the web browser’s request.

Internet Services
Internet services are services offered on the internet (i.e. offered online).
Examples of Internet services include the following:
A. World Wide Web (www)
B. Electronic mail (e-mail) and fax
C. Instant messages
D. Electronic commerce
E. Electronic learning (e-learning)
F. Newsgroups
G. File transfer protocol (FTP)

A. World Wide Web (www)


This is a vast virtual space on the internet that provides people with a wide range of
information. This information is available on websites, web portals, blogs and multimedia
sites.
 Website is a group of related web pages or other resources located on a web
server.
 Web portal is a site that provides an entry point to other websites. It provides
specialized services such as searching, e-mail, sports updates and links to other
selected websites.
 Blogs are websites that contains personal information which can be easily
updated. Blogs are mostly used for business, campaigns or advocacy.
 Multimedia sites are sites containing photos, music, video or web TV, Internet
radio and other content for entertainment e.g. [Link], you tube etc.

B. Electronic Mail and Fax


An electronic mail (e-mail) is a message transmitted electronically over the Internet.
Note: You need to have an e-mail account to be able to send and receive e-mails. E.g.
andrewchona87@[Link]
Note that e-mail addresses or e-mail accounts must have small letters and must be typed
with no spaces.
A fax is also mail sent electronically from one fax machine to another receiving fax
machine.

C. Instant Messages
This is a more improved messaging service that allows two or more people to
communicate directly in real time. Here you must register with an instant messenger e.g.
 Whatsapp
 Yahoo messenger

55
 Google+

D. Electronic Commerce (e-commerce)


This is the use of Internet to sell and buy goods and services.
Advantage of e-commerce
A company is able to access customers outside the borders so no limitation of market
space.
Disadvantage/ problem of e-commerce is that there are no proper laws to govern e-
commerce since people deal with each other without ever meeting physically.

E. Electronic learning (e-learning)


This is learning conducted via electronic media especially the Internet. E.g. Open and
Distance Learning (ODL) where learning materials and lectures are made available online
over the internet. This helps to save transport and lodging money.

F. Newsgroups
These are organised groups of Internet users who wish to share ideas and interests. To
participate one has to join a newsgroup then he or she can contribute to discussions. E.g.
Times online news, zodiac online etc.

G. File Transfer Protocol (FTP)


This is an online or Internet service that enables uploading and downloading of files.

Browsing the Web (also called surfing the Internet)

Browsing (surfing) refers to exploring websites or navigating from one website to


another in order to find the required content.
Below is a simple description and demonstration of how to browse the Internet.

Understanding the web address (also called Uniform Resource Locator [URL])
The general format of the URL is as below:

Protocol://[Link] level domain

For example to visit the Malawi Polytechnic website type

[Link]

wherehttp is the Protocol, [Link] is the domain-name and .[Link] is the top level
domain

 The protocol: This is the rule that defines how to access the required resource. The two
common examples of protocols that work on Internet are the http:// (Hypertext transfer
protocol and File transfer protocol (FTP). The http is a standard used for accessing a website
content from server and submitting it to a web browser. FTP on the other hand is a standard
used for uploading content to a server and downloading of content from the web server.
 Domain name: This is the name of the server or computer where the website or the
required resource is located or kept on the Internet. E.g. [Link] is a domain or
resource name located in www directory.

56
 Top level domain: This represents or indicates the type of service offered by the
organisations. For example .[Link] means that this is an academic institution located in
Malawi.

Below are some of the commonly used top level domains and the type of organisations they
represent

TOP LEVEL DOMAIN TYPE OF ORGANISATION


.edu Educational institution
.org Non-profit making organisation
.ac Academic institution
.mil Military organisation
.com Commercial institution
.net An institution providing networking services e.g. [Link]

Note: some top level domains also have two letter extension added after the business domain part
to indicate the country in which the business or the site is located. e.g. [Link] see below

EXTENSION COUNTRY
.mw Malawi
.ke Kenya
.uk United Kingdom
.ug Uganda
.tz Tanzania
.au Australia
.jp Japan

Use of Hyperlinks
Hyperlinks are links used to navigate from one webpage to another page or one section to
another. To use a hyperlink:
i. Move mouse pointer on the link. It will change to a pointing finger
ii. Click the hyperlink to jump to the required page or part specified by the link

Navigation Toolbar
You can also move from one part of website to another using buttons on the navigation tool bar
provided by the web browser. i.e. back, forward, refresh etc.
Below are the icons on the toolbar and their function:

BUTTON / BOX/ICON FUNCTION


Back Takes the user to the previously visited webpage
Forward This takes you to other visited pages after the current page

57
Stop This stops loading of the current webpage
Refresh This is used to reload a webpage
Search box This is a shortcut for searching information using Google search
engine
Home Takes the user to the homepage or index page of the website
Download Used to download the current webpage
Bookmark Used to bookmark a webpage (i.e. to save a link to a website
address in a web browser that will be used to facilitate quick
access to the website when you need it again)
History Displays a list of recently visited web pages

Printing a Webpage
1. Click File menu then click Print OR press Ctrl + P
2. Set the Print properties you want e.g. copies, paper size etc.
3. Click Ok to start printing the web page

Using Electronic Mail (E-mail)


One needs to have e-mail application software such as outlook express, yahoo mail, Gmail to create,
receive and send electronic mails. You also need to register for a new e-mail account. This involves
providing required details such as name, date of birth and unique password.

Note: Web-based email accounts provide access to email services from anywhere as long as you have
a computer or mobile phone that has access to internet.

When creating e-mails choose a unique username

To create a Gmail account:

 Jump to Google homepage by typing [Link] on any preferred web browser.


 Display the sign-in or create new account page and enter your details e.g. name etc
 Agree to the terms and conditions provided by Google.

E-mail Address format


A typical e-mail address is always in lowercase (small letters) and has no spaces. e.g.
andrewchona87@[Link]
In the example above:
 andrewchona87 is a name of the e-mail account defined by the user when
registering for an email account.
 The @ symbol separates the account name from the domain of the email service
provider in this case Google
 The period . is read as dot and is used to separate different parts of the e-mail
address.
 The com defines the name of the nature of the business of e-mail service provider.
I.e. commercial entity

58
Creating a new e-mail message
Format of a standard e-mail message
A standard e-mail message has a format with the following:
1) Header information
The e-mail header has the following sections:
a. Address: This provides a textbox where you enter the e-mail address of the
recipient.
b. Subject: This specifies the content of the message in the message body.
c. Attachment: This is where you can add other files to accompany the e-mail
message such as documents, photo, and video to send via e-mail.

2) Message body
This is where you type the message you want to send mostly text.

3) Signature
This part provides additional information about the sender such as full name or
telephone number.
To compose an e-mail message:
i. Click New or Compose e-mail button
ii. Type the recipient e-mail address
iii. Type the subject of the message e.g. Annual Meeting Notice
iv. Type your message and attach any files if needed e.g. photos or video (less than
25mb)
v. Click Send button
Managing Contacts
To avoid errors when typing e-mail addresses, add contacts in the address book. To do this
click add to contacts link.

Social networking
Another example of network application is social networking.
Social networking refers to creation of social relationships to interact with other people on
social networks by uploading and downloading media content.
Social networking has helped people link or connect with their classmates, teachers, college
mates e.t.c. via various social networks. Social networking has been made possible by social
networks such as Facebook.

59
 Social networks are web-based sites that allow individuals to create a public profile to
share information with people they share interests, activities, backgrounds or real-life
connections.
Examples of Social networks
 Facebook
 Twitter
 Whatsapp
 Linked-in

 Social media: refers to the content that people upload on social network sites. e.g. music,
videos, photos e.t.c.

Advantages of Social networks


Social networks have come with a number of benefits as follows:

1. Global connections: social networks have helped people to make new friends and
stay in touch with them globally.

2. Marketing: social networks are being uses to advertise goods and services even
beyond borders.
3. Promotion of technology use: social networking uses accessible technologies like
mobile phones, computers and internet and this has motivated people to embrace
and use such technologies.
4. Social cohesion: social networks help people keep in touch (in contact) with their
family members in cases where physical meeting is impossible.
5. Career opportunities and employment opportunities: social networking has
simplified job searching. People now share job vacancies on social networks such as
Whatapp groups and Facebook pages.
6. Political campaigns: social networking has also become a powerful tool during
political campaigns. Politicians share their manifesto to the public and build support
for them.
7. Security: security detectives also sniff into media content to track down cases of
organized crime and terrorism.
8. Promotion of Health and wellbeing: social networking has been helpful to people in
obtaining medical/ health information from doctors and other medical experts. e.g.
how to cook health diets, how to prevent infections.

Disadvantages of Social networks


Social networks have presented the following disadvantages
a) Low productivity in the work place and home
Social networking can sometimes waste ones time leading to low productivity and
job losses as some people can be addicted to the social networks. E.g. Whatsapp

60
b) It has reduced face to face connections
Social networking has reduced the need for physical social interaction between
people. People sometimes get glued to their mobile phones during social meeting
such as birthday parties.

c) Cyber bullying and crimes against children


Social networks sometimes expose individuals especially children to sexual
harassments and other crimes (e.g. trafficking). It also exposes them to pornography
and some other inappropriate content which results in corruption of good morals
(i.e. Moral decay)

d) Digital divide (technology gap)


Social networking has magnified (increased) the gap between people that have
access to computer technologies and those that do not have access to such services
or those without digital skills. This is social inequality.

e) It can compromise security and privacy


Social networking can compromise security or privacy of some individuals especially
those that give too much personal information about themselves. These people
become an easy target of organised criminals. For example; a parent’s post on
Whatsapp status about their trip to a lake may attract attention of robbers who may
break into their home or may attract kidnappers.

f) Social networking can also be used by individuals to organise themselves to


destabilize governments e.g. people use social networks such as Whatapp groups to
organise mass demonstrations.

g) Spread of corrupted language


Social networking sites are full of non-standard language and this has limited
development of standard language concepts

Warning: You must always exercise caution (care) before joining social networking sites.

Distributed Computing Systems and Applications


There are three important concepts that need to be discussed in distributed computing.
These are:
 Distributed systems
 Distributed operating system
 Distributed applications(i.e. distributed application software)

A. Distributed systems

61
This refers to geographically separated networks of different computers and applications
(software) that are using shared resources.

See diagram below: A Sample Airtel company distributed system

Site 1: Lilongwe Branch Site 2: Songwe Border Branch

Internet

62
Site 3: Mzuzu Main Branch

Examples of distributed systems and services include the following:


i. internet
This is a vast interconnection of computer networks and large distributed system
components with a large number of services.
E.g. the World Wide Web, file transfer services, instant messaging, chat rooms,
newsgroups e.t.c. Note: most hardware and software manufacturers are providing
hardware and software access through an internet service called Cloud computing.

ii. intranet
This is a subset of internet that is privately administered by an organisation to ensure
access to organisation’s services and information.
For example, a Banks intranet provides a real –time access to the Bank’s customer
database any time of the day. The Bank’s employees can carry out some other tasks
while at home using computers and mobile phones e.g. updating customer records.

B. Distributed Operating System


This is a special type of operating system that controls, integrates and equalises use
of different hardware and software in a distributed [Link] operating
systems are installed in Servers.
Examples of distributed operating systems are:
 UNIX
 Windows Server
 Mach
 Chorus
Note: the main responsibility of Servers on distributed systems is to coordinate and
provide efficient access to shared information, application software and other
services.

C. Distributed application
This is an application program that is distributed across several Servers in a
distributed system.
Below are some examples of distributed applications and services:
 Online flight-reservation application: This application enables real-time
booking and payment for flights.

63
 Distributed cash dispensing machine application: This application enhances
access to cash withdrawals and deposits through ATMs.

 Video conferencing applications: These provide quality real time


transmission of sounds and videos even across continents.

 World Wide Web: This is a distributed service that is accessible anywhere


using computers and mobile phones. It provides people with vast amount of
information in various formats i.e. text, sounds, pictures and videos.
Responsibilities/ Functions of Distributed Systems
Distributed systems perform the following main responsibilities or functions:
1. Hardware management and control
The distributed system controls and coordinates allocation of hardware resources
(such as processors, memory and storage media) and software.

2. Load balancing (balancing workloads)


The distributed system divides processing task to available processors in order to
optimize processing speed. (I.e. to increase processing speed).Note: The distribution
of processing tasks across multiple (many) processors is referred to as load
balancing.

3. Ensuring data access


Distributed systems and applications provide efficient and convenient access to data
since a copy of data is accessed from nearest Server when a request is made. For
example; when you are downloading a file, the result is displayed fast as it is fetched
from a nearby mirror server be it in Malawi or Tanzania.

4. Enforcing security and reliability


Distributed systems and applications enforce security in data transmission and
reliability against errors in input or hardware failure.
For example: when you are trying to access a bank statement and the initial Server
fails, the system immediately switches to the nearest available mirror Server that is
able to provide access to the copy of the account record.

Advantages (benefits) of Distributed Systems and Applications


a) They are more reliable: The distribution of record copies to multiple Servers and
distributed applications guarantees availability of resources and faster access to
them. It also ensures security to data since copies are available in other computers
which can be used in case of data loss.
b) Shared use of resources: Distributed systems promote sharing of files, hardware and
software resources such as printers, hard disks and other software. This helps to
reduce expenditure.
c) Improved communication: Distributed systems provide services that enhance
communication such as social networks (e.g. Facebook, Whatsapp), e-mails and

64
video conferencing. These have enabled people to work together on a project
thereby improving productivity.

Disadvantages (challenges) of Distributed Systems and Applications


a. Poor network performance. This may delay operations such as cash withdrawal on
an ATM which causes frustrations in users.
b. Poor implementation of distributed applications exposes users to more security
risks due to multiple access points for intruders. There is also high chances of
communication with insecure systems .e.g. exposure to hackers as they may get
access to your computer via the network.
c. Software complexity: It is complex (difficult) to make distributed applications run on
different platforms (i.e. different operating systems in different computers). This
makes it difficult and time consuming to troubleshoot such systems when there is
failure.
For example, a video conferencing software may fail to run on one’s computer while
operate perfectly on another’s computer since the computers’ operating systems
may have different capabilities to handle it.

Self-test questions
1. Define a computer network (1m)
2. Describe any four types of computer networks(6m)
3. With the aid of labelled diagrams describe any three types of network
topologies(9m)
4. Give and explain any four uses of networks(8m)
5. Explain briefly any four benefits of networks(8m)
6. Explain any four limitations/disadvantages of networks(8m)
7. Give and describe five elements of a communication system(10m)
8. Give two broad categories of communication network devices(2m)
9. Define the following terms:
a. Data signal(1m)
b. Amplitude (1m)
c. Signal modulation(1m)
d. Signal demodulation(1m)
e. Multiplexing(1m)
f. Bandwidth(1m)
g. Attenuation(1m)
10. Give and explain three classes of communication networks(6m)
11. Give one major disadvantage of packet switching.(1m)
12. Give and describe two categories of data communication media(4m)
13. Give and briefly describe any three types of physical data transmission media(6m)
14. With the aid of labelled diagrams describe the difference between Shielded twisted
pair cable(STP) and Unshielded twisted pair cable(UTP) (6m)

65
15. Give one major advantage and one major disadvantage of twisted pair cables.(1m)
16. Give any two advantages of fibre optic cables over coaxial and twisted pair
cables(2m)
17. Give any three types of wireless transmission media.
18. Give any two advantages or wireless communication systems over wired
communication systems (2m)
19. State one major disadvantage of wireless communication systems(1m)
20. Describe the following data transmission modes:
a. Parallel transmission mode(1m)
b. Serial transmission mode(1m)
c. Simplex transmission mode(1m)
d. Half-duplex transmission mode(1m)
e. Full duplex transmission mode(1m)

21. Differentiate between:


a. Personal Area Network (PAN) and Local Area Network(LAN) (2m)
b. Metropolitan Area Network(MAN) and Wide Area Network(WAN)(2m)
c. Server computer and client computer(2m)
22. Give two classes of network software(2m)
23. Define Network Operating System(NOS)(1m)
24. State any three functions of Network Operating System(3m)
25. Define network protocols(2m)
26. Give any two examples of network protocols(2m)
27. Give two differences between OSI and TCP/IP network reference models.(2m)
28. Give any two similarities between OSI and TCP/IP network reference models.(2m)
29. Differentiate between:
a. internet and intranet(2m)
b. Classiful and classless IP addressing systems(2m)
30. Give any three methods of internet access(3m)
31. Give and briefly describe two types of IP addresses(4m)
32. How many bits make up the network ID in the IP address [Link]/24 (1m)
33. Differentiate between:
a. World wide web(www) and webpage(2m)
b. Website and homepage(2m)
c. Web browser and web server(2m)
d. Search engine and blog(2m)
34. Give any two examples of search engines(2m)
35. What are Internet services(1m)
36. Describe and three Internet services(6m)
37. Write down any URL showing the protocol, domain name and top level domain.(3m)
38. Describe three parts that make up the e-mail.(3m)
39. What is a social network(1m)
40. Give any two examples of social networks(2m)
41. Define Social networking(1m)
42. Describe any three advantages and three disadvantages of social networks(6m)

66
43. Define “Distributed systems”(2m)
44. Give and describe any four examples of distributed systems and services(8m)
45. Explain any three responsibilities of distributed systems(6m)
46. Give and explain any three advantages and three disadvantages associated with
distributed systems.(12m)

67

You might also like