Relational Data Model
Relational Data Model
The Relational Data Model is a widely used database model that organizes data into tables
(also called relations). Each table consists of rows (tuples) and columns (attributes). It was
proposed by E.F. Codd in 1970 and is the foundation of modern relational database systems
like MySQL, PostgreSQL, Oracle, and Microsoft SQL Server.
Key Concepts
1. Relation:
• A table that represents a specific type of data, such as "Students" or "Courses."
2. Tuple:
• A single row in a table representing an individual record or data item.
3. Attribute:
• A column in a table representing a property or characteristic of the data.
4. Domain:
• A set of permissible values for a particular attribute. For example, the "Age"
attribute might have a domain of positive integers.
5. Primary Key:
• A unique identifier for each tuple in a relation. For example, "Student_ID" in a
"Students" table.
6. Foreign Key:
• An attribute in one table that establishes a relationship with a primary key in
another table.
7. Candidate Key:
• A set of attributes that can uniquely identify a tuple. One of these is chosen as
the primary key.
8. Schema:
• The structure of the database, including tables, attributes, and relationships.
Relationships:
• Foreign Key: Student_ID in the "Enrollments" table references Student_ID in the
"Students" table.
• Foreign Key: Course_ID in the "Enrollments" table references Course_ID in the
"Courses" table.