0% found this document useful (0 votes)
12 views19 pages

E-Note SS Two 3rd Term Data Processing

The document outlines a third-term e-learning scheme for Data Processing for SS2 students, covering topics such as graphic packages, computer maintenance, and database security. It includes detailed weekly topics, evaluations, assignments, and references to textbooks. Key areas of focus include the meaning and uses of graphic software, maintenance practices for computers, and the importance of database security.

Uploaded by

2nd.gamer.boy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views19 pages

E-Note SS Two 3rd Term Data Processing

The document outlines a third-term e-learning scheme for Data Processing for SS2 students, covering topics such as graphic packages, computer maintenance, and database security. It includes detailed weekly topics, evaluations, assignments, and references to textbooks. Key areas of focus include the meaning and uses of graphic software, maintenance practices for computers, and the importance of database security.

Uploaded by

2nd.gamer.boy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

THIRD TERM E-LEARNING NOTE

SUBJECT: DATA PROCESSING CLASS: SS 2


SCHEME OF WORK
WEEK TOPIC

1. Graphic Packages (a) Meaning of Graphic Package


(b) Uses of Graphic Software Package (c) Examples of Graphic Package
2. Graphic Packages: Coreldraw (a) Corel Draw meaning (b) Components of Corel
Draw
3. Graphic Packages(cont.): SPECIALISED GRAPHIC APPLICATIONS
4. 1ST Continuous Assessment
5. Maintenance of Computer I: (a) Maintenance (b) General cleaning/General
Cleaning tips (c) Tools for cleaning hardware tools (d) Battery Charging and
replacement
6. Database Security: (a) Introduction to database security (b) Types of Database
security
7. Mid-term Break
8. Indexes: (a) What is an Index? (b) Types of Index (i) Clustered versus Uncluttered
indexes (ii) Dense versus sparse (iii) Primary and Secondary indexes (iv) indexes
using composite search keys
9. 2nd Continuous Assessment
10.Revision
11.Examination
12.Examination/Closing

REFERENCES:
 Spectrum Computer Studies for Senior Secondary Schools 2 by Tuttuh-Adegun
Moses et al.
 Search light on Computer Studies for Senior Secondary School 2 by Owolabi
Kayode et al.
 A textbook of DATA PROCESSING for Senior Secondary Schools 2 by Adedapo
F.O et al.
WEEK ONE
TOPIC: GRAPHIC PACKAGES
CONTENT:
1. Meaning of Graphic Software Package
2. Uses of Graphic Software Packages
3. Examples of Graphic Package

SUBTOPIC 1: Meaning of Graphic software Package


Introduction:
Graphics are visual and pictorial representation of data on surfaces such as a wall, canvas,
screen, paper or stone using line arts, symbols, numbers, geometric designs, diagrams and
photographs by combining text, illustration and colour in order to brand, illustrate and
entertain. Graphics can either be functional or artistic; therefore, an image generated by a
computer is called graphics.

Definition of Graphic Package


Graphic Package or software is a collection of programs that allows for easy creation,
selection and deliberate manipulation of text and images using distinctive styles on a
computer for the purpose of clarity and effective communication.

Sub Topic2: Uses of Graphic Software Packages


The uses of Graphic Software package cannot be exhausted because it provides numerous
advantages ranging from the following;

Traditional Uses
 It is used for pictorial representation and manipulation of data.
 It is used for computer aided designs used in schools.
 It is used for creating simple and complex fliers, posters, books and bill boards.
 It is used in typesetting and graphic arts designing.
 It is used for creating designs, text and graphics for effective presentation in
seminars.

Professional and advanced Uses


 For Graphic Design Software e.g desktop publishing
 For Multi-media development Software e.g Computer simulations, Hyper-media
editing.
 Image development Software e.g Graphics editor
 For Traditional Medium Effects e.g Photoshop, Corel Painter and Photo Paint.
 For Photo Realistic Effects e.g 3D effects, Painter 3D, Add Depth 2D.
 For Hyper-realistic Effects e.g 2D Image editing software, 3D models with 2D effects
(e.g Cartoons and illustrations).

SUBTOPIC 3: EXAMPLES OF GRAPHIC PACKAGE


