Turn Desktop View Off
by Dinesh Thakur

It deals with the cost of implementing locks depending upon the space and time. Here, space refers to data structure in DBMS for each lock and time refers to handling of lock request and release.

The cost of implementing locks depends on the size of data items. There are two types of lock granularity:



 
by Dinesh Thakur

If a system does not employ some protocol that ensures deadlock freedom, then a detection and recovery scheme must be used. An algorithm that examines the state of the system is invoked periodically to determine whether a deadlock has occurred. If one has, then the system must attempt to recover from the deadlock. To do so, the system must.



 
by Dinesh Thakur

In order to understand deadlock, let us consider the following example:

 

 
by Dinesh Thakur

When a transaction requests a lock on a data item in a particular mode, and no other transaction has a lock on the same data item in a conflicting mode, the lock can be granted. However care must be taken to avoid the following scenario.

 
by Dinesh Thakur

There are two approaches used in algorithms to deals with the problems of concurrency control. These are:

• Pessimistic Approach

• Optimistic Approach

 
by Dinesh Thakur

Transaction processing systems usually allow multiple transactions to run concurrently. By allowing multiple transactions to run concurrently will improve the performance of the system in terms of increased throughout or improved response time, but this allows causes several complications with consistency of the data. Ensuring consistency in spite of concurrent execution of transaction require extra work, which is performed by the concurrency controller system of DBMS.



 
by Dinesh Thakur

A transaction is a set of changes that must all be made together. It is a program unit whose execution mayor may not change the contents of a database. Transaction is executed as a single unit. If the database was in consistent state before a transaction, then after execution of the transaction also, the database must be in a consistate. For example, a transfer of money from one bank account to another requires two changes to the database both must succeed or fail together.

 
by Dinesh Thakur

It is used to determine an efficient file organization for each base relation. For example, if we want to retrieve student records in alphabetical order of name, sorting the file by student name is a good file organization. However, if we want to retrieve all students whose marks is in a certain range, a file ordered by student name would not be a good file organization. Some file organizations are efficient for bulk loading data into the database but inefficient for retrieve and other activities.

 
by Dinesh Thakur

Designing of database is most important responsibility of the software professionals who are dealing with the database related projects. For this they follow the Design Methodology. It helps the designer to plan, manage, control, and evaluate database development projects.

 
by Dinesh Thakur

Definition of second normal form is:

A relation R is in second normal form (2NF) if and only if it is in INF and very non-key attribute is fully dependent on the primary key.

 
by Dinesh Thakur

A relation R is in Fourth Normal Form (4NF) if and only if the following conditions are satisfied simultaneously:

R is already in 3NF or BCNF.

If it contains no multi-valued dependencies.

 
by Dinesh Thakur

A relation R is in Fifth Normal Form (5NF) if and only if the following conditions are satisfied simultaneously:

 

1.         R is already in 4NF.

2.         It cannot be further non-loss decomposed.

 
by Dinesh Thakur

Denormalization is the process of attempting to optimize the performance of a database by adding redundant data or by grouping data. In some cases, denormalization helps cover up the inefficiencies inherent in relational database software. A relational normalized database imposes a heavy access load over physical storage of data even if it is well tuned for high performance.

 
by Dinesh Thakur

To eliminate these anomalies in 3NF relations, it is necessary to carry out the normalization process to the next higher step, the Boyce-Codd Normal Form.

BCNF is simply a stronger definition of 3NF. Since BCNF is higher form of 3NF, so a relation in BCNF must be in 3NF. BCNF makes no explicit reference to first and second normal form as such, nor the concept of full and transitive dependence.

 
by Dinesh Thakur

A relation R is in Third Normal Form (3NF) if and only if the following conditions are satisfied simultaneously:

 

1. R is already in 2NF

2. No nonprime attribute is transitively dependent on the key.

 
by Dinesh Thakur

A relation is said to be in First Normal Form (lNF) if and only if every entry of the relation (the intersection of a tuple and a column) has at most a single value. In other words "a relation is in First Normal Form if and only if all underlying domains contain atomic values or single value only."

 
by Dinesh Thakur

We have already seen relational algebra is a procedural language, in which user has to write the steps or procedure to obtain the required results but in general a user should not have to be concerned with the details of how to obtain information. In relational calculus user is not concerned with the procedure to obtain the results, he/she just tell his/her requirements and the output is available without knowing the method about its retrieval.



 
by Dinesh Thakur

Relational operators are classified into two types:

 

• Traditional Set Operators

• Special Operators

 

Traditional Set Operators

Traditional set operators are:

 
by Dinesh Thakur

Relational Algebra is a procedural language that can be used to tell the DBMS how to build a new relation from one or more relations in the database and the Relational Calculus is a non-procedural language that can be used to formulate the definition of a relation in terms of one or more database relations.



 
by Dinesh Thakur

What is Key?

A database consists of tables, which consist of records, which further consist of fields.

This below figure provides an example of a typical table consisting of STUDENT details:

 
by Dinesh Thakur

Dr. E.F. Codd, the founder of the relational database systems, framed twelve rules to assist a database product to qualify as relational. An RDBMS product has to satisfy at least six of the 12 rules of Codd to be accepted as a full-fledged RDBMS. There is no RDBMS package commercially available that satisfies all the 12 rules. These rules are:

 
by Dinesh Thakur

More precisely, the relational model is concerned with three components:

• Data Structure

• Data Integrity

• Data Manipulation

Relational Data Structure

Relation : A relation is a table with columns and rows.