CH_12 Relational Model in DBMS

by Jasleen Chhabra | Updated on 29 September 2024
  • Relational Model in DBMS

Relational Model in DBMS

The Relational Model in Database Management Systems (DBMS) simplifies the process of querying compared to hierarchical or network database systems. Developed by E.F. Codd in 1970, the relational model organizes data into tables (also called relations), where rows represent individual records and columns represent the attributes of those records. This model is widely used in modern databases because it can represent real-world entities and their relationships efficiently.

Popular relational databases today include Oracle, Sybase, DB2, and MySQL.


Key Terminologies in Relational Model

  • Relation: A relation is represented as a table that organizes data into rows (records) and columns (fields or attributes).
  • Tuple: Each row in a table is called a tuple, representing a single record.
  • Attribute: Each column in the table is known as an attribute, representing a characteristic of the entity.
  • Domain: The domain defines the set of allowable values an attribute can take.
  • Cardinality: This is the number of rows in a table.
  • Degree: This refers to the number of columns in a table.

Let’s break down these terms using an example of an EMPLOYEE table:

This EMPLOYEE table has the following attributes:

  • Emp_ID: The unique identifier for each employee.
  • Emp_Name: Name of the employee.
  • Phone_No: Employee’s contact number.
  • Department: The department where the employee works.
  • Gender: The gender of the employee.

Detailed Explanation of Terms with New Example

  1. Relation (Table): The EMPLOYEE table is a relation containing employee data, organized into rows (tuples) and columns (attributes).

  2. Tuple (Row): A tuple refers to a single row in the table. For example, the first row (20145, John, 9876543210, IT, M) represents a tuple that contains details of the employee named John.

  3. Data Item: Each individual value in the table is a data item. For instance, 20145 and "John" are data items in the first tuple.

  4. Domain: The domain defines the allowable values an attribute can take. For example, the Gender attribute can have values "M" for Male and "F" for Female. Similarly, the Department attribute can have values like "IT", "HR", "Finance", etc.

  5. Attribute (Column): Each column in the EMPLOYEE table is an attribute. Emp_ID, Emp_Name, Phone_No, Department, and Gender are all attributes of this table.

  6. Cardinality: The cardinality is the number of tuples in the relation. In the EMPLOYEE table, there are 5 tuples, so the cardinality is 5.

  7. Degree: The degree refers to the number of attributes in the relation. Since the EMPLOYEE table has 5 attributes, its degree is 5.

This example helps to illustrate the core components of the relational model using different data from an employee management system.


Properties of Relations

  • Single Data Value: Each attribute in a relation contains only one data value.
  • Unique Name: The name of each relation is distinct from other relations.
  • Atomic Values: Each cell in the table holds a single, indivisible value.
  • No Duplicate Tuples: Relations do not have duplicate rows.
  • Order Irrelevant: The order of tuples does not matter in the relation.

Merits of the Relational Model

  1. Simplicity: The relational model provides an easy-to-understand structure with tables consisting of rows and columns.
  2. Flexibility: The relational model allows for easy manipulation of data. You can add, delete, and update data efficiently without affecting the overall structure of the database.
  3. Data Independence: Changes in the database schema do not require modifications to the application programs, making it easier to manage.
  4. Support for SQL: The relational model is closely tied to Structured Query Language (SQL), the standard language for interacting with relational databases, which simplifies complex queries.
  5. Integrity: The relational model enforces data integrity through constraints like primary keys, foreign keys, and unique constraints, ensuring the accuracy and consistency of data.
  6. Scalability: As the amount of data grows, relational databases can scale efficiently while maintaining performance and reliability.

Demerits of the Relational Model

  1. Performance: In large, highly transactional systems, relational databases can become slow due to frequent joins and the overhead of ensuring data consistency through constraints.
  2. Complexity in Schema Design: Creating an optimal schema requires a deep understanding of data and its relationships, and poor design can lead to inefficiencies.
  3. Handling Unstructured Data: Relational databases struggle to manage unstructured or semi-structured data, such as images, videos, and complex documents, unlike NoSQL databases, which are more suited for such data types.

Conclusion

The Relational Model revolutionized the way databases are designed and managed, offering a simple yet powerful structure for organizing data. Despite some limitations in performance and flexibility with unstructured data, the model remains a dominant force in the database world. The use of SQL further enhances its accessibility, making it the go-to choice for many database applications across different industries.


FAQ

Any Questions?
Look Here.

Related Articles

CH_01 Database Management Systems (DBMS)

CH_02 DBMS Architecture

CH_03 DBMS Data Models

CH_04 Difference between DBMS and RDBMS

CH_05 DBMS Data Schemas and Data Independence

CH_06 Database Languages in DBMS

CH_07 ACID Properties in DBMS

CH_08 ER (Entity-Relationship) Diagrams in DBMS

CH_09 Cardinality in DBMS

CH_10 Keys in DBMS

CH_11 Generalization, Specialization, and Aggregation in DBMS

CH_13 Operations on Relational Model in DBMS

CH_14 Relational Algebra in DBMS

CH_15 Join Operations in DBMS

CH_16 Integrity Constraints in DBMS

CH_17 Relational Calculus in DBMS

CH_18 Anomalies in DBMS

CH_19 Normalization in DBMS

CH_20 Transaction Management in DBMS

CH_21 ACID Properties in DBMS

CH_22 Concurrency Control in DBMS

CH_23 Data Backup and Recovery in DBMS

CH_24 Storage System in DBMS