There are different examples of Graphic Package, but here is a list of some common ones
Examples of Graphic Packages
i. Paint
ii. Corel Draw
iii. Instant Artist
iv. Harvard graphics
v. Gimp(GMP)
vi. Logo graphics
vii. Ventura
viii. Adobe Photoshop
ix. Photoshine
X. Adobe illustrator

EVALUATION
I. Define Graphics
II. Explain the word Graphic Package
III. Enumerate 3 uses each of advance and traditional use of Graphic package.

ASSIGNMENT
I. Find out 10 other uses of Graphic packages @ your own leisure

WEEK TWO
TOPIC: Graphic Packages
Subtopic: Corel Draw
CONTENT:
(i) Meaning of Corel Draw
(ii) Components of Corel Draw

Sub-topic 1
Meaning of Corel Draw
Corel Draw is a graphic package used mainly for automating artistic functions and designing
high quality graphics using conventional lines, basic shapes, symbols and logos. CorelDraw
was developed by Corel Corporation Ottawa, Canada in June 1985. The latest version that
makes the twenty-fifth versions (i.e. CorelDraw 2024) was released in March 2024.
Uses of CorelDraw
1. CorelDraw provides users with different tools to create original images or drastically
edit them.
2. CorelDraw is also compatible with other program in the Corel Draw Graphics suite,
such as Corel Photo-Paint
3. CorelDraw is used to create logos
4. To create complex drawing
5. To create professional world brochure

Loading Corel Draw


 Click start button on the task bar
 Click Corel graphic suites (installed)
 Click CorelDraw (version type available)
OR
Double click on Corel Draw ICON on the Desktop or taskbar if available.

Sub-topic 2
Components of Corel Draw
After loading Corel Draw it brings you to an environment with a blank/white background or
drawing window with a rectangular box where your drawing is created. This environment
displays the following features or components.

COMPONENTS OR FEATURES OF CORELDRAW ENVIRONMENT

1. Title Bar: It displays application name and file name at the top of the package.
2. Menu Bar: It displays the various command use to work on the program.
3. Page Layout: This is a workspace for user’s work, otherwise known as printable
page.
4. Standard Tool Bar: This bar contains icon and commands for performing operations
on documents.
5. Status Bar: It displays detailed information about programs selected.
6. Ruler: This is used for measuring objects in order to obtain accurate size. There are
two types: horizontal and vertical.
7. Properties Bar: It displays detailed information about graphic/text selected.
8. Scroll Bar: They are used for scrolling page layout/work in the desired direction
(Horizontal and Vertical)
9. Colour Palette: It displays various colours used for colouring any selected
object/text.
10. Tool Box: This contains the tools used to create, fill, and modify your drawing.
11. Document Navigator: it allows movement, quick view or move from one work area
to another.
12. Docker: A window containing available commands and settings relevant to a specific
tool or task.
13. Navigator: A button at the lower-right corner that opens a smaller display to help
you move around a drawing.

TOOL BOX
Toolbox appears on the left corner of the publication window. It is used to display tool/icon
for performing different operations on the screen.
1. Pick Tool: Pick tool selects objects. Once selected, you can use the Pick Tool for move,
stretch, scale, rotate, and skew objects.
2. Shape tool: Shape tool reshapes objects by moving nodes, lines, and control points.
3. Crop tool: The Crop tool is located in the toolbox, on the Crop tool flyout. To crop
objects, you define a rectangular area (cropping area) that you want to keep. Portions
of the graphic outside the cropping area will be removed. You can specify the exact
position and size of the cropping area, and you can rotate and resize it.
4. Zoom tool: Changes the current view of the drawing
5. Freehand tool: Draws lines and curves. You can also use this tool to trace bitmaps.
6. Smart Fill tool: Converts the freehand strokes you draw to basic shapes and smoothed
curves.
7. Rectangular tool: Draws rectangles and squares. Squares are created by using the
control key while drawing.
8. Ellipse tool: Draws ellipses and circles. Circles are created by holding down the control
key as you draw.
9. Polygon tool: is used to create polygons having two or more straight sides, depends on
your requirement.
10. Basic shape tool: A collection of objects, which you can add to your drawing.
11. Text tool: Adds either Artistic or paragraph text to your drawing.
12. Interactive blend tool: Allows you to merge objects.
13. Eyedropper tool: Allows you to select a color within an object.
14. Pen tool: pen tool mainly draws lines one by one (curve or straight line) by accurately
placing nodes and controlling the shape of each curve segment.
15. Fill tool: Assigns the fill style of any object.
16. Interactive fill tool: Allows you to apply fountain fills (gradients) using the mouse. The
flyout gives access to the Mesh fill Tool.

