Relational Model

What is Relational Model ?


E.F. Codd introduced the relational data model in 1970. It is one of the most evolved and widely used models for organizing data. The data can be described in a flexible and simple manner using the relational model. This model can be observed in almost every sphere of everyday life.

Tables are used to represent data in the relational model. There is a solid theoretical foundation associated with the relational model because it follows rules of the mathematical theory. Following are three components that make up the relational model :

1) Data Structure : 
The tables contain rows and columns in which the data are organized.

2) Data Manipulation : 
SQL languages are used to perform powerful operations that help in manipulating the data, stored in the relations.

3) Data Integrity : 
It is possible to specify certain rules that help in maintaining the integrity of the data in the database.

Relations


Relation is represented using a two-dimensional table. A table or relation is made up of a definite number of 'named columns' and indefinite number of 'unnamed rows'. A 'named column' of a relation is called 'attribute'. Each row stores a record. Data values for a single entity make up a record.

An example of a relation named EMPLOYEE1 has been shown in table. Attributes such as EmpID, Name, DeptName and Salary have been used as attributes to describe the employees. The records of five employees have been stored in five rows of the table.

A short hand notation can also be used to represent the relation structure. Using this method the attributes are written (within parentheses) before which the name of the relation is written.

The relation for EMPLOYEE1 (EmpID, Name, DeptName and Salary) has been given below :

EmpID

Name

DeptName

Salary

100

Anil Sharma

Marketing

48,000

140

Sanjay Jha

Accounting

52,000

110

Indira Singh

Info Systems

43,000

190

Davis Clark

Finance

55,000

150

Kamini Venna

Marketing

42,000


Properties of Relations


1) No Duplicate Tuples : 
There should not be two tuples having the same values for every attribute in a relation. In other words it can be said that every row in a relation must be unique.

2) Tuples are unordered : 
There is no specific ordering for rows in a tuple.

3) Attributes are Unordered : 
There is no specific order of columns in the relation.

4) Attribute Values are Atomic : 
There are exactly one value for every attribute for a specific tuple.

5) Data Independence : 
Data independence is achieved more easily with normalization structure used in a relational database, than in the more complicated tree or network structure.

6) Data Manipulation Language : 
The possibility of responding to ad-hoc query by means of a language based on relational algebra and relational calculus is easy in the relational database approach. For data organized in other structure the query language either becomes complex or extremely limited in its capabilities.

Advantages of Relational Model


1) Ease of Use : 
This is simple to use because information is stored in tables so if one is handling (try to make any update) it for the first time, then he/she finds it very attractive.

2) Flexibility : 
This is flexible, so one can get the data in the form which he/she wants. He/she can extract the information very easily and information can also be manipulated by using various operators such as project, join, etc.

3) Precision : 
This is precise. Precise means there is no ambiguity in the data. To achieve the precision, this model uses the relational and calculus algebra for the manipulation of the relations between the tables.

4) Security : 
Security control and authorization can also be implemented more easily by moving sensitive attributes in a given table into a separate relation with its own authorization controls. If authorization requirement permits, a particular attribute could be joined back with others to enable full information retrieval.

Disadvantages of Relational Model


1) Hardware Overheads : 
Relational Model of DBMS requires more processing as it uses abstraction layers to store data physically and represent data to end user so, this is the reason that it requires more powerful hardware. But this is not a big issue because computers with high processing power are available now days in the market.

2) Ease of Design can Result in Bad Design : 
The relational database management system uses abstraction layer so at user's level, it is an easy to-design and easy to use. But the physical layer is hidden from user so it may lead to poorly designed development and implementation. In such cases when the database size increases, it may result in performance degradation resulting to system slowdown and data corruption.

3) Information Island Phenomenon : 
As we know that relational model of database systems are easy to design and use, departments or individuals ray design and implement their own databases and software applications. It may result in problems like data redundancy and data inconsistency which in turn may hinder information sharing and integration as well as efficient functioning and operations of an organisation.

Codd's Rules


Codd rules were proposed by E.F. Codd which should be satisfied by relational model. Codd's 13 Rules are as follows :

1) Foundation Rule : 
The stored data must be managed using the relational capabilities of a relational database management system

2) Information Rule : 
Only a single way must be used to represent all the information in a database 

3) Guaranteed Access Rule : 
One can access each and every data logically by combining the column name, primary key value and table name. 

4) Systematic Treatment of Null Values : 
Independent of the data types missing information can be represented in a fully relational DBMS in systematic way using null values.

5) Dynamic On-line Catalog Based on the Relational Model : 
The representation of the database description is the same as the ordinary data at the logical level. So the authorized users - can query to it using the same relational language in the same way it is applied regular languages. 

6) Comprehensive Data Sub-language Rule : 
They support several modes of terminal use and languages. 

7) View Updating Rule : 
Theoretically and systematically update of all the views are possible.

8) High-level Insert, Update, and Delete : 
It is possible to handle derived relation or base relation as single operand. The same facility. also applies to operations (such as deletion, insertion and update) related to the data.

9) Physical Data Independence : 
There is no logical effect of the change made to access methods or storage representations on the terminal activities and applications programs.

10) Logical Data Independence : 
When changes are made to the base table such that they theoretically not impair them, the terminal activities and the application programs also remain unimpaired.

11) Integrity Independence : 
It must be possible to define the integrity constraints for a specific relational database in the relational data sub-language and store them in the catalog instead of application programs.

12) Distribution Independence : 
During the times the data are physically distributed or centralized, the terminal activities, application programs and data manipulation sub-language of the relational DBMS should remain logically unimpaired.

13) Non-Subversion Rule : 
If there is support for any low level language in a relational system, it should not happen such that the low-level language bypasses or subverts the constraints or integrity rules that have been imposed by the relational language at the higher level.

Difference between DBMS and RDBMS


Difference between Database Management System (DBMS) and Relational Database Management System (RDBMS) are as follows :

Concept

DBMS

RDBMS

Relation between tables

 

Programmatically maintained.

 

Tables are used to store the relation between tables and are stored in the same database.

Multi-User

 

Generally one can access the files simultaneously so DBMS do not support the multiple users.

RDBMS supports multiple users at a time.

 

Security of Data

Not supported.

Security is implemented at multiple levels.

Table Storage

 

Predefine extensions are used to store each table and stored as a single file.

 

Single or multiple database files are used to store the tables as they might belong to different users.

Access to Database Files

 

The stored files can be directly accessed by the users.

 

Low level database files are protected from the direct access of the users.

Distributed Database

Not supported.

Supported.

Abstract View

 

There is no support for the abstract views that have been derived from the base tables.

There is support for abstract views.

Codd's Rules

 

Less than 8 rules are satisfied.

More than 8 rules are satisfied.