2ND Term Data Proc. E-Note
2ND Term Data Proc. E-Note
2ND Term Data Proc. E-Note
WEEK TOPIC
Computer Virus:
1 *Meaning of Computer Virus
*Types of Computer Virus
*Examples of virus
*Sources of virus
*Virus warning signs
*Virus detection/Prevention
2 Maintenance of Computer:
*Hardware maintenance overview
*Software maintenance overview
*Access Control
*Encryption
5 Indexes:
*Types of Indexes
*Definition of types indexes
6 Crash Recovery:
*Definition of crash recovery
*Types of crash
*Definition of crash recovery terms
1
WEEK 1
COMPUTER VIRUS
CONTENT:
Meaning of Computer Virus.
Types of Computer Virus.
Examples of Virus
Sources of Virus
COMPUTER VIRUS
Computer viruses are small software programs that are designed to spread from one computer to another
and to interfere with computer operation. It is a program written by people called virus perpetrators or
data invaders which often cause damage by attaching itself to another program and files on the
computer system. A virus might corrupt or delete data on your computer, use your e-mail program
to spread itself to other computers, or even erase everything on your hard disk. Computer viruses
are often spread by attachments in e-mail messages or instant messages. That is why it is essential
that you never open e-mail attachments unless you know who it's from and you are expecting it.
DEFINITION
A computer virus is a piece of software that attaches itself to another program to corrupt the program and
files on the computer system.
Computer Viruses are classified according to their nature of infection and behavior. Different types of
computer virus classification are given below.
1. Resident virus: They usually fix themselves inside the computer memory. They get activated every time
the OS runs and end up infecting other opened files. They hide in RAM. Examples are CMJ, Randex, Mrklunky
etc.
2. Overwrite Virus: These types of viruses delete any information in a file they infect, leaving them
partially or completely useless once they are infected. Once in the computer, they replace all the
file content but the file size doesn’t change.examples trivial.88.D,trj.Reboot etc
3. Boot sector: A Boot Sector Virus infects the first sector of the hard drive, where the Master Boot
Record (MBR) is stored. . If a computer is infected with Boot Sector Virus, when the computer is turned
on, the virus launches immediately and is loaded into memory, enabling it to control the
computer. Examples are poly boot, AntiEXE, stone virus, disk killer, form etc
4. Macro virus: Macro viruses infect files that are created using certain applications e.g. MS office suite,
these macros are usually stored as part of the document or spreadsheet and can travel to other
systems when these files are transferred to another computer. Examples are Relax, Bablas etc.
5. Directory Virus: Also known as cluster virus or file system virus. They infect the computer’s directory
by changing the path indicating file location. They are usually located in the disk but affect the entire
directory. Example is any file with the extension
.EXE or .COM
6. Polymorphic virus: Polymorphic Viruses have the capability to change their appearance and change
their code every time they infect a different system. This helps the Polymorphic Viruses to hide
from anti-virus software. Examples are Elkern, Marburg,etc.
Other computer threats
1. Worms: A worm is a virus program that copies and multiplies itself by using computer networks and
security flaws. A classic example of a worm is the I LOVE YOU virus discovered in 2000. Another latest worm
was discovered in July 2010 called Stuxnet.
2
2. Trojan horse: A Trojan horse is a computer program or file on the computer of a user that makes the
computer susceptible to malicious intruder by allowing them to access and read users files. They do not
multiply themselves as in the case of worm. An example of latest Trojan horse is Alureon (discovered in
2010).
2. Virus file infectors
3. System or boot sector infectors
4. E-mail virus
5. Key logger
Examples of computer virus are;
Polyboot, Tuareg, Satan, Bug, Elkern, Asimov, Win 32, stator, Sasser, Welchia, Beagle, Netsky etc.
SOURCE OF VIRUS:
So how does your computer become infected by computer viruses or malware? There are many common
approaches, but the following are some of the most popular methods owing to their efficacy and simplicity:
Downloading infected files as email attachments, from websites or through file sharing activities
Clicking on links to malicious websites in emails, messaging apps or social network posts
Visiting compromised websites, aka drive-by downloads, viruses can be hidden in HTML, thus downloading
when the webpage loads in your browser
Connecting your device to infected external hard drives or network drives
Operating system and application vulnerabilities provide security loopholes, backdoors and other exploits
Social engineering attacks, such as phishing scams, trick victims into providing sensitive information or access
to personal and work systems through customized attacks that often masquerade as legitimate organizations
reporting fake emergencies to push victims to act quickly and without question
Connected peripherals, smart devices and Internet-of-Things (IoT) devices can act as vectors, or access
points, or they can be hijacked and controlled remotely by the hacker
Virus Prevention
Do not pass on virus warning signs without first checking with an authoritative source. Make sure you
have a current version of antivirus software to check for virus.
To prevent virus you may do any of the following;
i. Purchase and install anti-virus software, and update it frequently
ii. Scan every file you receive
iii. Do not configure your e-mail program to launch your word processing program automatically when it
receives an attachment.
3
iv. Scan every file you download from the web before you install or read them
v. Be very careful about putting flash drives and floppy disk from unknown source into your computer
vi. Backup all your data files on regular basis.
vii. Make sure that you have original disk or CD-ROMs for all your software.
viii. Regularly do quick or full systems scan on your computer.
KEY NOTES
1. Computer Viruses
What is a computer virus? Computer viruses are a type of malware that earned their name because of how
they spread by "infecting" other files on a disk or computer. Viruses then spread to other disk drives and
machines when the infected files are received in downloads from websites, email attachments, shared drives
or when carried in files on physical media, such as USB drives or—in the early days—floppy disks.
According to the National Institute of Standards and Technology (NIST), the first computer virus, a boot
sector virus called "Brain," was developed in 1986. Tired of customers pirating software from their shop, two
brothers, Basit and Amjad Farooq Alvi, who were only 17 and 24 years old at the time, claimed to have
designed the virus to infect the boot sector of software thieves' floppy disks. The virus spread through
infected copies of the pirated software, jumping from the infected floppy disk to the computer hard drive
when the program was booted, or loaded onto the new machine.
2. Worms
Unlike viruses, worms don't require human help in order to infect, self-replicate or propagate. As soon as
they breach a system, they infect their entry point and spread through the device and across any network to
which the device connects. By exploiting network vulnerabilities—such as missed operating system
(OS) updates or application patches, weak email security or poor internet safety practices—worms can
execute, self-replicate and propagate at an almost exponential rate as each new infection repeats the
process. Originally, most worms simply "ate" system resources and reduced performance. Now, most worms
contain malicious "payloads" designed to steal or delete files upon execution.
3. Adware
One of the most common online nuisances is adware. Adware programs automatically deliver advertisements
to host computers. Familiar examples of adware include pop-up ads on webpages and advertising messages
that are part of the interface of "free" software. While some adware is relatively harmless, other variants use
tracking tools to glean information about your location or browser history. Most of the time, adware collects
information in order to serve better targeted ads. But sometimes Adware is used for more nefarious
purposes including redirecting search results, displaying op-ups that can’t be closed or link to malware,
disabling antivirus software or even going all the way off the rails into the territory of spyware—see #4.
Technically, adware is installed with people's knowledge and consent. But when was the last time you read all
the way through a several thousand word "Terms of Service" statement? By clicking the "I Agree" button, you
grant consent. Because you have acknowledged and consented to the terms of service, these programs can't
be termed malware. Today’s antivirus software typically identifies these programs as "potentially unwanted
programs" (PUPs).
4. Spyware
Spyware does just what it says. It spies on what you're doing at your computer. It collects data such as
keystrokes, browsing habits, location data and even login information. While adware might include
"repurposing" collected data for sale in the terms of service statement, spyware is more duplicitous. Spyware
is considered malware because users are unaware of it. The only intent of spyware is malicious. Spyware
collects and sells your data to third parties, typically cyber criminals, with no regard for how the data will be
used. Spyware may also modify specific security settings on your computer or interfere with network
connections.
In another example of how the line between adware and spyware can blur, the rise of mobile computing has
seen an explosion of spyware that tracks user behavior across devices and physical locations without their
consent. For example, a free weather app on your smartphone may have gotten your consent to collect and
use your location data, ostensibly to provide more accurate forecasts. You agreed to the app’s terms of
4
service which include language enabling to re-use the location as they see fit, so it’s legit. But what happens
when that includes selling your location to data to anyone who can afford it, regardless of whether that an
online store trying to populate banner ads in your browser or a cyber-criminal who cross-references mobile
phone user data with other data sources?
5. Ransomware
Ransomware infects your computer, encrypts your PII and other sensitive data such as personal or work
documents and then demands a ransom for their release. If you refuse to pay, the data is deleted. Some
ransomware variants lock out all access to your computer. Sometimes, they might claim to be the work of
legitimate law enforcement agencies and suggest that you've been caught doing something illegal.
6. Bots
Bots are programs designed to automatically carry out specific operations. Although they serve many
legitimate purposes, they are also a popular type of malware. Once on a computer, bots can cause the
machine to execute specific commands without the user's approval or knowledge. Hackers may also try to
infect multiple computers with the same bot to create a "botnet"—short for robot network. These zombie
botnets give hackers the ability to remotely manage compromised computers, enabling them to steal
sensitive data, to spy on user activities, to distribute spam automatically or to launch devastating Distributed-
Denial-of-Service (DDoS) attacks on computer networks and websites.
7. Rootkits
Rootkits allow remote access or control of a computer by a third party. These programs are useful for IT
professionals trying to troubleshoot network issues remotely, but they can easily become nefarious. Once
installed on your computer, rootkits allow attackers to take complete control of your machine to steal data or
install additional malware. Rootkits are designed to go unnoticed and actively hide their presence and that of
other malware that they install.
As with most computer viruses and malware, although it’s no guarantee of safety, protecting your devices
from rootkits starts with keeping current on all OS and application updates and patches to eliminate potential
infection routes. Effective detection of rootkits requires real-time monitoring—not just periodic disk drive
scans—for unusual behavior system behavior.
8. Trojan Horses
Commonly called "Trojans," these programs hide in plain sight by masquerading as legitimate files or
software. Once downloaded and installed, Trojans make changes to a computer and carry out malicious
activities, without the knowledge or consent of the victim.
9. Bugs
Bugs—flaws in software code—are not a type of malware, they are errors in software code that popular
vectors for attackers with malicious intent. Bugs can, on and of themselves, have detrimental effects on your
computer, such as freezing, crashing or reducing performance. Security bugs create holes in a computer or
network’s defenses that are especially attractive to would-be attackers. While better security control on the
developer end helps reduce the number of bugs, bugs are another reason why keeping current on software
patches and system updates is crucial.
EVALUATION:
1. State FIVE preventive measures against virus known to you.
2. What do we do to a virus warning sign?
READING ASSIGNMENT
READ the topic ‘Maintenance of a Computer” using your students’ textbook
WEEKEND ASSIGNMENT
1. An act of breaking security policies, practices, or procedures.
(a) Security Breach (b) Internet breach (c) normal breach (d) random
2. Examples of computer virus include all, except……………. (a) Polyboot (b) Satan (c) Tuareg (d) 1967 lucky
3. A computer program or file on the computer of a user that makes the computer susceptible to malicious
intruder by allowing them to access and read users files is called……………(a) Trolley horse (b) IBM Trojan (c)
5
Trojan horse (d) Murphy
4. ……………. is the most important source of computer virus infection?
(a) Computer (b) Worm(c) hackers (d) Internet.
6
WEEK 2
MAINTENANCE OF COMPUTER
CONTENT:
Details of Hardware Maintenance
Details of Software Maintenance
Maintenance, repair and operations (MRO) involves fixing any sort of mechanical or electrical device
should it come out of order or broken. It also includes performing routine actions which keep the device in
working order or prevent trouble from arising (Preventive maintenance).
CATEGORIES OF SOFTWARE MAINTENANCE:
7
WEEK 3
CAREER OPTIONS IN DATA PROCESSING
CONTENT:
*Professions in Computer
*Qualities of a good computer professional
PROFESSIONS IN COMPUTER
A Computer professional is one who deals with the computer industry to develop something. They may
design, build, sell, lease, or repair hardware, or they may sell, market or write software. The definition now
extends to those involved in the Internet industry.
To prepare for a career in the computer industry, you must first decide on the area in which you are
interested and then obtain education in that field. If you desire a formal education several options are
available, which include attending a college that offers two year degree or a university that offers a four year
degree. These colleges give certificates after the completion of the degree.
The Following are careers in the computer profession
1. General business and IT department
2. Computer equipment field
3. Computer software fields
4. Computer service and repair fields
5. Computer Sales
6. Computer education and training field
7. IT consultation
QUALITIES OF A GOOD COMPUTER PROFESSIONAL
8
Computer Professional Bodies and their Functions
A professional body is a group of people who come together for professional and other mutual benefits and
are governed by a constitution.
Some computer professional bodies and their functions are highlighted below.
1. Nigeria Computer society (NCS): www.ncs.or.ng
This is a group of people interested in computing technology within Nigerian. They share ideas and
knowledge and formulate policies that relate to ICT.
2. Institute of Management Information System (IMIS): www.imis.org.uk
This is an internal body devoted to supporting and promoting the profession of information systems
management.
3. Computer Professional Registration Council of Nigeria (CPN): www.cprcn.org
This is a body responsible for the science and use of computer machines and techniques in the country.
4. Information Technology Association of Nigeria (ITAN): www.itan.org.ng
This body provides professional services for IT bodies in Nigeria.
5. Nigeria Internet Group (NIG):
It is a Non-Governmental Organization (NGO) that promotes and facilitates full internet connectivity in Nigeria.
6. Nigeria Communication Commission (NCC):
This body controls and regulates all communication operations in Nigeria.
7. Internet Service Provider Association of Nigeria (ISPAN):
This body regulates and monitors Internet service operators in the country.
8. IT industry Association of Nigerian (ITIAN):
The body controls the development of locally manufactured computer systems in Nigeria.
9. Association of Telecom Companies in Nigeria (ATCN): This body monitors and controls all telecom service
operators in Nigeria.
10. Computer Association of Nigeria (COAN). This is a body that motivates and promotes Nigeria software
developers and their products in the software industry.
EVALUATION:
1. Who are computer professionals?
2. Name some of the fields where computer professionals are required.
3. Name any FOUR kinds of computer professionals.
4. What are the qualities of a good computer professional?
5. Mention any four computer professional bodies and their functions.
9
WEEK 4
INDEXES
CONTENT:
Clustered versus Unclustered Indexes
Dense versus Sparse
Primary and Secondary Indexes
Indexes using composite search keys
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, which are stored at the leaf level of the tree in sorted
order.
Clustered and unclustered tree indexes are illustrated below
Index entries
(Direct search for
data entries)
Index file
Data entries
Data
Records Data file
10
Clustered Tree Index using Alternative (2)
Index entries
(Direct search for
data entries)
Index file
D Data entries
Data
Records Data file
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.
Dense Versus Sparse Indexes
An index 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. A sparse index contains one entry for each page of records in the data file.
Alternative (1) for data entries always leads to a dense index. Alternative (2) can be used to build either
dense or sparse indexes. Alternative (3) is typically only used to build a dense index.
11
DATA
Sparse Versus Dense Indexes
A data file of records with three fields (name, age, and sal) is shown with two simple indexes on it, both of
which use Alternative (2) for data entry format. 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.
A data file is said to be inverted on a field if there is a dense secondary index on this field. A fully inverted file
is one in which there is a dense secondary index on each field that does not appear in the primary key.
READING ASSIGNMENT:
Study the topic ‘the primary and secondary index
WEEKEND ASSIGNMENT
OBJECTIVE TEST
1. An index that uses Alternative (2) or Alternative (3) can be a clustered index only. (a) if data records
are unsorted (b) if the data records are sorted on the search key field (c) if data records are sorted on
more than one key field (d) if data records use dense index
2. We can have at most _____ clustered index on a data file. (a) one (b) two (c) three (d) four
12
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. An index that uses Alternative __ is called a primary index. (a) (1) (b) (2) (c) (3) (d) all of the
above
3. Alternative ___ is typically only used to build a dense index. (a) (1) (b) (2) (c) (d) all of the
above
13
WEEK 5
DATABASE SECURITY
CONTENT:
Introduction to database security
Access Control
Roles of the database administrator in security
Encryption
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.
Data Security
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.
Considerations when designing a database
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.
ACCESS CONTROL
A database of an enterprise contains a great deal of information and usually has several groups of users.
Most users need to access only a small part of the database to carry out their tasks. Allowing users
unrestricted access to all the data can be undesirable, and a DBMS should provide mechanisms to control
access to data.
A DBMS offers two main approaches to access control
i. Discretionary Access Control: This is based on the concept of access rights, or privileges, and
mechanisms for giving users such privileges. A privileges allows a user access some data object in a certain
manner (e.g. to read or to modify). A user who creates a database object such as a table or a view
automatically gets all applicable privileges on that object. The DBMS subsequently keeps track of how these
privileges are granted to other users, and possibly revoked, and ensures that at all times only users with
necessary privileges can access an object. SQL -92 supports discretionary access control through the GRANT
and REVOKE commands.
14
ii. Mandatory Access Control: This is used to address some loopholes in discretionary access control.
The popular model for mandatory access control, called the Bell-LaPadula model, is described in terms of
objects (e.g. tables, views, rows, columns), subjects (e.g. users, program), security classes, and clearances.
Each database object is assigned a security class, and each subject is assigned clearance for a security class;
we will denote the class of an object or subject A as class (A).
The Bell-LaPadula model imposes two restriction on all reads and writes of database objects:
- Simple Security Property: Subject S is allowed to read object O only if class(S) >=class(O).
- *Property: Subject S is allowed to write object O only if class(S)<=class(O).
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:
1. Creating new accounts: Each new user or group of users must be assigned an authorization id and a
password. Note that application programs that access the database have the same authorization id as the
user executing the program.
2. Mandatory control issues: If the DBMS supports mandatory control-some customized systems for
applications with very high security requirements.
The DBA is also responsible for maintaining the audit trail, which is essentially the log of updates with the
authorization ID (of the user who is executing the transaction) added to each log entry. This log is just a minor
extension of the log mechanism used to recover from crashes.
Encryption
A DBMS can use encryption to protect information in certain situations where the normal security
mechanisms of the DBMS are not adequate. E.g. an intruder may steal tapes containing some data or tap a
communication line. By storing and transmitting data in an encrypted form, the DBMS ensures that such
stolen data is not intelligible to the intruder.
The basic idea behind encryption is to apply an encryption algorithm, which may be accessible to the
intruder, to the original data and a user-specified or DBA-specified encryption key which is kept secret.
EVALUATION:
(i) What do you mean by data security?
ii. How is date secured?
iii. Why is mandatory access control better than discretionary access control?
iv. Explain Encryption.
v.What is the role of a database administrator?
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
15
3. 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
4. ____access control is based on system wide policies that cannot be changed by individual users. (a)
discretionary (b) secure (c) mandatory (d) insecure
16
WEEK 6
CRASH RECOVERY
CONTENT:
Introduction to Aries (analysis, redo and undo)
Other recovery related data structure
The write-ahead protocol
Check pointing
Media recovery
Sub-topic 1
Introduction to Aries (analysis, redo and undo)
The recovery manager of a DBMS is responsible for ensuring two important properties of transactions:
atomicity and durability.
ARIES (Algorithm for Recovery and Isolation Exploiting Semantics) is a recovery algorithm that is designed to
work with a steal, no-force approach.
When the recovery manager is invoked after a crash, restart proceeds in three phases:
1. Analysis: Identifies dirty pages in the buffer pool (i.e. changes that have not been written to disk) and
active transactions at the time of the crash.
2. Redo: Repeats all actions, starting from an appropriate point in the log, and restores the database
state to what it was at the time of the crash.
3. Undo: Undoes the actions of transactions that did not commit, so that the database reflects only the
actions of committed transactions.
i. Write-ahead logging: Any change to a database object is first recorded in the log; the record in the
log must be written to stable storage before the change to the database object is written to disk.
ii. Repeating history during Redo: Upon restart following a crash, ARIES retraces all actions of the
DBMS before the crash and brings the system back to the exact state that it was in at the time of the crash.
Then, it undoes the action of transactions that were still active at the time of the crash (effectively aborting
them)
iii. Logging changes during Undo: Database while undoing a transaction are logged in order to ensure
that such an action is not repeated in the event of repeated (failures causing) restarts.
The Log
The log, sometimes called the trail or journal, is a history of actions executed by the DBMS. Physically, the log
is a file of records stored in stable storage, which is assumed to survive crashes; this durability can be
achieved by maintaining two or more copies of the log on different disks (perhaps in different locations), so
that the chance of all copies of the log being simultaneously lost in negligibly small.
Transaction table: This table contains one entry for each active transaction. The entry contains (among other
things) the transaction ID, the status, and a field called lastLSN, which is the LSN of the most recent log
17
record for this transaction. The status of a transaction can be that it is in progress, is committed, ort is
aborted.
Dirty page table: This table contains one entry for each dirty page in the buffer pool, that is, each page with
changes that are not yet reflected on disk. The entry contains a field reeLSN, which is the LSN of the first log
record that caused the page to become dirty.
pageID recLSN
P500 prevLSN transID type pageID length offset before after
P600 image image
P505
T1000Update P500 3 21 ABC DEF
T2000update P600 3 41 HIJ KLM
DIRTY PAGE TABLE T2000update P500 3 20 GDE QRS
T1000 update P505 3 21 TUV WXY
transID lastLSN
T1000
T2000
LOG
TRANSACTION TABLE
EVALUATION:
(i) What do you mean by the log?.
ii. What is full form of ARIES?
READING ASSIGNMENT:
Study the topic ‘Crash Recovery’ using students’ textbook
WEEKEND ASSIGNMENT:
OBJECTIVE TEST:
1. This process identifies dirty pages in the buffer pool. (a) Redo (b) Undo
(c) Analysis (d) none of the above
2. CLRb means (a) Combined lateral Register (b) Compensation Log Record
(c) Compromise Log Record (d) Complete Loggers record
18
definition of a committed transaction is effectively ä transaction whose log records, including a commit
record, have all been written to stable storage”.
Check pointing
A checkpoint is like a snapshot of the DBMS state, and by taking checkpoints periodically, as we will see, the
DBMS can reduce the amount of work to be done during restart in the event of a subsequent crash.
Check pointing in ARIES has three steps.
First, a begin checkpoint: this is written to indicate when the checkpoint starts.
Second, an end checkpoint: record is constructed, including in it the current contents of the transaction table
and the dirty page table, and appended to the log.
Third step is carried out after the end checkpoint: record is written to stable storage: A special master record
containing the LSN of the begin checkpoint log record is written to a known place on stable storage. While
the end checkpoint record is being constructed, the DBMS continues executing transactions and writing other
log records; the only guarantee we have is that the transaction table and dirty page table are accurate as of
the time of the begin checkpoint record.
Media Recovery
Media recovery is based on periodically making a copy of the database. Because copying a large database
object such as a file can take a long time, and the DBMS must be allowed to continue with its operations in
the meantime, creating a copy is handled in a manner similar to taking a fussy checkpoint.
When a database object such as a file or a page is corrupted, the copy of that object is brought up-to-date by
using the log to identify and reapply the changes of committed transactions and undo the changes of
uncommitted transactions (as of the time of the media recovery operation).
EVALUATION:
(i) What are the three phases of restart after crash?
ii. What is write ahead logging?
READING ASSIGNMENT:
Study the topic ‘Parallel and Distributed Databases’ using students’ textbook
WEEKEND ASSIGNMENT:
OBJECTIVE TEST:
1. This table contains one entry for each active transaction (a) dirty page table (b) write ahead table
(c) LSN table (d) Transaction table
2. Any changes to a database object is first recorded in the log. (a) write ahead logging (b) repeated
history (c) logging changes during undo (d) all of the above
19
WEEK 7
PARALLEL AND DISTRIBUTED DATABASE
CONTENT:
Architecture for parallel database
Introduction to distributed databases
Distributed DBMS Architecture
Storing data in a distributed DBMS
Sub-topic :
Architecture for parallel database
Parallel Database
A parallel database system, is one that seeks to improve performance through parallel implementation of
various operations such as loading data, building indexes, and evaluating queries.
Interconnection Network P P P
P P P Interconnection Network
D D D D D D
SHARED NOTHING SHARED MEMORY
M M M
P P P
Interconnection Network
20
D D D
SHARED DISK
1. Higher Performance: with more CPUs available to an application, higher speedup and scaleup can be
attained.
2. High Availability: Nodes are isolated from each other, so failure at one node does not bring the entire
system down.
3. Greater Flexibility: An OPS environment is extremely flexible. You can allocate or deal-locate
instances as necessary.
4. More Users: Parallel database technology can make it possible to overcome memory limits, enabling
a single system to serve thousands of users.
Distributed Database, this is when data is physically stored across several sites, and each site is typically
managed by a DBMS that is capable of running independently of the other sites. The location of data items
and the degree of autonomy of individual sites have a significant impact on all aspects of the system,
including query optimization and processing, concurrency control and recovery. In contrast to parallel
database, the distribution of data is governed by factors such as local ownership and increased availability in
addition to performance issues.
The classical view of a distributed database system is that the system should make the impact of data
distribution transparent.
Below are the properties to be considered:
There are three alternative approaches to separating functionality across different DBMS-related processes.
These alternative distributed DBMS architecture are called: Client-Server, Collaborating Server, and
middleware.
21
Client-Server Systems
A client-Server system has one or more client processes and one or more server processes, and a client
process can send a query to any one server process. Clients are responsible for user-interface issues, and
servers manage data and execute transactions. Thus, a client process could run on a personal computer and
send queries to a server running on a mainframe.
First, it is relatively simple to implement. Secondly, expensive server machines are not underutilized by
dealing with mundane user-interactions. Thirdly, users can run a graphical user interface that they are
familiar with, rather than the (possibly unfamiliar and unfriendly) user interface on the server.
While writing Client-Server applications, it is important to remember the boundary between the client and
the server and to keep the communication between them as set-oriented as possible.
Middleware System
The Middleware architecture is designed to allow a single query to span multiple servers, without requiring
all database servers to be capable of managing such multisite execution strategies. It is especially attractive
when trying to integrate several legacy systems, whose basic capabilities cannot be extended.
The idea is that we need just one database server that is capable of managing queries and transaction
spanning multiple servers; the remaining servers only need to handle local queries and transactions. We can
think of this special server as a layer of software that coordinates the execution of queries and transactions
across one or more independent database servers; such software is often called middleware.
In a distributed DBMS, relations are stored across several sites. Accessing a relation that is stored at a remote
site incurs message-passing costs, and to reduce this overhead, a single relation may be partitioned, or
fragmented across several sites, with fragments stored at the sites where they are most often accessed or
replicated at each site where the relation is in high demand.
Fragmentation
This consists of breaking a relation into smaller relations or fragments, and storing the fragments (instead of
the relation itself), possibly at different sites.
In horizontal fragmentation, each fragment consists of a subset of rows of the original relation.
In vertical fragmentation, each fragment consists of a subset of column s of the original relation.
22
Eid name city age sal
TID
T1 53666 Jones Medras 18 35
T2 53688 Smith Chincago 18 32
T3
T4 53650 Smith Chicago 19 48
T5 53831 Madayan Bombay 11 20
53832 Guldu
Vertical Fragment Bombay 12
Horizontal 20
Fragment
Typically, the tuples that belong to a given horizontal fragment are identified by a selection query; for
example, employee tuples might be organized into fragments by city, with all employees in a given city
assigned to the same fragment.
Replication
This means that we store several copies of a relation or relation fragment. An entire relation can be
replicated at one or more sites. Similarly, one or more fragments of a relation can be replicated at other sites.
E.g. if a relation R is fragmented into R1, R2 and R3, there might be just one copy of R1, whereas R2 is
replicated at two other sites and R3 is replicated at all sites.
EVALUATION:
i. What is a parallel database?
ii. What is distributed database?
iii. Compare horizontal and vertical fragmentation
iv. What do you mean by fragmentation?
v. What are the disadvantages of distributed databases?
READING ASSIGNMENT:
Study the following WAEC past questions.
24
- Describes the data in details as much as possible without information resources on the World Wide Web/Internet/web
regard to hoe they will be physically implemented in the servers.
database. 3. (a) Outline the steps involved in printing the first five pages
Physical database model of a word document from the print dialog box on a computer
-Is a representation of data/tables (Table Names, Primary key, with two printers installed.
Foreign keys, Column/Fied Name and Data types) in a DBMS. (b) Sadiq complained that a pop-up usually appears on the
2. (a) Vera a secretary to the manager of her organization is screen of his personal computer thereby disturbing him while
saddled with the responsibility of typing a confidential report. using the computer;
She is also instructed to insert the word "CONFIDENTIAL" (i) What is the possible cause of the pop-up?
diagonally in the background of every page of the report. (ii) State a possible cause of the element causing the pop-up.
(i) State the most suitable application software needed by (iii) What measure would be necessary to stop the pop-up
Vera to produce the report. from reoccurring?
(ii) What feature of the application software can be used to (c) Mr Aneke is billed to address audience in an auditorium.
insert the word "CONFIDENTIAL" as instructed? (i) What computer application package is suitable to prepare
(iii) Mention one measure that can be taken to ensure the and deliver his speech?
confidentiality of the soft copy of the report in the computer. (ii) State the output device that can be used to transmit Mr
(b) Explain the following terms; Aneke's speech note from his computer to a large screen in
(i) Icon the auditorium.
(ii) Browser (d) Give two types of computer network.
ANSWER ANSWER
Explanation Explanation
2 (a)(i) A word processing package/Word processor 3 (a) Steps involved in printing first five pages of a document.
- Ami Pro - Choose the printer from the list of printers displayed .
- Applix Word - Choose the page range (1-5 OR 1,2,3,4,5)
- Atlantis Word Processor - Click on print/Ok
- Corel Word Perfect (b)(i) Possible cause of the pop-up
- Emacs - Virus/Malware
- Google Docs - Unlicensed software
- IA Writer - Plugins
- Kword - Pirated/Facked software
- Kingsoft writer - Need for software update
- Libre Office (ii) Sources of malware/virus
- Locoscript - Infected files/media
- Lotus WordPro - Installed plugins
- Microsoft Write - Downloading
- Ms Edit - Cracked/pirated software
- Ms Word - Email attachment
- Nisus Writer - Use of CD/DVD or portable devices
- Open Office Word - Visited unreliable websites
- Polaris Office - Outdated/expired software
- Quick Office (iii) Measures to prevent pop-up
- Quick Word - Use of antivirus/anti-malware popup blocker
- Star Office writer - Use of licensed software
- Tech Writer - Disable plugins
- TextMaker - Regular software update
- Word Craft (c) (i) Presentation Packages
- Word Perfect - Corel presentation
- Wordstar - Calligra
- Zoho Office - Magic point
- Zoho Writer - OpenLP
(ii) Water Mark - Slide Dogs
(iii) Measures to ensure confidentiality of files - Havard Graphics
- Use of password - PowerPoint
- Use of encryption - Prezi
- Access control - Camtasia
- Authentication - Google Docs
(b) (i) An icon is an image/a graphical or pictorial (ii) Multimedia projector/projector
representation of a command, program, file or folder on a (d) Types of computer network
computer screen for easy access. - Local Area Network (LAN/WLAN)
(ii) A browser is a software/web client/program/application - Metropolitan Area Network (MAN)
used for accessing/retrieving, presenting and traversing - Personal Area Network (PAN)
25
- Wide Area Network (WAN) (b) Uses of Automated Teller Machine (ATM)
(b) State four uses of automated Teller Machine (ATM) Quick teller option- with quick teller you can buy airtime,
make payment online and shop online
(c)(i) Give the function of a modem
Buying and transferring airtime to others
(ii) List two means of transmitting information
Cash withdrawal
2. Hamza, Emeka, Funsho, Fejiro and Idongesit were
friends from secondary school. Now, Hamza is a pilot, Printing of mini-statement of your account
Emeka is a businessman, Funsho is banker, Fejiro is a
manufacturer while Idongesit is a teacher. State two
Intra bank transfer
ways by which any of these friends can apply ICT in their
respective professions.
Inter bank transfer
3. a. A secondary school has over twenty personal
computers. The school management intends to connect Sending or transferring money to your family members,
all the computer in a network. Give four reasons that relatives or friends
must have motivated the school management into
connecting the computers together. Checking account balance
(b) List four network devices required to accomplish the Checking account number
task in 3(a).
Payment from DSTV
(c) State one function each of any two of the devices
listed in 3(b).
Electricity bills and other utility bills
(b) Network devices required to accomplish the task (g) Network Bridge; Connects two segments of a
in 3(a) network together. Divides network into manageable
sections.
27
(h) Firewall; Protects networks or network devices. 2020
Filters packets. Filters incoming network and outgoing
networks. Prevents network traffic. Inspects packets 1.(a) What is a function in MS Excel?
which is supposed to forward to determine whether they
correspond to a desired template for traffic patterns.
(b) List two categories of functions in MS Excel.
(i) Modem; Converts digital signals generated by the
computer into analog signals. Modulates signals. Data (c) What is the cell referencing in MS Excel.
compression. Error correction. Flow control.
(d)(i) State two types of cell referencing in MS Excel.
(ii) Mention three cardinality relationships database (b) List three devices required in the business centre
management.
(c) Give two applications software needed in the
ANSWER business centre.
(b((i) Cardinality; This refers to the uniqueness of data 4. A school decides to harmonize the operation of its two
values contained in a column. High cardinality means campuses using a distributed database system as well
that the column contains a large percentage of totally as install air conditioners and uninterrupted power
unique values. Low cardinality means that the column supply in the computer laboratory.
contains alot of "repeals" in its data range.
(a) State three (i) Importance of using distributed
(ii) Three cardinality relationships in database database (ii) disadvantages of using computer
management; processing information in the school
I. One-to one (1:1) relationship (b) Give two reasons for installing the; (i) air conditioners
(ii) uninterrupted power supply devices
II. One-to-many (1-M) relationship
ANSWER
III. Many-to-many (M:M) relationship
1. Explanation
(a) Meaning of Function
28
A function is a predefined formula that performs (iv) Scanners(biometric/optical)
calculations using specific values in a particulr order.
(v) USB/Flash drive
(b) Categories of functions in MS Excel
(vi) Paper punch/perforator
(i) Autosum (ii) Look up and Reference (ii) Maths and
Trigonometry (iv) Date abd Time (v) Database (vi) (vii) Laminating machine
Financial (vii) Statistical (viii) Compatibility (ix) Web (x)
Information
(viii) Printers
(c) Cell referencing is the use of alphanumeric value to
identify a specific cell in a spreadsheet application. (ix) Ruler
(b) Devices required by a computer business centre (c) Difference between LAN and WAN
30