Chapter A3
Chapter A3
administrator?
Database administration is more of an operational or
technical level function responsible for physical database design,
security enforcement, and database performance. Tasks include
maintaining the data dictionary, monitoring performance, and
enforcing organizational standards and security.
Explain the role or Functions of a database
administrator.
1. Schema Definition:
• The DBA definition the logical Schema of the database. A Schema refers to the overall logical structure of
the database.
• According to this schema, database will be developed to store required data for an organization.
• The DBA decides how the data is to be represented in the stored database.
• The DBA modifies the physical organization of the database to reflect the changing needs of the
organization or to improve performance.
Explain the role or Functions of a database administrator.
(Continue…..)
5. Approving Data Access:
• The DBA determines which user needs access to which part of the database.
6. Monitoring Performance:
• The DBA monitors performance of the system.The DBA ensures that better performance is
maintained by making changes in physical or logical schema if required.
• The DBA ensures this periodically backing up the database on magnetic tapes or remote servers.
• In case of failure, such as virus attack database is recovered from this backup.
Explain how end-users can interact
with a database.
Describe different methods of
database recovery.
Database recovery is the process of restoring the
database to the most recent consistent state that
existed just before the failure.
Disk Failure
In early days of technology evolution, it was a common problem where
hard-disk drives or storage drives used to fail frequently.
Disk failures include formation of bad sectors, unreachability to the disk,
disk head crash or any other failure, which destroys all or a part of disk
storage.
Recovery and Atomicity
When a system crashes, it may have several transactions being executed and
various files opened for them to modify the data items. Transactions are made of
various operations, which are atomic in nature. But according to ACID properties
of DBMS, atomicity of transactions as a whole must be maintained, that is, either
all the operations are executed or none.
When a DBMS recovers from a crash, it should maintain the following −
• It should check the states of all the transactions, which were being executed.
• A transaction may be in the middle of some operation; the DBMS must ensure the
atomicity of the transaction in this case.
• It should check whether the transaction can be completed now or it needs to be rolled
back.
• No transactions would be allowed to leave the DBMS in an inconsistent state.
There are two types of techniques, which can help a DBMS in recovering as well
as maintaining the atomicity of a transaction −
• Maintaining the logs of each transaction, and writing them onto some stable storage
before actually modifying the database.
• Maintaining shadow paging, where the changes are done on a volatile memory, and later,
the actual database is updated.
Log-based Recovery
Log is a sequence of records, which maintains the records of actions performed by a
transaction. It is important that the logs are written prior to the actual modification and stored
on a stable storage media, which is failsafe.
Log-based recovery works as follows −
•The log file is kept on a stable storage media.
•When a transaction enters the system and starts execution, it writes a log about it.
<Tn, Start>
•When the transaction modifies an item X, it write logs as follows −
<Tn, X, V1, V2>
It reads Tn has changed the value of X, from V1 to V2.
•When the transaction finishes, it logs −
<Tn, commit>
The database can be modified using two approaches −
•Deferred database modification − All logs are written on to the stable storage and the
database is updated when a transaction commits.
•Immediate database modification − Each log follows an actual database modification. That is,
the database is modified immediately after every operation.
Recovery with Concurrent
Transactions
When more than one transaction are being executed in parallel,
the logs are interleaved. At the time of recovery, it would
become hard for the recovery system to backtrack all logs, and
then start recovering. To ease this situation, most modern DBMS
use the concept of 'checkpoints'.
Checkpoint
Keeping and maintaining logs in real time and in real
environment may fill out all the memory space available in the
system. As time passes, the log file may grow too big to be
handled at all. Checkpoint is a mechanism where all the previous
logs are removed from the system and stored permanently in a
storage disk. Checkpoint declares a point before which the DBMS
was in consistent state, and all the transactions were committed.
When a system with concurrent transactions crashes and
recovers, it behaves in the following manner −
• The recovery system reads the logs backwards from the end to the last checkpoint.
• It maintains two lists, an undo-list and a redo-list.
• If the recovery system sees a log with <Tn, Start> and <Tn, Commit> or just <Tn,
Commit>, it puts the transaction in the redo-list.
• If the recovery system sees a log with <Tn, Start> but no commit or abort log found, it
puts the transaction in undo-list.
All the transactions in the undo-list are then undone and their logs are removed. All the
transactions in the redo-list and their previous logs are removed and then redone before
saving their logs.
Outline how integrated database systems function.
The term integrated database is used to describe two different database structures: connection of
multiple databases or a database built into another application or tool. Although the initial
description would appear to mean that these two structures are quite different, they are not. In fact,
they possess many of the same structures.
• A database is a collection of data from a range of different sources organized under one structure.
• The database itself if made up of a series of semi-independent data tables. Each table holds
specific information, typically with one focus per table.
• The database can create links between the separate tables, based on common elements,
information, or programming logic. Queries can be written to create reports accessing all the
different tables in the database.
• Connections between the different databases must be made and tested from a variety of
perspectives to ensure that the logic is sound.
• The different databases can also exist in different formats or programs. This adds to the
complexity but may be achieved using advanced programming logic and powerful resources.
Outline the use of databases in areas such as
stock control, police records, health records,
employee data.
Suggest methods to ensure the privacy of
the personal data and the responsibility of
those holding personal data not to sell or
divulge it in
any way.
• Access control :
• Auditing : Database auditing 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
• Encryption
• Integrity controls : Data integrity is the maintenance of, and the assurance of
the accuracy and consistency of, data over its entire life-cycle
• Backups
• Application security
Discuss the need for some databases to be open to
interrogation by other parties (police, government,
etc).
Explain the difference between data
matching and data mining.
• Data matching (also known as record or data linkage, entity
resolution, object identification, or field matching) is the task of
identifying, matching and merging records that correspond to the
same entities from several databases or even within one database.