Explain relational data Model with example.

Channel:
Subscribers:
108
Published on ● Video Link: https://www.youtube.com/watch?v=XNQr0Q0QhQk



Duration: 0:00
1 views
0


Relational Data Model

A relational data model is a way of organizing data into tables, also known as relations, with well-defined relationships between them. Each table consists of rows (tuples) and columns (attributes), where each column represents a field or attribute of the data.

Key Components
1. *Tables (Relations)*: Collections of related data, represented as rows and columns.
2. *Columns (Attributes)*: Individual fields or attributes of the data.
3. *Rows (Tuples)*: Individual records or entries in the table.
4. *Primary Key*: A unique identifier for each row in a table.
5. *Foreign Key*: A field in a table that references the primary key of another table.

Example
Suppose we have a database for a university with two tables: Students and *Courses*.

Students Table
Student ID (PK) Name Age
1 John 20
2 Jane 22
3 Bob 21
Courses Table
Course ID (PK) Course Name Student ID (FK)
101 Math 1
102 Science 1
103 History 2
104 English 3
In this example:

Students table has a primary key (PK) of *Student ID*.
Courses table has a foreign key (FK) of Student ID that references the Student ID in the Students table.
The relationship between the two tables allows us to link students to their enrolled courses.

The relational data model enables efficient data storage, retrieval, and manipulation, while maintaining data consistency and integrity.

#cs #business #intelligence