Relational Data Model
Introduction
A relational data model organizes data into tables, with each table representing a relation.
Components
- Tables (Relations): Collections of related data, represented as rows and columns.
- Rows (Tuples): Individual records or entries in a table.
- Columns (Attributes): Characteristics or properties of the data in a table.
- Primary Key: Unique identifier for each row in a table.
- Foreign Key: Field in a table that references the primary key of another table.
Relationships
- One-to-One (1:1): One row in one table is related to only one row in another table.
- One-to-Many (1:N): One row in one table is related to multiple rows in another table.
- Many-to-Many (M:N): Multiple rows in one table are related to multiple rows in another table.
Benefits
- Data Integrity: Relational data models enforce data integrity through constraints and relationships.
- Data Flexibility: Relational data models allow for flexible data retrieval and manipulation.
- Scalability: Relational data models can handle large amounts of data and support multiple users.
Relational Algebra
- Selection: Retrieves specific rows from a table.
- Projection: Retrieves specific columns from a table.
- Join: Combines rows from two or more tables based on a related column.
No comments:
Post a Comment