CorelDraw Menu
This consists of eleven menus. They are: File, Edit, View, Layout, Arrange, Effect, Bitmap,
Text, Tools, Windows and Help

NOTE: Treat each menu above one after other in detail.

EVALUATION
i. Explain the term CorelDraw
ii. Itemize and explain 5 distinct components of CorelDraw environment

ASSIGNMENT:
I. The area displaying the title of a currently opened drawing is called____________
II. Itemize 5 tools in CorelDraw

WEEK THREE
TOPIC: Graphic Packages (Cont.)
CONTENT:
i. SPECIALISED GRAPHIC APPLICATIONS
ii. Practical section

Sub-topic 1
SPECIALISED GRAPHIC APPLICATIONS
These are specialized Graphic Applications used in other field of endeavours, namely;
 Paint programs used to create rough free hand drawings and can be edited
using bitmap.
 Illustration/design programs are used drawing curved lines and its images are
stored in vector based formats.
 Presentation graphics Software used for creating bar charts, pie charts and
graphics for slide shows and reports.
 Animation software enables you to chain and sequence a series of images to
simulate movement.
 CAD(Computer Aided Design) Software used by engineers and architects to
draft designs
 Desktop Publishing allows full set of word processing and fine control of text
and graphics.

Sub-topic 2:
Practical Section
i. Design a Letter head using CorelDraw.
ii. Design Flag of Nigeria
iii. Design a Wedding Card
iv. Create the Logo of AIHS
v. Design a Birthday Card
Vi. Create MTN Logo
vii. Create and Design a Business Card
viii. Create Airtel Logo

EVALUATION
I. Outline 5 examples of graphic packages
II. State 5 specialized graphic applications and their uses.

WEEKEND ASSIGNMENT
i. Use CorelDraw to design any of the following
 Business Card
 Invitation Card
 Letter headed paper of a school or company

WEEK FOUR: 1st Continuous Assessment

WEEK 5:
TOPIC: Maintenance of computer I
CONTENT:
1. Meaning of Maintenance
2. Understanding Concept of General Cleaning
3. General Cleaning Tips
4. Battery Charging and Replacement

SUBTOPIC 1: MEANING OF MAINTENANCE


Maintenance often called Preventive maintenance (PM) refers to the proactive
maintenance steps taken to prevent some avoidable and undesirable system problems.

Computer Maintenance: is the practice of keeping computers in a good state of repair.


A computer containing accumulated dust and debris may not run properly .

TYPES OF MAINTENANCE
There are 2 types of maintenance, namely;
i. Preventive Maintenance
ii. Corrective Maintenance (This is a step taken or performed to correct an already
existing problems.)
Sub Topic 2: GENERAL CLEANING
Cleaning generally is the process and act of keeping ones computer, its components and
other related peripheral devices in good condition free from dust and debris for proper
functioning to avoid mal-function and sudden breakdown.

GENERAL CLEANING TIPS


I. Never spray your computer rather apply little liquid in a piece of cloth for cleaning the
casing and not the inside.
II. Use a vacuum cleaner to suck up dust, dirt, hair around the casing and not the inside
because using it on the inside could cause static electricity that could damage internal
components.
III. Always turn off your system or component before cleaning.
IV. Never use concentrated solvent e.g chemical (alcohol) while cleaning because of
other allergic individual that might use the same component or device.
V. Take adequate care and caution while cleaning in not tampering with sensitive parts
and control knobs.
VI. Avoid eating, drinking or smoking around the computer or other delicate devices.
(Adhering to the aforementioned tips prolong and helps your device to serve you longer
than you can imagine!)

