rdbms4.2

Unit-I Unit-II  Unit-III Unit-IVUnit-V
Part-I Part-II Part-I Part-IPart-ITotal
Part-III Part-IV Part-II Part-IIPart-II
Part-VPart-III


 6.What are the database recovery techniques 

RECOVERY TECHNIQUES

Recovery can be done using/restoring the previous consistent state (backward recovery) or by moving forward to the next consistent state as per the committed transactions (forward recovery) recovery. Please note that a system can recover from software and hardware failures using the forward and backward recovery only if the system log is intact.

1) Backward Recovery (UNDO)

In this scheme the uncommitted changes made by a transaction to a database are undone. Instead the system is reset to the previous consistent state of database that is free from any errors



2) Forward Recovery (Redo)


In this scheme the committed changes made by a transaction are reapplied to an earlier copy of the database.

One thing to be noted is that the Undo and Redo operations must be idempotent, i.e., executing them several times must be equivalent to executing them once.

Depending on the recovery scheme, several types of recovery methods have been used. 

Log based recovery

Let us first define the term transaction log in the context of DBMS. A transaction log is a record in DBMS that keeps track of all the transactions of a database system that update any data values in the database. A log contains the following information about a transaction:

• A transaction begin marker

•The transaction identification: The transaction id, terminal id or user id etc.

The operations being performed by the transaction such as update, delete, insert.

• The data items or objects that are affected by the transaction including name of the table, row number and column number.

• The before or previous values (also called UNDO values) and after or changed values (also called REDO values) of the data items that have been updated.

• A pointer to the next transaction log record, if needed.

• The COMMIT marker of the transaction.

The transaction log helps to find which transaction did which changes. Thus the system knows exactly how to separate the changes made by transactions that have already committed from those changes that are made by the transactions that did not yet commit. Any operation such as begin transaction, insert /delete/update and end transaction (commit), adds information to the log containing the transaction identifier and enough information to undo or redo the changes. 


7.Explain Security and integrity?

Database security is the protection of information that is maintained in a database. It deals with ensuring only the “right people” get the right to access the “right data”.

By right people we mean those people who have the right to access/update the data that they are requesting to access/update with the database. This should also ensure the confidentiality of the data.

For example, in an educational institution, information about a student’s grades should be made available only to student, whereas only the university authorities should be able to update that information.

Similarly, personal information of the employees should be accessible only to the authorities concerned and not to everyone.

Thus, one of the concepts of database security is primarily a specification of access rules about who has what type of access to what information. This is also known as the problem of Authorization.

These access rules are defined at the time database is defined.

The person who writes access rules is called the authorizer.

The process of ensuring that information and other protected objects are accessed only in authorized ways is called access control.

There may be other forms of security relating to physical, operating system, communication aspects of databases.

Integrity refers to the avoidance of accidental loss of consistency. Protection of database contents from unauthorized access includes legal and ethical issues, organization policies as well as database management policies.

To protect database several levels of security measures are maintained:

 

1.     Physical: The site or sites containing the computer system must be physically secured against illegal entry of unauthorized persons.

2.     Human: An Authorization is given to a user to reduce the chance of any information leakage and unwanted manipulations.

3.     Operating System: Even though foolproof security measures are taken to secure database systems, weakness in the operating system security may serve as a means of unauthorized access to the database.

4.     Network: Since databases allow distributed or remote access through terminals or network, software level security within the network software is an important issue.

5.     Database system: The data items in a database need a fine level of access control. For example, a user may only be allowed to read a data item and is allowed to issue queries but would not be allowed to deliberately modify the data. It is the responsibility of the database system to ensure that these access restrictions are not violated.

8.Explain Authorization?

Authorization:

Authorization is a set of rules that can be used to determine which user has what type of access to which portion of the database. The following forms of authorization are permitted on database items:

1) READ: it allows reading of data object, but not modification, deletion or insertion of data object.

2) INSERT: allows insertion of new data, but not the modification of existing data, e.g., insertion of tuple in a relation.

3) UPDATE: allows modification of data, but not its deletion .But data items like primary-key attributes may not be modified.

4) DELETE: allows deletion of data only.

A user may be assigned all, none or a combination of these types of Authorization, which are broadly called access authorizations.

1) Add: allows adding new objects such as new relations.

2) Drop: allows the deletion of relations in a database.

3) Alter: allows addition of new attributes in a relations or deletion of existing attributes from the database.

4) Propagate Access Control: if user A has access right R over a relation S, then if s/he has propagate access control, s/he can propagate her/his access right R over relation S to another user B either fully or part of it. In SQL you can use WITH GRANT OPTION for this right.

9.What are the various Kinds of Failures?

Kinds of Failures

1) Software failures: In such cases, a software error abruptly stops the execution of the current transaction (or all transactions), thus leading to losing the state of program execution and the state/ contents of the buffers.

A buffer is the portion of RAM that stores the partial contents of database that is currently needed by the transaction.

The software failures can further be subdivided as:

a) Statement or application program failure

b) Failure due to viruses

c) DBMS software failure

d) Operating system failure

2) Hardware failure: Hardware failures are those failures when some hardware chip or disk fails. This may result in loss of data. One such problem can be that a disk gets damaged and cannot be read any more.

 3) External failure: A failure can also result due to an external cause, such as fire, earthquakes, floods, etc. The database must be duly backed up to avoid problems occurring due to such failures.


No comments:

Post a Comment