Grade 12 Data Processing
Grade 12 Data Processing
3. INDEXES:- Dense versus Sparse, Primary and Secondary Indexes, Indexesusing Composite Search Keys
5. MAINTENANCE OF COMPUTER:- Procedure for Software Maintenance,Software for Hardware and Software
Maintenance
7. DATABASE SECURITY:- Importance, Integrity and Availability, the Role of aDatabase Administrator
10. REVISION
11. EXAMINATION
LESSON NOTE ON DATA PROCESSING SS3 FIRST TERM [Publish Date]
WEEK ONE
REVISION
(1) Flat (2) Hierarchical (3) Network (4) Relational (5) Object-Relational and(6)Star Schema
NORMALIZATION
Is the process of efficiently organizing data in a database by reducingduplication or redundancy and design flaws.
NORMAL FORM
Provide criteria for determining a table’s degree of vulnerability to logicalinconsistencies and anomalies.
1. The minimal number of attributes necessary to support the datarequirements of the enterprise
2. Attributes with a close logical relationship are found in the same relation
3. Minimal redundancy with each attribute represented only once with theimportant exception of attributes that form all
or part of foreign keys.
EVALUATION
CONCEPT OF KEYS
PRIMARY KEY: Is the attribute used to identify a record uniquely in a table or database
FOREIGN KEY: Is the field or attribute of a table that matches the primary key of anothertable.
Is the diagram that illustrates the logical structure of a database. Components of Entity-Relationship (1) Entities (2)
ATTRIBUTES: Are data elements that have the smallest units of data that can be described ina meaningful manner.
TYPES OF RELATIONSHIP
One-to-One, One-to-Many, Many-to-Many
GENERAL EVALUATION
(c) Use the following data to draw a hierarchical data model: Fruit; Orange, Pear, Berry; Lime, Grape,Avocado, Sour
Sop, Raspberry, Cranberry [Hints: Limeand Grape are children of Orange, Avocado, and SoarSopare children of Pear
while Raspberry and Cranberry are children of Berry]
2. State five (5) classes of normal forms
3. Bring the table below to Second Normal Form
LESSON NOTE ON DATA PROCESSING SS3 FIRST TERM [Publish Date]
TABLE_PURCHASE
1 1 Lagos
1 3 Kano
2 1 Lagos
3 2 Abuja
4 3 Kano
WEEKEND ASSIGNMENT
1. Data models describe ……… data for storage in data management systems (a) structured (b) unstructured (c) integer
(d) alphabetic
2. Which of this is not an example of standard data model (a) ISO 10303 (b)ISO 15926 (c) IDEAS GROUP d)
Good shepherd
3. key is a field in a relational table that matches a primary key of another table (a) foreign (b) surrogate (c) primary (d)
candidate
4. is graphical representation of entities and their relationships to each other (a) Entity-Relationship Diagram (b) Entity-
Relationship Picture (c) Entity-Relationship Data (d) Entity-Relationship Symbol
5. A roof covers a building describes ........................................... relationship (a) one-to-one (b) one-to-many (c)
many-to-many(d) none of the above
THEORY
1. (a) Define the following terms (i) Entity (ii) Attribute (iii) Relationship
2. What is cardinality?
3. Mention and explain three types of relationship in ERD with one example each
4. Define the following (i) Primary key (ii) Foreign key (iii) Compositeprimary key
5. Explain the term Normal Form.
6. Design a database of your choice indicating the primary key and the foreignkey
WEEK TWO
INDEXES
LESSON NOTE ON DATA PROCESSING SS3 FIRST TERM [Publish Date]
DEFINITION
An Index is a copy of 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 first record thatcontains 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 record. A given file of 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 tablescan which is sequential and index which
is random.
Indexes are special lookup tables that the database engine uses to speed updata 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 willbe retrieved. When a table has an index it simply means the records in that table
has been sorted in one way or the other.
Indexes are automatically created when primary key and unique constraints are defined on table columns.
EVALUATION
1. What is an index?
INDEX CLASSIFICATION
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 arrange some tables in a room, you could arrange them in a
round form, row form or packed them closetogether, 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.
CLUSTERED 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 agethat 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 fordata 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 illustrate a clustered index file:
00251302TB TjomasBintu 15
UNCLUSTERED INDEX
This 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 indexcolumn is sorted in one order while the actual records or rows are sorted in
LESSON NOTE ON DATA PROCESSING SS3 FIRST TERM [Publish Date]
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.
GENERAL EVALUATION
.WEEKEND ASSIGNMENT
1. is a database table that has been reduced to certain fields.a) Table b) An index c) Table model d) Network model
3. 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
4. A can contain several unclustered indexes a) data file b) primary c) check d) index
THEORY
3. What is an index?
WEEK THREE
INDEXES
DENSE INDEX
This is said to be dense if it contains (at least) one data entry for every searchkey value that appears in a record in the
indexed file.
In a dense index, index record 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 willpoint to in the table or file.
For example,
10101
12121
15151
22222
32343
From the figure above, we can see that each search key in the index has aparticular record that it point to in the 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. For example:
LESSON NOTE ON DATA PROCESSING SS3 FIRST TERM [Publish Date]
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 10101key to retrieve their records in the base table.
A Sparse Index contains one entry for each page of 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.
PRIMARY INDEX
Primary index is an index defined on a primary key column(s) of a relation withunique constraint which guarantee
that the field will not contain duplicate values and determine the order of how the records are physically stored on the
disk. Note that this is also called clustered index.
This is an index on a set of fields that includes the primary key. Primary index contains records that are usually clustered.
A primary index is created for the primary key of a table.
SECONDARY INDEX
Secondary index is an index defined on a non-key field which may contain duplicate values and as such does not
determine the order of how the recordsare physically stored on a disk. It is also called non-clustered index.
For example, in student database, student ID is used to look up for a student asthe key, however, one might want to
look up for a student using LastName by creating secondary index on that column.
Secondary index is an index that is not a primary index i.e. it does not include primary key. Secondary index can be
created on non- key attribute. It contains duplicate data entries.
A Unique index is an index in which the search key contains some candidatekey.
EVALUATION
1. Distinguish between dense index and sparse index
LESSON NOTE ON DATA PROCESSING SS3 FIRST TERM [Publish Date]
Composite search keys or concatenated keys are when the search key for an index contain several fields. For example,
considering a collection of employeerecords with field name, age and salary 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. For
example, 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.
The search key for an index can contain several fields, such keys are called Composite Search Keys or Concatenated
Keys.
Range Query is the one in which not all fields in the search key are bound to constants. For example, we can ask to
retrieve all data entries with age = 20; this query implies that any value is acceptable for the sal _eld. Another example
of a range query is when ask to retrieve all data entries with age < 30and sal> 40
GENERAL EVALUATION
1. Differentiate between a unique index and a range query.
WEEKEND ASSIGNMENT
1. ___________ is an index in which the search key contains some candidate key. a)Unique index b) An index c)
composite d) sparse index
2. ________ can be created on a non- key attribute. a) primary index b) denseindex c) secondary index d) sparse index
3. A sparse index contains one entry for each ……of records in the data file. a) page b) table c) row d) column
4. ____________ 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) rangequery
5.____________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. Create a student table with the following fields: name, age, and scores of 5records. Create an index using a composite
keys name and age. (show the table and SQL statements)
Maintenance of computer hardware is a way of taking care, repairing andreplacing broken and failing computer
hardware.
Maintenance is necessary on computer to avoid hardware failure or loosing valuable information and most times,
LESSON NOTE ON DATA PROCESSING SS3 FIRST TERM [Publish Date]
hardware breaks without notice. Excessheat accelerates the deterioration of the delicate circuits in the system. Dust
and dirt are the most common cause of overheating. Thus, cleaning a case isdone to prevent components from
overheating.
Computer hardware components attract dust, dirt, lint, carpet fibres, pet hairand smoke particles. The air from the
computer cooling fan contains grime which settles on the components and causes overheating which eventually results
in permanent hardware failure.
As a result of this, complete cleaning should be done at least once a year and ifthe computer is used in hot, dusty
moist environment, cleaning must be performed more frequently.
Step 1: Always shut down, power off the system before carrying out anycomputer maintenance.
Step 2: Never sprays any liquid onto any computer component. Spray or pour the liquid on a lint – free cloth and wipe
the PC with the cloth. Avoid product with certain cellulose which will leave streaks on your computer equipment.
The use of paper towels or an old rag to clean delicate surfaces of a computershould be discouraged because paper
products contain cellulose which can scratch delicate surfaces of your hardware
Step 3: Use vacuum cleaner to remove dirt, dust, food and hair from keyboards.it is advisable to wear an anti –
static wrist strip to reduce thetransfer of static electricity from the body to the computer.
Step 5: Do not use your breath to blow the dust off the components because your breath contains moisture and the
components are not built to berust- proof.
Step 7: Do not use anything wet or damp inside the computer case.
Step 8: Do not let any component or circuit board inside the computer case getwet or damp.
Step 9: Do not attempt to clean the motherboard with a cloth as it may damage the electrical components. Use a
slightly moist cloth to wipe off dustand grime inside the computer case.
1. A clean non-abrasive cloth such as microfiber, cotton, T-shirt, cotton handkerchief should be used and avoid using
paper towels, dish towels,facial tissue, old rag.
LESSON NOTE ON DATA PROCESSING SS3 FIRST TERM [Publish Date]
2. Portable vacuum.
4. Cotton swabs.
5. Foam swabs.
EVALUATION
1. State the steps involve in maintaining a computer hardware
2. Mention six tools used in cleaning computer hardware
Step 2: Lightly dampen a cleaning cloth with isopropyl alcohol and wipe downthe outside of the computer mouse an
mouse pad.
Step 3: Remove the bottom cover of the mouse. To this, turn it over and note the directional arrows that indicate the
direction of rotation, or how to slide it off. Press with your fingers in the direction of the arrows and then turn the
mouse right side up, letting the cover and mouse ball drop into your hand.
Step 4: Wipe the computer mouse ball with a lint-free cloth dampened withisopropyl alcohol. Put it aside.
Step 5: Dampen a swab with isopropyl alcohol and clean between, around andon top the keys. Change swabs as they
become dirty. You may need several swabs.
Step 7: Wipe the mouse cord. Lightly dampen a cleaning cloth with mild soapsolution and gently pull the cord through
the cloth.
Step 1: Unplug the power supply cord and cable from the back of the monitorand allow it to cool for at least 20
minutes.
Step 2: Vacuum the outside of the monitor, particularly the cooling grooves, holes or slots in the top surface where
heavy dust or other debris may have collected. Blow compressed air in short puffs at an angle to the monitor surface.
The goal is to remove dust and dirt without letting anything fall intothe ventilation holes.
LESSON NOTE ON DATA PROCESSING SS3 FIRST TERM [Publish Date]
Step 3: Lightly dampen a cloth with a mild soap solution and wipe down theoutside plastic portions of the monitor.
Step 4: Clean the monitor cables and power cord while they are disconnected. Lightly dampen a cloth with mild soap
solution and gently pull the cables and cords through the cloth.
Step 5: Check the documentation or call the manufacturer to find out if your monitor screen has anti-glare, or other
delicate coatings. If so, ask the manufacturer or cleaning instructions. If it does not have these special coatings you
may spray a window cleaner unto a lint-free cloth and wipe it clean. Do notspray directly onto the screen. Chemicals
may drip inside the monitor and damage it.
Step 6: For dusty or dirty manufacturing environments use a computer dustcover to protect the monitor
Step 1: Remove the cable from the back of the computer case.
Step 2: Use a vacuum cleaner to remove debris between the key. If no vacuumis available, turn the keyboard upside
down and gently tap on the back side dislodge debris.
Step 3: Aim between the keys and compressed air to remove remaining dust and debris. Use short puffs of air applied
at about a 30-45 degree angle to thekeyboard surface. Alternate between blowing the keys and tapping the keyboard
upside down to dislodge particles until it is clean.
Step 4: Lightly dampen a cloth with a mild soap solution and wipe down theoutside of the keyboard. Do not spray
soap solution directly onto the keyboard.
Step 5: Dampen a swab with isopropyl alcohol and clean between, around and on top of the keys. Change swabs as they
become dirty. You may need several swabs.
Step 6: Wipe the keyboard cord. Lightly dampen a cleaning cloth with mild soap solution and gently pull the cord
through the cloth. Dry the cord with adry cloth.
Step 7: For dusty or dirty manufacturing environments a good keyboard coveris recommended.
1. Plug your laptop into the socket and you can leave it there wheneverpossible.
LESSON NOTE ON DATA PROCESSING SS3 FIRST TERM [Publish Date]
2. You can recharge your laptop’s battery whether the battery is fully drainedor not.
3. There is no need to fully drain your laptop’s lithium-ion battery every timeyou use it.
4. Lithium-ion battery have a rapid-charging option. This option is availableeither on a custom tab inside the Power
Option dialog box or from special battery software that came with your laptop.
5. Do not over charge the battery, charge the battery when is getting lowbetween 20%- 10% and do not dry the battery.
1. The battery needed to be fully charge before use at least for 4 to 6 hours.
2. Ensure that the UPS is kept in contact o the its electrical ground at alltimes. Do not over load
3. Do not let the UPS shut down by itself because it can damage battery.
1. Purchase DVD laser cleaning kit. The kit is comprised of a single disc that isdesign to spin in your drive and remove
all dust from the lens.
2. Place the CD/DVD laser lens cleaning disc inside your DVD drive’s tray. Close the tray and allow the CD spin in the
drive. As it spins, it will clear yourlens of most, if not all, of the dust that is on it.
3. Purchase a can of spray air. As an extra precaution, open your drive’s disc tray and gently spray a can of spray air into
it. This will remove any of the bigpieces of dust that may be lurking inside the tray.
GENERAL EVALUATION
1. Explain steps for cleaning the following (i) Keyboard (ii) Monitor
WEEKEND ASSIGNMENT
1. Maintenance is necessary on computer to avoid ………. a) hardware failure b) stealing c) invasion d) crime
2. Excess heat accelerates the deterioration of the delicate in the system. a) vacuum b) transistors c) circuits d) particles
3. Dust and dirt are the most common cause of a) leakage b) overheating c) breakage d) spooling.
4. ______ is used to remove dust, dirt and hair from the keyboard. a) Vacuum cleaner b) Brush c) Old rag d) Paper
towels
5. It is advisable to wear an to reduce transferring static electricity from your body to the computer. a) hand glove b)
anti – static wrist strip c)coat d) dust cover
THEORY
1. Explain the steps in cleaning the following: i) Mouse ii) Keyboard iiiMonitor iv) DVD drive lens
WEEK FIVE
MAINTENANCE OF COMPUTER II
SOFTWARE MAINTENANCE
The maintenance of programs inside the computer system such as virus, a spyware removal, back up software and a
registry removal, cleaner. Every PC should be installed with an anti virus, a spyware removal application back upand
a registry cleanser.
1. Corrective Maintenance
2. Perfective Maintenance
3. Adaptive Maintenance
4. Preventive maintenance
CORRECTIVE MAINTENANCE
This type of maintenance involves developing and deploying solution to problems that occur during usage of a
software program. For instance, when an error message comes up on the screen or program is hanging or freezing or
crashing, this implies that corrective software maintenance is needed. A computer programmer is employed to work
on a more permanent solution to the problems.
PERFECTIVE MAINTENANCE
This is a measure taken by computer programmer to upgrade the way asoftware programs function or how fast it
processes, requests, develop software menu layouts and command interface so as to ensure that the program has zero
tolerance for flaws.
ADAPTIVE MAINTENANCE
It takes care of the changes that occur in software development. For instance, ifthere is a change in processors speed,
thus change will invariably affect how the software performs on a single computer software interface with other
software programs. So changes in one program necessitates changes in other programs.
PREVENTIVE MAINTENANCE
This is a situation whereby computer programmers try to prevent problems with software programs before they occur.
They seek to prevent corrective maintenance as well as anticipating adaptive maintenance needs before users encounter
problems. This is done by test running their programs to ensure thatthe software can handle high data loads and other
LESSON NOTE ON DATA PROCESSING SS3 FIRST TERM [Publish Date]
stressful operation without difficulties. Computer programmers also ensure compatibility by testing the software with
other programs users that are likely to use their software.
5. Delete cookies
EVALUATION
2. If preventive maintenance operations are carried out regularly, a PC will never run slowly or have programs that
changes or freezes the computer.
3. When programs like CC cleaners or disk cleanser is used to clean up your hard drive , and also run Defraggler CD
disk. Defragment process pack your files that are scattered across your hard drive into configures cluster (Disk
Defragmenter), allowing the file system to locate them easily.
4. When a PC is protected and maintained by S/W clean up programs, thehrd drive will not be slow and fragmentation
will hardly occur.
5. Registry cleaning.
Routine Computer Maintenance consists of tasks performed on computer daily,weekly or monthly in order to keep
the computer running efficiently for a long time.
2. Defragmentation- Run defrag which is located in terms tools to pull thosefragments into one location.
5. Physical maintenance, i.e., regular physical cleaning of the hardwarecomponents should be observed.
LESSON NOTE ON DATA PROCESSING SS3 FIRST TERM [Publish Date]
6. Internet Security: Always run full updated antivirus program when usingthe internet and also perform full system scan
with your anti-virus program. It is ideal to run a firewall to block potential threats.
7. Patches and updates: They are regularly released by software companies to tackle security problems found in the
programs. System administratorsand network technicians should regularly download and apply these updates to ensure
that their computersand their networks are protected from hackers, viruses and network intrusions.
1. Never turn your computer off with the power switch on until window hasshut down.
3. Back up your data to external hard drives, DVD/ CD ROMs, USB/ drives,memory card etc.
6. Ensure that you have 300 mbs or 500-600 mbs of free space on your CDrive for window XP, Vista, or Window 7.
7. Do not allow a lot of programs to load up when you start your computer.
10. Keep track of the software disk you receive with your computer and newperipheral.
GENERAL EVALUATION
WEEKEND ASSIGNMENT
1. Which of the following is not a software maintenance? a) Virus b) Spyware c) Hard disk d) Registry removal.
2. The software maintenance that involves developing and deploying solutions to problems is a) corrective b)
adaptive c) preventive d)perfective
3. The software maintenance that takes care of the changes that occur in software maintenance is called a) adaptive b)
corrective c) perfective d) preventive
4. Disk cleaning should be done ……….. a) hourly b) daily c) weekly d) yearly
LESSON NOTE ON DATA PROCESSING SS3 FIRST TERM [Publish Date]
5. Patches and update are regularly released by software companies to tacklesecurity problems found in a) programs
b) hardware c) people ware d) peripheral
THEORY
DATABASE SECURITY
Data security is the practice of keeping data protected from corruption and unauthorized access. The focus behind
data security is to ensure privacy whileprotecting personal or corporate data.
It is a means of putting in place the different form of information security controls to protect database against
compromise of their confidentiality, integrity and availability.
RISK ASSESSMENT
LESSON NOTE ON DATA PROCESSING SS3 FIRST TERM [Publish Date]
This will enable you to identify the risks you are faced with and what could happen if valuable data is lost through theft,
malware infection or a system crash.
SECURING DATA
Since data can be compromised in many ways, the best security against misuseor theft involves a combination of
technical measures, physical security and a well-educated staff. You should implement clearly defined polices into
your infrastructure and effectively present them to the staff.
1. Access Control: Is the selective restriction of access to a place or other resource. The act of accessing may mean
consuming, entering, or using. Permission to access a resource is called authorization.
2. Auditing: Database auditing involves observing a database so as to be aware of the actions of database users. Database
administrators and consultants often setup auditing for security purposes, for example, to ensure that those without
the permission to access information do not access it.
3. Authentication: Is the validation control that allows you to log into a system, email or blog account etc. Once logged
in, you have various privileges until logging out. Some systems will cancel a session if your machine has been idle
for a certain amount of time, requiring that you prove authentication once again to re- enter.You can log in using
multiple factors such as a password, a smart card oreven a fingerprint.
4. Encryption: This security mechanism uses mathematical scheme and algorithms to scramble data into unreadable
text. It can only be decoded or decrypted by theparty that possesses the associated key.
5. Back Up: This is the process of making copy and archiving of computer data in the eventof data losswhich is used to
restore the original data.
6. Password: This is sequence of secret characters used to enable access to afile, program,computer system and other
resources.
EVALUATION
Data security is critical for most business and even home computer users. Client information, payment information,
personal files, bank account details-all this information can be hard to replace and potentially dangerous if it fallsinto
the wrong hands. Data lost due to disaster such as a flood of fire is crushing, but losing it to hackers or a malware
infection can have much greater consequences.
2. Hackers could steal vital information and fraud can easily be perpetrated.
Is the process of copying and archiving of computer data so it may be used torestore the original after a data loss
event. Backups have two distinct purposes. The primary purpose is to recover data after its loss, be it by data deletion
or corruption. The secondary purpose of backups is to recover data from an earlier time, according to a user-defined
data retention policy, typically configured within a backup application for howlong copies of data are required. Backup
is just one of the disaster recovery plans.
APPLICATION SECURITY
Application security is the use of software, hardware and procedural methods to protect application from external
threats.
A database administrator (DB) is a person responsible for the installation, configuration, upgrade, administration,
monitoring and maintenance of databases in an organization. The role includes the development and design ofdatabase
strategies, system monitoring and improving database performance and capacity, and planning for future expansion
requirements. They may also plan, co-ordinate an implement security measures to safeguard the database.
• Allocating system storage and planning future storage requirementsfor the database system
• Modifying the database structure, as necessary, from informationgiven by application developers.
• Enrolling users and maintaining system security.
• Ensuring compliance with database vendor license agreement.Controlling and monitoring user access to the database.
• Monitoring and optimizing the performance of the database.
• Planning for backup and recovery of database information.
• Maintaining archive data. Backing and restoring databases.
• Contacting database vendor for technical support.
• Generating various reports by querying database as per need.
LESSON NOTE ON DATA PROCESSING SS3 FIRST TERM [Publish Date]
GENERAL EVALUATION
WEEKEND ASSIGNMENT
1. ________ is the practice of keeping data protected from corruption and unauthorized access. (a) Data measurement
(b) Data security (c) Dataprotection (d) Data control
2. Which of these is not a type of security control ……? (a) access control (b)auditing (c) encryption(d) storage
to scramble data into unreadable text. (a) Encryption (b) Auditing (c)Authentication (d) Auditing
4. __________is the process of copying and archiving data so it may be used to
restore original after a data loss (a) Backup (b) Restore (c) Control (d)Saving
5. __________ is the computer professional responsible for the configuration,
administration and maintenance of a database (a) Programmer (b) Systemadministrator (c) Database administrator (d)
System analyst
THEORY
Crash recovery is the process by which the database is moved back to a consistent and usable state. This is done by
rolling back incomplete transactions and completing committed transactions that were still in memorywhen the crash
occurred. When the database is in a consistent and usable state, it has attained what is known as a point of consistency.
Following a transaction failure, the database must be recovered.
1. A power failure on the machine causing the database manager and thedatabase partitions on it to go down.
2. A hardware failure such as memory corruption, or disk, CPU, or networkfailure.
3. A serious operating system error that causes the DB to go down
ARIES
This is a recovery algorithm designed to work with no-force, steal databaseapproach. It is used by IBM DB2, MS
SQL Server and many other database systems.
The three main principles that lie behind ARIES recovery algorithm
1. Write Ahead Logging: Any change to an object is first recorded in the log,and then the log must be written to a stable
storage before changes to the object are written to a disk.
2. Repeating History during Redo: On restart, after a crash, ARIES retraces the actions of a database before the crash
and brings the system back to the exact state that it was in before the crash. The n itundoes the transaction still active
at crash time.
3. Logging Changes during Undo: Change made to the database whileundoing transactions are logged to ensure such an
action isn’t repeated in the event of repeated restarts.
2. REDO Phase: The Redo phase restores the database to the exact state atthe crash, including all the changes of
uncommitted transactions that were running at that point time.
3. UNDO Phase: The undo phase then undoes all uncommitted changes, leaving the database in a consistent state. After
the redo phase the database reflects the exact state at the crash. However, the changes of uncommitted transactions
have to be undone to restore the database to aconsistent state.
EVALUATION
Write Ahead Logging (WAL) is family of techniques for providing atomicity and durability (two of the ACID
properties) in database systems. In a system using WAL, all modifications are written to a log before they are applied.
Usually bothredo and undo information is stored in the log. WAL allows updates of a database to be done in one place.
ATOMICITY: This is the property of transaction processing whereby either all the operationsof transactions are
executed or none of them are executed (all-or-nothing)
DURABILITY: This is the ACID property which guarantees that transactions that havecommitted will survive
permanently.
LOG: A transaction log (also transaction journal, database log, binary log or audit trail) is a history of actions executed
by a database management system to guarantee ACID properties over crashes or hardware failure. Physically, a log
isa file of updates done to the database, stored in stable storage.
LESSON NOTE ON DATA PROCESSING SS3 FIRST TERM [Publish Date]
CHECK POINTING: Check pointing is basically consists of storing a snapshot of the current application state, and
later on, use it for restarting the execution in case of failure. A check point record is written into the log periodically
at that point when the system writes out to the database on disk all DBMS buffers that havebeen modified. This is a
periodic operation that can reduce the time for recovery from a crash. Check points are used to make recovery more
efficient and to control the reuseof primary and secondary log files. In the case of crash, backup files will be used to
recover the database to the point of crash.
MEDIA RECOVERY: Media recovery deals with failure of the storage media holding the permanentdatabase, in
particular disk failures. The traditional database approach for media recovery uses archive copies (dumps) of the
database as well as archivelogs. Archive copies represent snapshots of the database and are periodically taken.
The archive log contains the log records for all committed changes which are not yet reflected in the archive copy. In
the event of a media failure, the currentdatabase can be reconstructed by using the latest archive copy and redoing all
changes in chronological order from the archive log.
A faster recovery from disk failures is supported by disk organizations like RAID(redundant arrays of independent
disks) which store data redundantly on several disks. However, they do not eliminate the need for archive based media
recovery since they cannot completely rule out the possibility of data loss, e.g when multiple disk fail.
GENERAL EVALUATION
2. Explain the following terms in crash recovery (i) Media recovery (ii) Checkpoint (iii) The Write – Ahead log protocol
WEEKEND ASSIGNMENT
1. The process by which a database is moved back to a consistent and usable state is called… (a) cash recovery
(b) crash recovery (c) past recovery (d) undo recovery
2. The recovery algorithm that uses no-force and steals approach is ………….. (a) ARIAS (b) ARIES (c) ARREARS
(d) ARIS
4. Which of these is not a crash recovery type ………… (a) ARIES (b) Media recovery (c) Check pointing (d) UNDO
5. ………. Crash recovery uses backup files (a) Check point (b) ARIES (c) Mediarecovery (d) Atomicity
THEORY