SUB-TOPIC 3
Tools for cleaning Computer Hardware
i. A clean non-abrasive cloth as microfiber, cotton T-shirt, Cotton handkerchief.
ii. Portable vacuum
iii. Cleaning solution, in case of moistening a cloth, water should be used while other
solvents can be used for different purposes
iv. Cotton swabs
v. Foam swabs
vi. DVD or CD-ROM cleaner

DVD & CD-ROM Cleaning


Dirty DVD and CD-ROM drives could cause an error in disc reading which affects software
installation issues while running the program. So, proper handling and cleaning is
necessary.

CLEANING DVD & CD-ROM DRIVES


PROCEDURES
 Purchase a DVD or CD-ROM cleaner from a local radio shack
 Use the DVD or CD-ROM cleaner on the mal-functioning drive.
 A damp piece of cloth can also be used by removing the disc tray gently, clean and allow
the tray to dry before pushing the tray in.

CLEANING DVD & CD DISC


Dirty DVD and CD disc could cause an error in disc reading which affects it from been read.
So, proper handling and care is necessary.

PROCEDURES
 Get a cleaning kit for effective cleaning of disc
 A piece of normal clean cotton cloth could be used to wipe against the track starting
from the middle of the CD or DVD.
For tough dirt, light use of water or pure spirit could be used

SUBTOPIC4: BATTERY CHARGING AND REPLACEMENT


The frequent and long usage of battery could cause depletion of its life cycle because most
battery is made with Lead acid, lithium and gel-cel which make them vulnerable and prone
to failure. Hence, making replacement inevitable, at least once in 6 months perform battery
sensor re-calibration.

REPLACEMENT OF BATTERY (UPS BATTERY AS AN EXAMPLE)


Replacement of battery solely depends on the in-built low battery alarm which runs a
periodic self test and alert one when replacement is needed. At times, some batteries
trigger false alarm occasionally UPS self test could be used to correct that.

Also, when a battery displays epileptic and flashing panel light alarm repeatedly, it shows a
bad battery and calls for replacement.
Note: It is better to wait for battery alarm to trigger before ordering a replacement
because keeping batteries on shelves reduces its life span or cycle except fully charged.

EVALUATION
I. Define the term “Maintenance”
II. Explain the types of Maintenance
III. State 4 General Cleaning tips
IV. What is cleaning?
V. Itemize 2 procedures involved in cleaning DVD or CD drives
VI. Itemize 2 procedures involved in cleaning DVD or CD disc

ASSIGNMENT
Itemize steps involved in cleaning a keyboard, Mouse and System Unit casing.

WEEK SIX
TOPIC: Database Security
CONTENT:
1. Introduction to database security
2. Types of Database security
3. Roles of the database administrator in security
SUBTOPIC 1: Introduction to database Security
Database management systems are increasingly being used to store information about all aspects
of an enterprise. The data stored in a DBMS is often vital to the business interests of the
organization and is regarded as a corporate asset.

Database Security
Database security refers to the collective measures used to protect
and secure a database or database management software from illegitimate use and
malicious threats and attacks.

OR

Is the means of ensuring that data is kept from corruption and that access to it is suitable
controlled. Thus, data security helps to ensure privacy. It also helps in protecting personal
data. Data security is part of the larger practice of Information security.
Data is the raw form of information stored as columns and rows in our databases, network
servers and personal computers.

Objectives to be considered
There are three main objectives to consider while designing a secure database application.
1. Secrecy: Information should not be disclosed to unauthorized users. E.g. a student should
not be allowed to examine other students’ grades.
2. Integrity: Only authorized users should be allowed to modify data. E.g. students may be
allowed to see their grades, yet not allowed (obviously!) to modify them.
3. Availability: Authorized users should not be denied access. E.g. an instructor who wishes to
change a grade should be allowed to do so.

To achieve these objectives, a clear and consistent security policy should be developed to
described what security measures must be enforced. In particular, we must determine what part of
the data is to be protected and which users get access to which portions of the data.
Next, the security mechanisms of the underlying DBMS (and OS, as well as external mechanisms
such as securing access to buildings and so on) must be utilized to enforce the policy. We
emphasize that security measures must be taken at several levels. Security leaks in the operating
system or network connections can circumvent database security mechanisms.

