DEV Community

Utkarsh Tyagi
Utkarsh Tyagi

Posted on

What is Relational Model?

OVERVIEW

The relational model was first given by English computer scientist Edgar F. Codd. It was later promoted by Chris Date and Hugh Darwin. It is an approach to managing data in a structured way. The purpose of the relational model is that it provides a declarative method for specifying data and queries. It can be accessed by SQL(Structured Query Language), a programming language that is used to interact with databases.

INTRODUCTION TO RELATIONAL MODEL

The data is stored in the form of rows and columns and these rows and columns are part of tables. A database can have any number of tables according to its requirement. The rows in the table are also called tuples and columns are called fields. Often tables are referred to as relations. The tables in the database are related to each other via a relationship that is why the term relation is used. Let's take an example to understand it in a better way.

ID Name Age
1 Sam 18
2 Jack 20

In the above example, a relation is given(table) that has 3 columns(fields) and they are Id, Name, Age. These columns have their own data type and that is the same throughout the column., like Id column is having an integer data type and that will remain same in that column, any entry other than integer will be discarded for that column. A row also called a tuple can be understood as single, implicitly structured data, like in the above table (1, Sam, 18) is one row and so on.

ADVANTAGES OF RELATIONAL MODEL

1) Simple - It is a very simple model with no hierarchy, it can easily be designed. No complex queries are required to interact with the model.

2) Data Accuracy - It uses the concept of primary key and foreign key so as to avoid duplicate data and reduce redundancy in the model.

3) Flexibility - It possesses the power of increasing the size of the database, levelling up for the incoming data, it accommodates the constantly shifting requirements of the database and this facilitates the update and deletion process.

4) Normalization - It provides a set of rules, characteristics, or regulations to maintain the accuracy and consistency of the model.

5) Feasible for future requirements - As data is stored in separate tables so we can easily insert, update, delete data from it which makes it feasible for future business requirements.

FEATURES

1) Tabular Structure of Indexed File Data

2) SQL DDL(Data Definition Language) Support

3) SQL DML(Data Manipulation Language) Enhancements

4) System Catalog

5) Enhanced Performance

6) Multi-Level Security

DISADVANTAGES OF RELATIONAL MODEL

1) Cost - For setting up a relational model, the software is purchased and a technician is hired to maintain the system.

2) Physical Storage - Relational model requires a lot of physical storage as data is stored in different tables and to retrieve that data efficiently space is required.

3) Performance - As more tables are stored in a database so it makes the database to retrieve information slowly and making the system slow.

4) Information Loss - A large amount of data is stored in these tables and when we want to transfer this information to other systems there is a chance of data loss.

5) Complex - Although the relational model is usually not complex but it can become complex when large data is inserted in tables as the data follow the model constraints.

Top comments (0)