The relational Model in DBMS is the terminology which talks about how to structure the database, what important things are needed for the database, how the data should be stored in the database, and all the basic conventions related to the database. In this article, we will talk in detail about the Relational Model in DBMS.
Introduction to Relational Model in DBMS
The theoretical concept of relational databases is known as the Relational Model in DBMS. The data relational model is totally based on the related concept. A relation is nothing but it is a mathematical model that is basically based on the ideas of the sets.
The Relational Model in DBMS was coined in the year 1970 and was proposed by E.F Codd for IBM. He has to do the data modelling in the form of tables or relations. Earlier the data was used to store in the form of files in the traditional system that was having a lot of drawbacks, Therefore, the concept of tables comes into the role, as tables store the data in a well-mannered form, and there are many relational concepts being established in the attributes used by the tables.
See, also: Classification of DBMS Users
What is Relational Model in DBMS?
The relational Model in DBMS is nothing but it is a way to represent how large data is being stored in the relational databases. The data are stored in the form of relations or tables in the relational database.
Firstly the designing of the conceptual model of the database is done through ER diagram, and after that, it needs to be converted into the Relational Model in DBMS, which further can be implemented by using any of the RDBMS i.e., Relational Database Management System languages.
RDBMS languages are SQL, MySQL, PSQL, Oracle, etc.
What is RDBMS?
RDBMS stands for Relational Database Management System. It is the basis for all modern database systems (DBMS) like IBM DB2, Oracle, MS SQL Server, Microsoft Access, and MySQL.
E.F. Codd coined the term relational models, and the RDBMS is a database management system, which is totally based on the concept of relational models.
Currently, the proper Relational Database Management System include:
- Informix Dynamic server and DB2 – from IBM
- Rdb and Oracle – from Oracle
- MS Access and SQL Server – from Microsoft
How to represent Relational Model in DBMS?
The relational Model in DBMS can be easily represented as a Table with a set of attributes and columns. The row in the tables is also known as a tuple and each column in the table consists of attributes or simply we can say the name.
For example, have a look at the following Student table.
This is the Student table.
In this student table, there are 5 different rows and 3 columns, and each column is representing 1 attribute. Here the 3 attributes are Roll No, Name, and Phone. Roll No is representing the 1st column, Name is representing the 2nd column, and Phone is representing the 3rd column.
The concepts of Relational Model in DBMS
- Relation: A relation is a table which is a combination of rows or tuples and columns
- Attributes: An attribute represent the unique name for each column so that a particular column gets the identity. For example, in the above student table, there were 3 columns and thus 3 attributes and that are Roll No, Name, and Phone.
- Domain: A domain tells which type of value can be stored in a particular column, in the Roll No column it will always accept the integer value, but it won’t accept the string value. So, the domain in Relational Model in DBMS is also defined as the set of allowable values for all the attributes in the tables.
- Tuples: Tuples represent the rows of a relation.
- Relation Schema: The name of the relations with its attributes is represented by the relation schema.
- Relation Instance (State): Relation Instance makes sure that there are no duplicate rows present in the table. So, it is nothing but it is a finite set of rows or tuples.
- Degree: Degree is represented by the total number of attributes or columns present in the relation or table. In the above student table, the degree is 3, a total of 3 columns are present and that are Roll No, Name, and Phone.
- Cardinality: Cardinality is just the opposite of the degree, it is represented by the total number of rows present in the relation or table. In the above student table, the cardinality is 5, and a total of 5 rows is present.
- Relation Key: The relation key in Relational Model in DBMS is also known as the primary key, It is used to uniquely identify each row in the table.
- Tuple Variable: Tuple Variable represents all the data that are stored in a record of the table or relation. Like in the above student table, any value of the row will be considered as the tuple variable. For example, Hana is the tuple variable.
Properties of the Relational Model in DBMS
Since we now understand the Relational Model in DBMS, let’s look at some properties.
- Each relation has given a unique name. For example, In the above table, Student is the relation name.
- Each Row or tuple will have a unique value, there will be no duplicates present in the table.
- The domain will be the same for a particular column, and it will accept only that type of value.
- Each attribute of the columns present in the table will have a unique name,
- Relations or Tables are unordered, basically, the order of the rows or columns is irrelevant.
- Attributes values are generally atomic in nature, as each cell of the relation or table will contain exactly one value.
To know more about Primary Key, read: Keys in DBMS
Alternative Terminology for Relational Model in DBMS
Some of the alternative terminologies for the Relational Model in DBMS are:
|Formal terms||Alternative 1||Alternative 2|
The above table clearly represents the 2 alternatives for Relational Model in DBMS.
So, the Relational Model in DBMS is one of the important topics for all those who are learning about Databases, who all have to daily work with data. This tells us the clear convention of the database, how the data is populated there and how it should be stored in the database.