Sub Topic 2: Types of Database Security Control


- Access Control
- Database Audit
- Authentication
- Backup
- Password
- Encryption

Access Control
An Access Control mechanism is a system of controlling data that is accessible to a given giver. This
implies the use of authentication and authorization. A computer system that is meant to be used by
those authorized to do so must attempt to detect and exclude the unauthorized users.

Approach to Access Control


A DBMS offers two main approaches to access control
i. Discretionary Access Control: Discretionary access control (DAC) is a type of security access
control that grants or restricts object access via an access policy determined by an object's
owner group and/or subjects. DAC mechanism controls are defined by user identification
with supplied credentials during authentication, such as username and password. DACs are
discretionary because the subject (owner) can transfer authenticated objects or information
access to other users. In other words, the owner determines object access privileges.
ii. Mandatory Access Control: is a type of access control in which only the administrator
manages the access controls. The administrator defines the usage and access policy, which
cannot be modified or changed by users, and the policy will indicate who has access to
which programs and files. MAC is most often used in systems where priority is placed on
confidentiality.

Database Audit
It involves observing a database so as to be aware of the actions of
database users. Database administrators and consultants often set up auditing for security
purposes, for example, to ensure that those without the permission to access information
do not access it

Authentication
Is the act of confirming the truth of an attribute of a single piece of data claimed true by an
entity. In contrast with identification, which refers to the act of stating or otherwise
indicating a claim purportedly attesting to a person or thing's identity, authentication is the
process of actually confirming that identity. It might involve confirming the identity of a
person by validating their identity documents, verifying the authenticity of a website with
a digital certificate, determining the age of an artifact by carbon dating, or ensuring that a
product is what its packaging and labeling claim to be. In other words, authentication often
involves verifying the validity of at least one form of identification.

Backup
Is the process of backing up, refers to the copying and archiving of computer data so it may
be used to restore the original after a data loss event. The verb form is to back up in two
words, whereas the noun is backup.

Password
This is an un-spaced sequence of secret characters used to enable access to a file, program,
computer system and other resources.

Encryption
Encryption is the most effective way to achieve data security. To read an encrypted file, you
must have access to a secret key or password that enables you to decrypt it. Unencrypted
data is called plain text; encrypted data is referred to as cipher text.

SUBTOPIC 3: Roles of the database administrator in security


The database administrator (DBA) plays an important role in enforcing the security-related aspects
of a database design. In conjunction with the owners of the data, DBA will probably also contribute
to developing a security policy. The DBA has a special account, which we will call the system
account, and is responsible for the overall security of the system.
DBA deals with the following:
 Back up and recover the database.
 Install and configure Oracle software.
 Create new databases.
 Design the database schema and create any necessary database objects.
 Formulate optimal application SQL.
 Ensure database security is implemented to safeguard the data.
 Work closely with application developers and system administrators to ensure all database
needs are being met.
 Apply patches or upgrades to the database as needed.
 Maintaining archived data
 Contacting database vendor for technical support
 Generating various reports by querying from database as per need
 Managing and monitoring data replication

EVALUATION:
(i) What do you mean by data security?
(ii) How is data secured?
(iii) Why is mandatory access control better than discretionary access control?
(iv) What is the role of a database administrator?

READING ASSIGNMENT:
Study the topic ‘Database Security’ using students’ textbook

WEEKEND ASSIGNMENT:
OBJECTIVE TEST:
1. DBMS can use ___ to protect information in certain situations where the normal security
mechanisms of the DBMS are not adequate. (a) access control (b) encryption (c) data
mining (d) security guard
2. ____access control is based on system wide policies that cannot be changed by individual
users. (a) discretionary (b) secure (c) mandatory (d) insecure
WEEK SEVEN: MID TERM BREAK

WEEK EIGHT:
TOPIC: INDEXES
CONTENT:
1. What is an Index?
2. Types of Index
i. Clustered vs Non-clustered Indexes
ii. Dense vs Sparse
iii. Primary and Secondary Indexes
iv. Indexes using composite search keys

SUBTOPIC 1: What is an Index?


