What are Relational Databases?

Relational Model in DBMS

The relational model in a Database Management System (DBMS) is a framework for managing and organizing data using tables, also known as relations. After designing the conceptual model of the Database using ER diagrams, we need to convert the conceptual model into a relational model that can be implemented using any RDBMS language like Oracle SQL, MySQL, etc.
Relational Model in DBMS

It was introduced by Edgar F. Codd in 1970 and has become the foundation for most modern database systems. The relational model emphasizes the use of a structured, tabular format to store data and the relationships between those data points.

Key Terminologies

  • Tables (Relations): Data is stored in tables, which consist of rows and columns. Each table represents a specific entity or concept.
  • Rows (Tuples): Each row in a table represents a single record or instance of the entity described by the table.
  • Columns (Attributes): Each column in a table represents a specific attribute or property of the entity. All values in a column are of the same data type.
  • Degree: The number of attributes in the relation is known as the degree of the relation.
  • Cardinality: The number of tuples in a relation is known as cardinality.

Let's take an example of a student table for a class. We would call it the STUDENT relation. The relation STUDENT would have attributes ROLL_NO, NAME, ADDRESS, PHONE, and AGE, which would be represented as columns, and each student would be a record or tuple represented by each row of the table.

Integrity

Data integrity is an important aspect of relational models. Integrity should be maintained and checked for before performing any operation (insertion, deletion, and updation) in the database. If there is a violation of any of the constraints, the operation will fail.

Maintaining integrity constraints involves:

  • Domain Integrity: Ensuring that all values in a column are of a specific data type.
  • Entity Integrity: Each row must be unique, where keys come into the picture (candidate, super, primary, etc.).
  • Referential Integrity: Ensuring that foreign keys correctly reference primary keys in other tables.

The values must be atomic, i.e., they can't be divided further. For example, instead of having a NAME attribute, have separate attribute columns for FIRST_NAME, MIDDLE_NAME, and LAST_NAME.

The document What are Relational Databases? is a part of the Computer Science Engineering (CSE) Course Complete System Design Course.
All you need of Computer Science Engineering (CSE) at this link: Computer Science Engineering (CSE)

FAQs on What are Relational Databases?

1. What are relational databases?
Ans. Relational databases are a type of database that store data in structured formats, using tables that consist of rows and columns. Each table represents an entity, and the relationships between tables are defined using keys, ensuring that the data is organised and can be easily accessed and manipulated. The relational model is based on the principles of set theory and first-order predicate logic.
2. What is the significance of keys in relational databases?
Ans. Keys in relational databases are essential for uniquely identifying records within a table and establishing relationships between different tables. The primary key is a unique identifier for each record, ensuring that no two rows have the same value in that column. Foreign keys, on the other hand, create a link between tables by referencing the primary key of another table, thus maintaining data integrity and enabling complex queries across multiple tables.
3. What is data integrity in the context of relational databases?
Ans. Data integrity refers to the accuracy and consistency of data stored in a relational database. It is crucial for ensuring that the data remains reliable and valid throughout its lifecycle. Data integrity is maintained through various constraints, such as primary keys, foreign keys, unique constraints, and check constraints, which enforce rules on what data can be entered into the database, preventing errors and inconsistencies.
4. Can you explain the concept of normalisation in relational databases?
Ans. Normalisation is the process of organising data in a relational database to reduce redundancy and improve data integrity. It involves dividing large tables into smaller, interconnected tables and defining relationships between them. The goal is to eliminate duplicate data and ensure that data dependencies make sense, thus facilitating easier maintenance and updates while ensuring that the data remains consistent.
5. What are some common types of integrity constraints in relational databases?
Ans. Common types of integrity constraints in relational databases include primary key constraints, which ensure that each record is unique; foreign key constraints, which maintain referential integrity between tables; unique constraints, which prevent duplicate values in specific columns; and check constraints, which enforce specific conditions on the values that can be entered in a column. These constraints help maintain the accuracy and reliability of the data.
Explore Courses for Computer Science Engineering (CSE) exam
Get EduRev Notes directly in your Google search
Related Searches
Free, mock tests for examination, Summary, Previous Year Questions with Solutions, video lectures, past year papers, Viva Questions, What are Relational Databases?, Important questions, MCQs, study material, shortcuts and tricks, Objective type Questions, practice quizzes, ppt, Extra Questions, Semester Notes, Sample Paper, What are Relational Databases?, What are Relational Databases?, Exam, pdf ;