An index is a copy of the database table that has been reduced to certain fields and the copy is
always in sorted form. The index also contains a pointer to the corresponding record of the actual
table so that the fields not contained in the index can also be read. Index contains a value and a
pointer to the first record that contains data value.

A database index is a data structure that speeds up certain operation on a file. The operation
involves a search key which is the set of record files (in most cases a single field). The elements of
an index are called data entries. Data entries can be actual data records. A given file of a data
records can have several indexes, each with different search keys as showed in the table below:

The search engine searches for a value in table or file in two ways. The table scan which is
sequential and index which is random.

Indexes are special lookup tables that the database engine uses to speed up data retrieval. An
index in a database is similar to an index in the back of a book.

An index table or file consists of records called index entries. It is of the form

The search key field is used to sort the rows (in the index column) and the pointer field (in index
column) indicates where the actual data in the table will be retrieved. When a table has an index it
simply means the records in that table has been sorted in one way or the other.
EVALUATION
1. What is an index?
2. What are data entries?

SUBTOPIC 2: Types of Index


i. Clustered vs Non-clustered Indexes
Clustered: Clustered index is an index whose sorting order determines the order of how the
rows/records in a table are stored. There could be only one clustered index in a table because
there could always be one way of arranging the records in a table at a given time. For example,
if you are asked to arranged some tables in a room, you could arrange them in a round form,
row form or packed them close together, only one way at a time. Clustered index also means
that related values in a table are stored close to each other according to the order of the index.

A clustered index is when a file is organized so that the ordering of data records is the same as
or closes to the ordering of data entries. A clustered index can take place only if the data
records are sorted on the search key field. For example, suppose that students records are
sorted by age; an index on age that stores data entries in sorted order by age is a clustered
index.

Indexes that maintain data entries in sorted order by search key use a collection of index
entries, organized into a tree structure to guide searches for data entries. Thus, clustered
indexes are relatively expensive to maintain when the file is updated, when data entries are to
be moved across pages, and if records are identified by a combination of page id and slot as is
often the case, all places in the database that point to a moved record must also be updated to
point to the new location. These additional updates can be time consuming.

The table below illustrates a clustered index file:


Non-clustered: This is an index whose sorting order does not determine the order of how the
rows/records in a table are stored. This means that the search keys in the index column is
sorted in one order while the actual records or rows are sorted in another order or are not
sorted at all. The index contains pointers to the location of that data.

This is an index that is not clustered. A data file can contain several unclustered index. For
example supposing that students records are sorted by age; and if additional index on GPA field
is included, it is called unclustered index.

Also for example, a book can have more than one index, one at the beginning which displays
the contents of a book unit wise while the second index shows the index of terms in
alphabetical order.

You can create only one clustered index on a table because there is only one possible physical
ordering of the data rows. You can create up to 249 non-clustered indexes per table.

Thus, clustered indexes are relatively expensive to maintain when the file is updated. Another
reason clustered indexes are expensive to maintain is that data entries may have to be moved
across pages, and if records are identified by a combination of page id and slot, as is often the case,
all places in the database that point to a moved record (typically, entries in other indexes for the
same collection of records) must also be updated to point to the new location; these additional
updates can be very time consuming.

ii. Dense Vs Sparse Indexes


Dense index point directly to individual records. In indexing, if there is one unique index entry
corresponding to every record it is called dense indexing. Therefore, it is said to be dense if it
contains (at least) one data entry for every search key value that appears in a record in the
indexed file. In a dense index, index records appears for every search key value in the file or
table. That is every search key in the index column has a particular record it will point to in the
table or file.

For example;

From the figure above, we can see that each search key in the index has a particular record that
it point to in a base table.
Sparse Index: In a sparse index, each search key does not have a corresponding record it point
to but may point to a group of records in the base table. This contains index records for only
some search key values. Applicable when records are sequentially ordered on search key. For
example:
From the figure above, search keys such as 12121, 15151 do not have corresponding records in the
index but you can search for them through 10101 key to retrieve their records in the base table.
A sparse index contains one entry for each page or records in the data file. The index record
contains the search key and a pointer to the first data record with that search key value. A sparse
index must be clustered and it is smaller than a dense index.

The diagram below also represents a dense and sparse index

Ashby, 25, 3000


Basu, 33, 4003 22
Bristow, 29, 2007
25
Ashby 29
Cass, 50, 5004 33
Cass Daniels, 22, 6003
Jones, 40, 6003 40
Smith
44
44
Smith, 44, 3000 50
Tracy, 44, 5004

Sparse Index Dense Index


On name on age
DATA
Sparse Versus Dense Indexes
From the above, a data file of records with three fields (name, age, and sal) is shown with two
simple indexes on it. The first index is sparse, clustered index on name. Notice how the order of
data entries in the index corresponds to the order of records in the data file.
We cannot build a sparse index that is not clustered. Thus, we can have at most one sparse index. A
sparse index is typically much smaller than a dense index. On the other hand, some very useful
optimization techniques rely on an index being dense.

Primary and Secondary Indexes


Primary Index
Is an index on a set of fields that includes the unique primary key for the field and is guaranteed not
to contain duplicates. Student ID can be example of it. The primary index contains the key fields of
the table. The primary index is automatically created in the database when the table is activated.

Secondary Index
Is an index that is not a primary index and may have duplicates. E.g Student name.
Two data entries are said to be duplicates if they have the same value for the search key field
associated with the index. A primary index is guaranteed not to contain duplicates, but an index on
other (collections of) field can contain duplicates. Thus, in general, a secondary index contains
duplicates.

If we know that no duplicates exist, that is, we know that the search key contains some candidate
key, we call the index a unique index.

iii. Indexes using composite search keys


The search key for an index can contain several fields; such keys are called composite search keys
or concatenated keys. As an example, considering a collection of employee records, with fields
name, age, and sal, stored in sorted order by name.

If the search key is composite, an equality query is one in which each field in the search key is
bound to a constant. E.g. we can ask to retrieve all data entries with age =20 and sal=10. The
hashed file organization supports only equality queries, since a hash function identifies the bucket
containing desired records only if a value is specified for each field in the search key.

A range query is one in which not all fields in the search key are bound to constants. E.g. we can ask
to retrieve all data entries with age=20; thus query implies that any value is acceptable for the sal
field. As another example of a range query, we can ask to retrieve all data entries with age < 30 and
sal > 40.

READING ASSIGNMENT:
Study the topic ‘the primary and secondary index

WEEKEND ASSIGNMENT
OBJECTIVE TEST
1. ____________ is a database table that has been reduced to certain fields. (a) Table (b) An index
(c) Table Model (d) Network Model
2. We can have at most _____ clustered index on a data file. (a) one (b) two (c) three (d) four
3. The copy of an index is always in ______ form. (a) duplicate (b) field (c) sorted (d) domain
4. The _________ index can take place only if the data records are sorted on the search key field.
(a) unclustered (b) insert (c) update (d) clustered
5. A ___________ can contain several unclustered indexes. (a) data file primary (c) check (d) index
6. Index contain a value and ___________ (a) pointer (b) sign (c) update (d) model
7. ____________ is an index in which the search key contains some candidate key. (a) Unique
index (b) An index (c) Composite (d) Sparse index
8. _______ can be created on a non-key attribute. (a) Primary index (b) Dense index (c) Secondary
index (d) Sparse index
9. A sparse index contains one entry for each …………… of records in the data file. (a) page (b) table
(c) row (d) column
10. _________ is the one in which not all fields in the search key are bound to constant. (a) Dense
index (b) composite search key (c) Secondary index (d) range query
11. ______________ is when the search key for an index contain several fields. (a) Primary index
(b) Composite search key (c) Secondary index (d) Unique index

THEORY
1. Differentiate between clustered index and unclustered index.
2. State two reasons why clustered index is expensive to maintain.
3. Differentiate between dense and sparse index
4. What do you mean by sparse index?
5. Differentiate between a unique index and a range query.
6. What is composite search key
7. What is the difference between primary and secondary indexes?
8. Create a student table with the following fields: name, age, and scores of 5 records. Create an
index using a composite keys name and age. (show the table and SQL statements).

WEEK NINE: 2ND CONTINUOUS ASSESSMENT

WEEK TEN: REVISION

WEEK ELEVEN: EXAMINATION

WEEK TWELVE: EXAMINATION/CLOSING

You might also like